diff options
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(); |