diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-14 04:52:29 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-14 04:52:29 +0000 |
commit | c80553efdc269dabd4ed0c3210555f45729ab5dd (patch) | |
tree | de168cc635f7966d9c9ab4e3780c2a0a9f454ea5 /lib/Sema/SemaObjCProperty.cpp | |
parent | 67bc4ba9894506c461aeff11302c2d2471b82273 (diff) |
[PCH] Do not crash if a class extension in a chained PCH introduces/redeclares a property.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 4933f001c4..90d2d93431 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -17,6 +17,7 @@ #include "clang/AST/DeclObjC.h" #include "clang/AST/ExprObjC.h" #include "clang/AST/ExprCXX.h" +#include "clang/AST/ASTMutationListener.h" #include "llvm/ADT/DenseSet.h" using namespace clang; @@ -271,6 +272,8 @@ Sema::HandlePropertyInClassExtension(Scope *S, // Make sure setter/getters are declared here. ProcessPropertyDecl(PDecl, CCPrimary, /* redeclaredProperty = */ 0, /* lexicalDC = */ CDecl); + if (ASTMutationListener *L = Context.getASTMutationListener()) + L->AddedObjCPropertyInClassExtension(PDecl, /*OrigProp=*/0, CDecl); return PDecl; } if (PIDecl->getType().getCanonicalType() @@ -343,6 +346,8 @@ Sema::HandlePropertyInClassExtension(Scope *S, *isOverridingProperty = true; // Make sure setter decl is synthesized, and added to primary class's list. ProcessPropertyDecl(PIDecl, CCPrimary, PDecl, CDecl); + if (ASTMutationListener *L = Context.getASTMutationListener()) + L->AddedObjCPropertyInClassExtension(PDecl, PIDecl, CDecl); return 0; } |