diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2013-08-14 23:58:55 +0000 | 
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-08-14 23:58:55 +0000 | 
| commit | 8181caa44ed14be2eaa8ddacb17e5264012020c0 (patch) | |
| tree | 09a4459ecee532e29fbeaff570f2456eb2547ca3 /clang/lib | |
| parent | 9d8103de7ace78b609c3320244f38240c1299374 (diff) | |
| download | bcm5719-llvm-8181caa44ed14be2eaa8ddacb17e5264012020c0.tar.gz bcm5719-llvm-8181caa44ed14be2eaa8ddacb17e5264012020c0.zip | |
ObjectiveC [Sema]. This patch makes sure that all inherited
properties (direct or indirect) setter/getter (or declared 
methods as well) are seen by the method implementation type 
matching logic before declaration of method in super class 
is seen. This fixes the warning coming out of that method mismatch.
// rdar://14650159
llvm-svn: 188438
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 93620a1d82c..aa6eff700d7 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -1773,6 +1773,16 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap,      }    } +  if (ObjCProtocolDecl *PD = dyn_cast<ObjCProtocolDecl> (CDecl)) { +    // Also, check for methods declared in protocols inherited by +    // this protocol. +    for (ObjCProtocolDecl::protocol_iterator +          PI = PD->protocol_begin(), E = PD->protocol_end(); PI != E; ++PI) +      MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen, +                                 IMPDecl, (*PI), IncompleteImpl, false, +                                 WarnCategoryMethodImpl); +  } +      if (ObjCInterfaceDecl *I = dyn_cast<ObjCInterfaceDecl> (CDecl)) {      // when checking that methods in implementation match their declaration,      // i.e. when WarnCategoryMethodImpl is false, check declarations in class | 

