1 // RUN: %clang_cc1 -std=c++17 -verify %s 2 3 namespace __attribute__(()) A 4 { 5 } 6 7 namespace A __attribute__(()) 8 { 9 } 10 11 namespace __attribute__(()) [[]] A 12 { 13 } 14 15 namespace [[]] __attribute__(()) A 16 { 17 } 18 19 namespace A __attribute__(()) [[]] 20 { 21 } 22 23 namespace A [[]] __attribute__(()) 24 { 25 } 26 27 namespace [[]] A __attribute__(()) 28 { 29 } 30 31 namespace __attribute__(()) A [[]] 32 { 33 } 34 35 namespace A::B __attribute__(()) // expected-error{{attributes cannot be specified on a nested namespace definition}} 36 { 37 } 38 39 namespace __attribute__(()) A::B // expected-error{{attributes cannot be specified on a nested namespace definition}} 40 { 41 } 42