1 // RUN: %clang_cc1 -std=c++2a %s -verify -triple x86_64-linux-gnu
2 // RUN: %clang_cc1 -std=c++2a %s -verify=unsupported -triple x86_64-windows
3 
4 [[no_unique_address]] int a; // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
5 [[no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
6 struct [[no_unique_address]] S { // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
7   [[no_unique_address]] int a; // unsupported-warning {{unknown}}
8   [[no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
9   [[no_unique_address]] static int sa;// expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
10   [[no_unique_address]] static void sf(); // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
11   [[no_unique_address]] int b : 3; // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
12 
13   [[no_unique_address, no_unique_address]] int duplicated; // expected-error {{cannot appear multiple times}}
14   // unsupported-error@-1 {{cannot appear multiple times}} unsupported-warning@-1 2{{unknown}}
15   [[no_unique_address]] [[no_unique_address]] int duplicated2; // unsupported-warning 2{{unknown}}
16   [[no_unique_address()]] int arglist; // expected-error {{cannot have an argument list}} unsupported-warning {{unknown}}
17 
18   int [[no_unique_address]] c; // expected-error {{cannot be applied to types}} unsupported-error {{cannot be applied to types}}
19 };
20