forked from OSchip/llvm-project
Fix a hard-to-reproduce crash-on-invalid, where we weren't checking for a valid result from ActOnIdExpression
llvm-svn: 114548
This commit is contained in:
parent
3030b2f1ab
commit
a1ed39be76
|
@ -1401,7 +1401,10 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
|
|||
SelfName.setIdentifier(&II, SourceLocation());
|
||||
CXXScopeSpec SelfScopeSpec;
|
||||
ExprResult SelfExpr = ActOnIdExpression(S, SelfScopeSpec,
|
||||
SelfName, false, false);
|
||||
SelfName, false, false);
|
||||
if (SelfExpr.isInvalid())
|
||||
return ExprError();
|
||||
|
||||
MarkDeclarationReferenced(Loc, IV);
|
||||
return Owned(new (Context)
|
||||
ObjCIvarRefExpr(IV, IV->getType(), Loc,
|
||||
|
|
Loading…
Reference in New Issue