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()) {


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to