[cfe-commits] r64893 - /cfe/trunk/lib/Parse/ParseObjc.cpp

Chris Lattner sabre at nondot.org
Tue Feb 17 21:56:09 PST 2009


Author: lattner
Date: Tue Feb 17 23:56:09 2009
New Revision: 64893

URL: http://llvm.org/viewvc/llvm-project?rev=64893&view=rev
Log:
simplify some code.

Modified:
    cfe/trunk/lib/Parse/ParseObjc.cpp

Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=64893&r1=64892&r2=64893&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Tue Feb 17 23:56:09 2009
@@ -1600,12 +1600,10 @@
     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);
 





More information about the cfe-commits mailing list