aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-02-26 18:16:19 +0000
committerSteve Naroff <snaroff@apple.com>2009-02-26 18:16:19 +0000
commit1f484f4aef0ea52b920e568e0c1fa2cbdfe98957 (patch)
tree3d6b42a2832f53ca13cd052fe782656d8371a961 /lib
parentb06b0127c70def475fb46c27ff9ff1a6d196c345 (diff)
Fix <rdar://problem/6614945> method not found.
This was a fairly recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExprObjC.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index e3d2074c0e..5be84607b2 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -395,10 +395,10 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
}
if (Method && DiagnoseUseOfDecl(Method, receiverLoc))
return true;
- } else {
- // We're not in a method context, look for any factory method named 'Sel'.
- Method = FactoryMethodPool[Sel].Method;
}
+ // Look for any factory method named 'Sel'.
+ if (!Method)
+ Method = FactoryMethodPool[Sel].Method;
if (!Method)
Method = LookupInstanceMethodInGlobalPool(
Sel, SourceRange(lbrac,rbrac));