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

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