diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-10-13 23:27:34 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-10-13 23:27:34 +0000 |
commit | 3a43754329bfd08939e43fc8642e8902ef32f103 (patch) | |
tree | 310976e099ae74d7be9a0ccc85ac058690ef2103 /clang/lib/Sema | |
parent | 87156d25bc07c415ab429b02b43c459cd23f5b9d (diff) | |
download | bcm5719-llvm-3a43754329bfd08939e43fc8642e8902ef32f103.tar.gz bcm5719-llvm-3a43754329bfd08939e43fc8642e8902ef32f103.zip |
[Sema/objc] When checking for unimplemented methods treat methods from class extensions as continuation of the class interface.
llvm-svn: 250250
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 0ce463be6a1..8217ba811ea 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -2773,7 +2773,8 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap, if (!WarnCategoryMethodImpl) { for (auto *Cat : I->visible_categories()) MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen, - IMPDecl, Cat, IncompleteImpl, false, + IMPDecl, Cat, IncompleteImpl, + ImmediateClass && Cat->IsClassExtension(), WarnCategoryMethodImpl); } else { // Also methods in class extensions need be looked at next. @@ -2890,9 +2891,6 @@ void Sema::ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl, for (auto *PI : I->all_referenced_protocols()) CheckProtocolMethodDefs(*this, IMPDecl->getLocation(), PI, IncompleteImpl, InsMap, ClsMap, I, ExplicitImplProtocols); - // Check class extensions (unnamed categories) - for (auto *Ext : I->visible_extensions()) - ImplMethodsVsClassMethods(S, IMPDecl, Ext, IncompleteImpl); } else if (ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl)) { // For extended class, unimplemented methods in its protocols will // be reported in the primary class. |