[cfe-commits] r60316 - /cfe/trunk/lib/AST/ExprConstant.cpp

Anders Carlsson andersca at mac.com
Sun Nov 30 18:07:06 PST 2008


Author: andersca
Date: Sun Nov 30 20:07:06 2008
New Revision: 60316

URL: http://llvm.org/viewvc/llvm-project?rev=60316&view=rev
Log:
Emit the correct diagnostic when a comma is in an ICE.

Modified:
    cfe/trunk/lib/AST/ExprConstant.cpp

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=60316&r1=60315&r2=60316&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Sun Nov 30 20:07:06 2008
@@ -516,13 +516,13 @@
     // Evaluate the side that actually matters; this needs to be
     // handled specially because calling Visit() on the LHS can
     // have strange results when it doesn't have an integral type.
-    if (Visit(E->getRHS()))
-      return true;
-
+    if (!Visit(E->getRHS()))
+      return false;
+    
     if (Info.ShortCircuit)
       return Extension(E->getOperatorLoc(), diag::note_comma_in_ice, E);
 
-    return false;
+    return true;
   }
 
   if (E->isLogicalOp()) {





More information about the cfe-commits mailing list