[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / attr-abi-tag-syntax.cpp
blob4f14a3c043b5cf34b6cbc2b69ef6f0251ea16235
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 namespace N1 {
5 namespace __attribute__((__abi_tag__)) {}
6 // expected-warning@-1 {{'abi_tag' attribute on non-inline namespace ignored}}
8 namespace N __attribute__((__abi_tag__)) {}
9 // expected-warning@-1 {{'abi_tag' attribute on non-inline namespace ignored}}
11 } // namespace N1
13 namespace N2 {
15 inline namespace __attribute__((__abi_tag__)) {}
16 // expected-warning@-1 {{'abi_tag' attribute on anonymous namespace ignored}}
18 inline namespace N __attribute__((__abi_tag__)) {}
20 } // namespcace N2
22 __attribute__((abi_tag("B", "A"))) extern int a1;
24 __attribute__((abi_tag("A", "B"))) extern int a1;
25 // expected-note@-1 {{previous declaration is here}}
27 __attribute__((abi_tag("A", "C"))) extern int a1;
28 // expected-error@-1 {{'abi_tag' C missing in original declaration}}
30 extern int a2;
31 // expected-note@-1 {{previous declaration is here}}
32 __attribute__((abi_tag("A")))extern int a2;
33 // expected-error@-1 {{cannot add 'abi_tag' attribute in a redeclaration}}