| // RUN: %clang_cc1 -x c++ %s -verify |
| void fallthrough(int n) { |
| case 3: // warning on fallthrough discouraged |
| [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} |
| [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} |
| [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} |
| case 4: // implementation may warn on fallthrough |
| [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} |