summaryrefslogtreecommitdiffstats
path: root/test/Sema/illegal-types.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/illegal-types.c')
-rw-r--r--test/Sema/illegal-types.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/illegal-types.c b/test/Sema/illegal-types.c
new file mode 100644
index 0000000..c932bb2
--- /dev/null
+++ b/test/Sema/illegal-types.c
@@ -0,0 +1,7 @@
+// RUN: clang-cc -fsyntax-only -verify -std=c++98 %s
+
+void a (void []()); // expected-error{{'type name' declared as array of functions}}
+void b (void p[]()); // expected-error{{'p' declared as array of functions}}
+void c (int &[]); // expected-error{{'type name' declared as array of references}}
+void d (int &p[]); // expected-error{{'p' declared as array of references}}
+
OpenPOWER on IntegriCloud