aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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));