diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:20 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:20 +0000 |
commit | 3a387441ae339363ee5b254658f295e97bd9e913 (patch) | |
tree | 4e39ccc7508ba46e5fa86a101f215ff736cc894e /lib/Sema/SemaDeclObjC.cpp | |
parent | 51c3b79caa493a53d324190c0d7e3cd1fe93d4f3 (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/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index de48de15d7..1a1ac2eccf 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -374,7 +374,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, // Return the previous class interface. // FIXME: don't leak the objects passed in! - return IDecl; + return ActOnObjCContainerStartDefinition(IDecl); } else { IDecl->setLocation(ClassLoc); IDecl->setForwardDecl(false); @@ -482,7 +482,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, } CheckObjCDeclScope(IDecl); - return IDecl; + return ActOnObjCContainerStartDefinition(IDecl); } /// ActOnCompatiblityAlias - this action is called after complete parsing of @@ -578,7 +578,7 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, Diag(PDecl->getLocation(), diag::note_previous_definition); // Just return the protocol we already had. // FIXME: don't leak the objects passed in! - return PDecl; + return ActOnObjCContainerStartDefinition(PDecl); } ObjCList<ObjCProtocolDecl> PList; PList.set((ObjCProtocolDecl *const*)ProtoRefs, NumProtoRefs, Context); @@ -611,7 +611,7 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, } CheckObjCDeclScope(PDecl); - return PDecl; + return ActOnObjCContainerStartDefinition(PDecl); } /// FindProtocolDeclaration - This routine looks up protocols and @@ -741,7 +741,7 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, ClassLoc, CategoryLoc, CategoryName,IDecl); CDecl->setInvalidDecl(); Diag(ClassLoc, diag::err_undef_interface) << ClassName; - return CDecl; + return ActOnObjCContainerStartDefinition(CDecl); } if (!CategoryName && IDecl->getImplementation()) { @@ -783,7 +783,7 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, } CheckObjCDeclScope(CDecl); - return CDecl; + return ActOnObjCContainerStartDefinition(CDecl); } /// ActOnStartCategoryImplementation - Perform semantic checks on the @@ -836,7 +836,7 @@ Decl *Sema::ActOnStartCategoryImplementation( } CheckObjCDeclScope(CDecl); - return CDecl; + return ActOnObjCContainerStartDefinition(CDecl); } Decl *Sema::ActOnStartClassImplementation( @@ -930,7 +930,7 @@ Decl *Sema::ActOnStartClassImplementation( ClassLoc, AtClassImplLoc); if (CheckObjCDeclScope(IMPDecl)) - return IMPDecl; + return ActOnObjCContainerStartDefinition(IMPDecl); // Check that there is no duplicate implementation of this class. if (IDecl->getImplementation()) { @@ -947,7 +947,7 @@ Decl *Sema::ActOnStartClassImplementation( dyn_cast<NamedDecl>(IDecl), IMPDecl->getLocation(), 1); } - return IMPDecl; + return ActOnObjCContainerStartDefinition(IMPDecl); } void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, |