diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:27 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:27 +0000 |
commit | c281c966758b5a6a362d730a688917a78034af5a (patch) | |
tree | ba4fe82a310a79d8591c295545e421d26ec361c9 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 9321ad3f970714e3ca40d7c3461ff3acdbf8f7e7 (diff) | |
download | bcm5719-llvm-c281c966758b5a6a362d730a688917a78034af5a.tar.gz bcm5719-llvm-c281c966758b5a6a362d730a688917a78034af5a.zip |
Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078
llvm-svn: 141335
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 1a1ac2eccf1..af2eb1287b3 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -770,9 +770,6 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, // FIXME: PushOnScopeChains? CurContext->addDecl(CDecl); - // If the interface is deprecated, warn about it. - (void)DiagnoseUseOfDecl(IDecl, ClassLoc); - if (NumProtoRefs) { CDecl->setProtocolList((ObjCProtocolDecl**)ProtoRefs, NumProtoRefs, ProtoLocs, Context); @@ -818,6 +815,10 @@ Decl *Sema::ActOnStartCategoryImplementation( // FIXME: PushOnScopeChains? CurContext->addDecl(CDecl); + // If the interface is deprecated/unavailable, warn/error about it. + if (IDecl) + DiagnoseUseOfDecl(IDecl, ClassLoc); + /// Check that CatName, category name, is not used in another implementation. if (CatIDecl) { if (CatIDecl->getImplementation()) { |