summaryrefslogtreecommitdiff
path: root/test/CodeGen/exprs.c
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-11-16 20:09:07 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-11-16 20:09:07 +0000
commitf9ef0c675b12ab53fdd6c4e3e7226d066d293e99 (patch)
treef9cc2f8c04ae7278a53d77d737f183f0895fc7f1 /test/CodeGen/exprs.c
parentca7c2eaca35edac066ab7cec15f7ecebbb3731d8 (diff)
downloadclang-f9ef0c675b12ab53fdd6c4e3e7226d066d293e99.tar.gz
fix folding of comma if given a non-constant operand.
Eli please take a look, as I'm not sure if this gets the extension warning in the right place git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/exprs.c')
-rw-r--r--test/CodeGen/exprs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/exprs.c b/test/CodeGen/exprs.c
index f1c9a5d73f..275c988ab9 100644
--- a/test/CodeGen/exprs.c
+++ b/test/CodeGen/exprs.c
@@ -39,3 +39,9 @@ int test5(const float x, float float_number) {
return __builtin_isless(x, float_number);
}
+// this one shouldn't fold
+int ola() {
+ int a=2;
+ if ((0, (int)a) & 2) { return 1; }
+ return 2;
+}