aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-06 23:23:20 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-06 23:23:20 +0000
commit3a387441ae339363ee5b254658f295e97bd9e913 (patch)
tree4e39ccc7508ba46e5fa86a101f215ff736cc894e /lib/Parse/ParseObjc.cpp
parent51c3b79caa493a53d324190c0d7e3cd1fe93d4f3 (diff)
When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 1b48225837..78c6b87715 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -336,7 +336,6 @@ void Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey,
tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword;
SourceRange AtEnd;
- Actions.ActOnObjCContainerStartDefinition(CDecl);
while (1) {
// If this is a method prototype, parse it.
@@ -1195,6 +1194,7 @@ void Parser::ParseObjCClassInstanceVariables(Decl *interfaceDecl,
SmallVector<Decl *, 32> AllIvarDecls;
ParseScope ClassScope(this, Scope::DeclScope|Scope::ClassScope);
+ ObjCDeclContextSwitch ObjCDC(*this);
SourceLocation LBraceLoc = ConsumeBrace(); // the "{"
@@ -1441,7 +1441,6 @@ Decl *Parser::ParseObjCAtImplementationDeclaration(
atLoc, nameId, nameLoc, categoryId,
categoryLoc);
- Actions.ActOnObjCContainerStartDefinition(ImplCatType);
ObjCImpDecl = ImplCatType;
PendingObjCImpDecl.push_back(ObjCImpDecl);
return 0;
@@ -1466,7 +1465,6 @@ Decl *Parser::ParseObjCAtImplementationDeclaration(
if (Tok.is(tok::l_brace)) // we have ivars
ParseObjCClassInstanceVariables(ImplClsType, tok::objc_private, atLoc);
- Actions.ActOnObjCContainerStartDefinition(ImplClsType);
ObjCImpDecl = ImplClsType;
PendingObjCImpDecl.push_back(ObjCImpDecl);
return 0;