aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 63b006277c..e2f0ea4158 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3820,7 +3820,7 @@ Sema::DeclPtrTy Sema::ActOnIvar(Scope *S,
// example, unnamed unions inject all members into the struct namespace!
QualType T = GetTypeForDeclarator(D, S);
- bool InvalidDecl = false;
+ bool InvalidDecl = D.getInvalidType();
if (T.isNull()) {
InvalidDecl = true;
T = Context.IntTy;