1 // RUN: %clang_cc1 -verify %s
6 [[clang::preferred_type(E
)]] unsigned b
: 2;
7 [[clang::preferred_type(E
)]] int b2
: 2;
8 [[clang::preferred_type(E2
)]] const unsigned b3
: 2;
9 [[clang::preferred_type(bool)]] unsigned b4
: 1;
10 [[clang::preferred_type(bool)]] unsigned b5
: 2;
11 [[clang::preferred_type()]] unsigned b6
: 2;
12 // expected-error@-1 {{'preferred_type' attribute takes one argument}}
13 [[clang::preferred_type
]] unsigned b7
: 2;
14 // expected-error@-1 {{'preferred_type' attribute takes one argument}}
15 [[clang::preferred_type(E
, int)]] unsigned b8
: 2;
16 // expected-error@-1 {{expected ')'}}
17 // expected-error@-2 {{expected ','}}
18 // expected-warning@-3 {{unknown attribute 'int' ignored}}