summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-08-22 20:15:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-08-22 20:15:24 +0000
commita64608455099dc7146afdf72ce1c2391314cbc14 (patch)
tree13a8b1e5e186557bb294ecbdcc6ce908606ad820
parent586b0bd8bda486a33283db43874635a26937221a (diff)
downloadbcm5719-llvm-a64608455099dc7146afdf72ce1c2391314cbc14.tar.gz
bcm5719-llvm-a64608455099dc7146afdf72ce1c2391314cbc14.zip
objc - use existing API for temporary switch of
objc's decl context. llvm-svn: 138267
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index a5fb31afafc..46f64561af5 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud