aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 4e4d009fe0..a147ee47e8 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -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);