Prevent crash on multiple user errors (which I cannot reproduce in

a small test case). // rdar://13178483.

llvm-svn: 175450
This commit is contained in:
Fariborz Jahanian 2013-02-18 17:22:23 +00:00
parent 879c90807d
commit 223ca5c9ab
1 changed files with 4 additions and 0 deletions

View File

@ -1976,6 +1976,10 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
IdentifierInfo *II, bool AllowBuiltinCreation) {
SourceLocation Loc = Lookup.getNameLoc();
ObjCMethodDecl *CurMethod = getCurMethodDecl();
// Check for error condition which is already reported.
if (!CurMethod)
return ExprError();
// There are two cases to handle here. 1) scoped lookup could have failed,
// in which case we should look for an ivar. 2) scoped lookup could have