summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/exprs.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-12 07:14:40 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-12 07:14:40 +0000
commit73d3618223f2081eedcee2dbc4b6f89c4e942214 (patch)
treefd8bf87d69fd2a5395274cd07aa511625c83fcbc /clang/test/Sema/exprs.c
parent7cd5cda6bb3e7356392fc6f80ec75d27547029d1 (diff)
downloadbcm5719-llvm-73d3618223f2081eedcee2dbc4b6f89c4e942214.tar.gz
bcm5719-llvm-73d3618223f2081eedcee2dbc4b6f89c4e942214.zip
C's comma operator performs lvalue conversion on both its operands;
require them to have complete types. llvm-svn: 116297
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r--clang/test/Sema/exprs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c
index 56a52bed1bc..d6e17ff6ecc 100644
--- a/clang/test/Sema/exprs.c
+++ b/clang/test/Sema/exprs.c
@@ -150,3 +150,10 @@ int test20(int x) {
// no warning, this is an idiom for "true" in old C style.
return x && (signed char)1;
}
+
+struct Test21; // expected-note 2 {{forward declaration}}
+void test21(volatile struct Test21 *ptr) {
+ void test21_help(void);
+ (test21_help(), *ptr); // expected-error {{incomplete type 'struct Test21' where a complete type is required}}
+ (*ptr, test21_help()); // expected-error {{incomplete type 'struct Test21' where a complete type is required}}
+}
OpenPOWER on IntegriCloud