aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-28 14:55:53 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-28 14:55:53 +0000
commite84a864a7871243d7c60441f399a309dea076f5c (patch)
treebc983110d429175344ccb11d7a16c77766843656 /lib/Sema/SemaExprObjC.cpp
parentae530cfaf65e36fdcecb16d072422eb3d2a4518e (diff)
Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 390baed9a3..a2a3992bab 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -233,6 +233,14 @@ Sema::ExprResult Sema::ActOnClassMessage(
if (ObjCImplementationDecl *ImpDecl =
ObjCImplementations[ClassDecl->getIdentifier()])
Method = ImpDecl->getClassMethod(Sel);
+
+ // Look through local category implementations associated with the class.
+ if (!Method) {
+ for (unsigned i = 0; i < ObjCCategoryImpls.size() && !Method; i++) {
+ if (ObjCCategoryImpls[i]->getClassInterface() == ClassDecl)
+ Method = ObjCCategoryImpls[i]->getClassMethod(Sel);
+ }
+ }
}
// Before we give up, check if the selector is an instance method.
if (!Method)