summaryrefslogtreecommitdiffstats
path: root/test/Parser/captured-statements.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/captured-statements.c')
-rw-r--r--test/Parser/captured-statements.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Parser/captured-statements.c b/test/Parser/captured-statements.c
new file mode 100644
index 0000000..30dddb5
--- /dev/null
+++ b/test/Parser/captured-statements.c
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -verify %s
+
+void test1()
+{
+ #pragma clang __debug captured x // expected-warning {{extra tokens at end of #pragma clang __debug captured directive}}
+ {
+ }
+}
+
+void test2()
+{
+ #pragma clang __debug captured
+ int x; // expected-error {{expected '{'}}
+}
OpenPOWER on IntegriCloud