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:
Douglas Gregor 2010-09-22 16:33:13 +00:00
parent 3030b2f1ab
commit a1ed39be76
1 changed files with 4 additions and 1 deletions

View File

@ -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,