diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-03-26 20:59:26 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-03-26 20:59:26 +0000 |
commit | ec762bda73346280d1c7cb7275af53b916dad2ba (patch) | |
tree | 476b63114912901b95a006c21cf9bf9b4a75e651 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 84aa5e555ff1b51ffd4ca3acc1c04505aa3f7b96 (diff) | |
download | bcm5719-llvm-ec762bda73346280d1c7cb7275af53b916dad2ba.tar.gz bcm5719-llvm-ec762bda73346280d1c7cb7275af53b916dad2ba.zip |
Objective-C. Fixes a bogus warning on unimplemented
selectors because we were not going through entire
elements in list of all implemented selectors.
// rdar://16428638
llvm-svn: 204852
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 5be26a91a24..d59dd8b9950 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -2402,11 +2402,15 @@ ObjCMethodDecl *Sema::LookupImplementedMethodInGlobalPool(Selector Sel) { return 0; GlobalMethods &Methods = Pos->second; - - if (Methods.first.Method && Methods.first.Method->isDefined()) - return Methods.first.Method; - if (Methods.second.Method && Methods.second.Method->isDefined()) - return Methods.second.Method; + for (const ObjCMethodList *Method = &Methods.first; Method; + Method = Method->getNext()) + if (Method->Method && Method->Method->isDefined()) + return Method->Method; + + for (const ObjCMethodList *Method = &Methods.second; Method; + Method = Method->getNext()) + if (Method->Method && Method->Method->isDefined()) + return Method->Method; return 0; } |