forked from OSchip/llvm-project
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:
parent
879c90807d
commit
223ca5c9ab
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue