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