aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx1z-attributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx1z-attributes.cpp')
-rw-r--r--test/Parser/cxx1z-attributes.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Parser/cxx1z-attributes.cpp b/test/Parser/cxx1z-attributes.cpp
new file mode 100644
index 000000000000..1267091ab253
--- /dev/null
+++ b/test/Parser/cxx1z-attributes.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s
+
+namespace [[]] foo {}
+namespace [[]] {}
+namespace [[]] bad = foo; // expected-error {{attributes cannot be specified on namespace alias}}
+
+namespace [[]] A::B {} // expected-error {{attributes cannot be specified on a nested namespace definition}}
+
+enum test {
+ bing [[]],
+ bar [[]] = 1,
+ baz [[]][[]],
+ quux [[]][[]] = 4
+};