From 3a43754329bfd08939e43fc8642e8902ef32f103 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 13 Oct 2015 23:27:34 +0000 Subject: [Sema/objc] When checking for unimplemented methods treat methods from class extensions as continuation of the class interface. llvm-svn: 250250 --- clang/lib/Sema/SemaDeclObjC.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/lib/Sema/SemaDeclObjC.cpp') 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(CDecl)) { // For extended class, unimplemented methods in its protocols will // be reported in the primary class. -- cgit v1.2.3