simplify some code.

llvm-svn: 64893
This commit is contained in:
Chris Lattner 2009-02-18 05:56:09 +00:00
parent 630970ddb8
commit d3b5d5d1df
1 changed files with 3 additions and 5 deletions

View File

@ -1600,12 +1600,10 @@ Parser::OwningExprResult Parser::ParseObjCStringLiteral(SourceLocation AtLoc) {
AtLocs.push_back(ConsumeToken()); // eat the @.
// Invalid unless there is a string literal.
OwningExprResult Lit(Actions, true);
if (isTokenStringLiteral())
Lit = ParseStringLiteralExpression();
else
Diag(Tok, diag::err_objc_concat_string);
if (!isTokenStringLiteral())
return ExprError(Diag(Tok, diag::err_objc_concat_string));
OwningExprResult Lit(ParseStringLiteralExpression());
if (Lit.isInvalid())
return move(Lit);