diff options
Diffstat (limited to 'test/Sema/exprs.c')
-rw-r--r-- | test/Sema/exprs.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c index 56a52bed1bc3..e88f7fc08bce 100644 --- a/test/Sema/exprs.c +++ b/test/Sema/exprs.c @@ -150,3 +150,19 @@ 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}} +} + +// Make sure we do function/array decay. +void test22() { + if ("help") + (void) 0; + + if (test22) + (void) 0; +} |