aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-10-08 22:59:25 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-10-08 22:59:25 +0000
commitf54e3aec8a12c3ce453b1012e686c4b88881564a (patch)
treec33ef3765b7d926066800cc2be67d98b7855174c /lib/Sema/SemaDeclObjC.cpp
parent90fe4bc75d7fe0a68fd858b278221101787320da (diff)
Method implemented in class's implementation may implement
one declared in class's extension and not one declared in class's superclass. This supresses a bogus warning on method type mismatch. Fixes //rdar: // 8530080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 09502a4923..74bd00340c 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -924,7 +924,16 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap,
WarnConflictingTypedMethods(ImpMethodDecl, IntfMethodDecl);
}
}
+
if (ObjCInterfaceDecl *I = dyn_cast<ObjCInterfaceDecl> (CDecl)) {
+ // Also methods in class extensions need be looked at next.
+ for (const ObjCCategoryDecl *ClsExtDecl = I->getFirstClassExtension();
+ ClsExtDecl; ClsExtDecl = ClsExtDecl->getNextClassExtension())
+ MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen,
+ IMPDecl,
+ const_cast<ObjCCategoryDecl *>(ClsExtDecl),
+ IncompleteImpl, false);
+
// Check for any implementation of a methods declared in protocol.
for (ObjCInterfaceDecl::all_protocol_iterator
PI = I->all_referenced_protocol_begin(),