[cfe-commits] r138267 - /cfe/trunk/lib/Sema/SemaObjCProperty.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Aug 22 13:15:24 PDT 2011
Author: fjahanian
Date: Mon Aug 22 15:15:24 2011
New Revision: 138267
URL: http://llvm.org/viewvc/llvm-project?rev=138267&view=rev
Log:
objc - use existing API for temporary switch of
objc's decl context.
Modified:
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=138267&r1=138266&r2=138267&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Mon Aug 22 15:15:24 2011
@@ -235,8 +235,8 @@
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 @@
isOverridingProperty,
MethodImplKind,
/* lexicalDC = */ CDecl);
- // restore class extension context.
- ActOnObjCContainerFinishDefinition(CCPrimary);
- ActOnObjCContainerStartDefinition(CDecl);
PIDecl = cast<ObjCPropertyDecl>(ProtocolPtrTy);
}
PIDecl->makeitReadWriteAttribute();
More information about the cfe-commits
mailing list