1 // RUN: %clang_cc1 %s -fsyntax-only -fdouble-square-bracket-attributes -verify
8 [[clang::likely
]] int x
= 42; // expected-error {{'likely' attribute cannot be applied to a declaration}}
11 [[clang::unlikely
]] {}
19 [[clang::likely
]] case 2 : case 3 : {}
27 [[clang::unlikely
]] {}
29 do { // expected-note {{to match this 'do'}}
31 [[clang::unlikely
]] while (x
); // expected-error {{expected 'while' in do/while loop}}
33 [[clang::unlikely
]] {}
38 [[clang::unlikely
]] {}
46 // FIXME: allow the attribute on the label
47 [[clang::unlikely
]] lbl
: // expected-error {{'unlikely' attribute cannot be applied to a declaration}}
48 [[clang::likely
]] x
= x
+ 1;
50 [[clang::likely
]]++ x
;