summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/expr-comma.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-25 20:02:29 +0000
committerChris Lattner <sabre@nondot.org>2008-07-25 20:02:29 +0000
commite174acc910c38118d1f6c0c60f9b0ee6621c7939 (patch)
tree89560b34ae13c53695f653efd6108f9d12dfdf34 /clang/test/Sema/expr-comma.c
parente08e47ab2f467e35386345029fc79c6e5fee9b01 (diff)
downloadbcm5719-llvm-e174acc910c38118d1f6c0c60f9b0ee6621c7939.tar.gz
bcm5719-llvm-e174acc910c38118d1f6c0c60f9b0ee6621c7939.zip
Comma does not perform unary promotions, rdar://6095180
llvm-svn: 54045
Diffstat (limited to 'clang/test/Sema/expr-comma.c')
-rw-r--r--clang/test/Sema/expr-comma.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Sema/expr-comma.c b/clang/test/Sema/expr-comma.c
new file mode 100644
index 00000000000..7a601e9b3d6
--- /dev/null
+++ b/clang/test/Sema/expr-comma.c
@@ -0,0 +1,11 @@
+// RUN: clang %s -fsyntax-only -verify
+// rdar://6095180
+
+#include <assert.h>
+struct s { char c[17]; };
+extern struct s foo (void);
+
+// sizeof 'c' should be 17, not sizeof(char*).
+int X[sizeof(0, (foo().c)) == 17 ? 1 : -1];
+
+
OpenPOWER on IntegriCloud