diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-22 20:15:24 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-22 20:15:24 +0000 |
commit | 7939418cbdf1b610a69e6adf29cd7dc8d0e9eaf8 (patch) | |
tree | a89e111a6e135d9b9f9edfa18c1fbb4877d3666c /lib/Sema/SemaObjCProperty.cpp | |
parent | 4eb14ca3ded87493ddfab73cf4be7fc24c3d48ea (diff) |
objc - use existing API for temporary switch of
objc's decl context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index a5fb31afaf..46f64561af 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -235,8 +235,8 @@ Sema::HandlePropertyInClassExtension(Scope *S, PIkind); // Must re-establish the context from class extension to primary // class context. - ActOnObjCContainerFinishDefinition(CDecl); - ActOnObjCContainerStartDefinition(CCPrimary); + ContextRAII SavedContext(*this, CCPrimary); + Decl *ProtocolPtrTy = ActOnProperty(S, AtLoc, FD, ProtocolPropertyODS, PIDecl->getGetterName(), @@ -244,9 +244,6 @@ Sema::HandlePropertyInClassExtension(Scope *S, isOverridingProperty, MethodImplKind, /* lexicalDC = */ CDecl); - // restore class extension context. - ActOnObjCContainerFinishDefinition(CCPrimary); - ActOnObjCContainerStartDefinition(CDecl); PIDecl = cast<ObjCPropertyDecl>(ProtocolPtrTy); } PIDecl->makeitReadWriteAttribute(); |