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
|
@ -1402,6 +1402,9 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
|
||||||
CXXScopeSpec SelfScopeSpec;
|
CXXScopeSpec SelfScopeSpec;
|
||||||
ExprResult SelfExpr = ActOnIdExpression(S, SelfScopeSpec,
|
ExprResult SelfExpr = ActOnIdExpression(S, SelfScopeSpec,
|
||||||
SelfName, false, false);
|
SelfName, false, false);
|
||||||
|
if (SelfExpr.isInvalid())
|
||||||
|
return ExprError();
|
||||||
|
|
||||||
MarkDeclarationReferenced(Loc, IV);
|
MarkDeclarationReferenced(Loc, IV);
|
||||||
return Owned(new (Context)
|
return Owned(new (Context)
|
||||||
ObjCIvarRefExpr(IV, IV->getType(), Loc,
|
ObjCIvarRefExpr(IV, IV->getType(), Loc,
|
||||||
|
|
Loading…
Reference in New Issue