summaryrefslogtreecommitdiff
path: root/test/Parser/declspec-recovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/declspec-recovery.c')
-rw-r--r--test/Parser/declspec-recovery.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/declspec-recovery.c b/test/Parser/declspec-recovery.c
new file mode 100644
index 0000000000000..b256861b9f397
--- /dev/null
+++ b/test/Parser/declspec-recovery.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple i386-pc-unknown -fsyntax-only -verify %s
+
+__declspec(naked) void f(void) {} // expected-error{{'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes}}
+
+struct S {
+ __declspec(property(get=Getter, put=Setter)) int X; // expected-error{{'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes}}
+ int Y;
+};