summaryrefslogtreecommitdiff
path: root/test/SemaCXX/attr-cxx-disabled.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/attr-cxx-disabled.cpp')
-rw-r--r--test/SemaCXX/attr-cxx-disabled.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/attr-cxx-disabled.cpp b/test/SemaCXX/attr-cxx-disabled.cpp
new file mode 100644
index 000000000000..a1a7533bd854
--- /dev/null
+++ b/test/SemaCXX/attr-cxx-disabled.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -fno-double-square-bracket-attributes -verify -pedantic -std=c++11 -DERRORS %s
+// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify -pedantic -std=c++11 %s
+
+struct [[]] S {};
+
+#ifdef ERRORS
+// expected-error@-3 {{declaration of anonymous struct must be a definition}}
+// expected-warning@-4 {{declaration does not declare anything}}
+#else
+// expected-no-diagnostics
+#endif
+