aboutsummaryrefslogtreecommitdiff
path: root/test/Sema
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
commitcf2e5063ae7e7ed3f8d86bb426b2208e242128ab (patch)
treea6b13804b9eb96acb8ab82ae7e976020a4c1efa7 /test/Sema
parentf9c5afb8df90d2711fdb0d3699aba99f1db0b848 (diff)
C's comma operator performs lvalue conversion on both its operands;
require them to have complete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r--test/Sema/exprs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 56a52bed1b..d6e17ff6ec 100644
--- a/test/Sema/exprs.c
+++ b/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}}
+}