xref: /minix3/external/bsd/llvm/dist/clang/test/Parser/cxx1z-attributes.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc namespace [[]] foo {}
4*0a6a1f1dSLionel Sambuc namespace [[]] {}
5*0a6a1f1dSLionel Sambuc namespace [[]] bad = foo; // expected-error {{attributes cannot be specified on namespace alias}}
6*0a6a1f1dSLionel Sambuc 
7*0a6a1f1dSLionel Sambuc namespace [[]] A::B {} // expected-error {{attributes cannot be specified on a nested namespace definition}}
8*0a6a1f1dSLionel Sambuc 
9*0a6a1f1dSLionel Sambuc enum test {
10*0a6a1f1dSLionel Sambuc   bing [[]],
11*0a6a1f1dSLionel Sambuc   bar [[]] = 1,
12*0a6a1f1dSLionel Sambuc   baz [[]][[]],
13*0a6a1f1dSLionel Sambuc   quux [[]][[]] = 4
14*0a6a1f1dSLionel Sambuc };
15