diff options
author | Anna Zaks <ganna@apple.com> | 2012-07-27 19:07:44 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-07-27 19:07:44 +0000 |
commit | c77a3b1aab7aebda612463fae7dbdb41ffe9466c (patch) | |
tree | 96a96b87d5193d37bf457cc53d914877289a4aba /clang/lib/Sema/SemaStmt.cpp | |
parent | 8e3b2603137c7740db4c1c3f791ceee68991b1de (diff) | |
download | bcm5719-llvm-c77a3b1aab7aebda612463fae7dbdb41ffe9466c.tar.gz bcm5719-llvm-c77a3b1aab7aebda612463fae7dbdb41ffe9466c.zip |
Consolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC.
Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.
Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.
llvm-svn: 160885
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 9affe9823a0..4612930d45c 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -1481,7 +1481,7 @@ Sema::CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection) { // If there's an interface, look in both the public and private APIs. if (iface) { method = iface->lookupInstanceMethod(selector); - if (!method) method = LookupPrivateInstanceMethod(selector, iface); + if (!method) method = iface->lookupPrivateMethod(selector); } // Also check protocol qualifiers. |