]> granicus.if.org Git - clang/commitdiff
Emit the correct diagnostic when a comma is in an ICE.
authorAnders Carlsson <andersca@mac.com>
Mon, 1 Dec 2008 02:07:06 +0000 (02:07 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 1 Dec 2008 02:07:06 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60316 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprConstant.cpp

index 855385cf988c3e08d8bed845cc7186a6495c8c75..b9f3c77363aff953dd3959866815a87991de5e53 100644 (file)
@@ -516,13 +516,13 @@ bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {
     // 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()) {