diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-24 22:30:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-24 22:30:50 +0000 |
commit | 5cb10d3b1ad546b232e72275eaaf56d72823901d (patch) | |
tree | 8c2421abd29ea838443a47c96dd952c05dac9958 /lib/Sema/SemaDecl.cpp | |
parent | 27a4566734582b81abbf9af8a949a9049098d344 (diff) |
fix the sizeof error recovery issue (sizeof-interface.m:attributeRuns)
by correctly propagating the fact that the type was invalid up to the
attributeRuns decl, then returning an ExprError when attributeRuns is
formed (like we do for normal declrefexprs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
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; |