]> granicus.if.org Git - clang/commitdiff
Make sure to check the value of the constant expression, as suggested by Daniel.
authorAnders Carlsson <andersca@mac.com>
Thu, 19 Feb 2009 06:19:15 +0000 (06:19 +0000)
committerAnders Carlsson <andersca@mac.com>
Thu, 19 Feb 2009 06:19:15 +0000 (06:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65021 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/const-eval.c

index a56504151cb0e2de6a17f28c9f9297e2feb2ceeb..4fd2a558519d470801ddff53c2035197c508f5c7 100644 (file)
@@ -33,4 +33,4 @@ _Complex float g16 = (1.0f + 1.0fi);
 // ?: in constant expressions.
 int g17[(3?:1) - 2]; 
 
-EVAL_EXPR(18, (int)((void*)10 + 10));
+EVAL_EXPR(18, ((int)((void*)10 + 10)) == 20 ? 1 : -1);