summaryrefslogtreecommitdiffstats
path: root/test/Sema/exprs.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerdim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commit39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/Sema/exprs.c
parent69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff)
downloadFreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip
FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/Sema/exprs.c')
-rw-r--r--test/Sema/exprs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 56a52be..e88f7fc 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;
+}
OpenPOWER on IntegriCloud