1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2 
3 namespace N1 {
4 
5 namespace __attribute__((__abi_tag__)) {}
6 // expected-warning@-1 {{'abi_tag' attribute on non-inline namespace ignored}}
7 
8 namespace N __attribute__((__abi_tag__)) {}
9 // expected-warning@-1 {{'abi_tag' attribute on non-inline namespace ignored}}
10 
11 } // namespace N1
12 
13 namespace N2 {
14 
15 inline namespace __attribute__((__abi_tag__)) {}
16 // expected-warning@-1 {{'abi_tag' attribute on anonymous namespace ignored}}
17 
18 inline namespace N __attribute__((__abi_tag__)) {}
19 
20 } // namespcace N2
21 
22 __attribute__((abi_tag("B", "A"))) extern int a1;
23 
24 __attribute__((abi_tag("A", "B"))) extern int a1;
25 // expected-note@-1 {{previous declaration is here}}
26 
27 __attribute__((abi_tag("A", "C"))) extern int a1;
28 // expected-error@-1 {{'abi_tag' C missing in original declaration}}
29 
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}}
34