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