diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-02-26 18:16:19 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-02-26 18:16:19 +0000 |
| commit | 42ab0dd1eef7cce0f85d12fcada12cf8c1b6afc4 (patch) | |
| tree | 3b00b5a5becf896d658376ed0dafb31c4b2af34c /clang/lib | |
| parent | 58ac0b4bac3a11b0363b899e51578f6c22cf75b9 (diff) | |
| download | bcm5719-llvm-42ab0dd1eef7cce0f85d12fcada12cf8c1b6afc4.tar.gz bcm5719-llvm-42ab0dd1eef7cce0f85d12fcada12cf8c1b6afc4.zip | |
Fix <rdar://problem/6614945> method not found.
This was a fairly recent regression.
llvm-svn: 65547
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index e3d2074c0e2..5be84607b2a 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/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)); |

