Lines Matching full:fallthrough
3 // This is the latest version of fallthrough that we support.
4 _Static_assert(__has_c_attribute(fallthrough) == 201910L);
10 [[fallthrough]]; // ok in f()
13 [[fallthrough]]; // ok in f()
19 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f()
22 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f()
25 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f()
27 do [[fallthrough]]; while (1); // expected-error {{does not directly precede switch label}} in f()
29 do [[fallthrough]]; while (0); // expected-error {{does not directly precede switch label}} in f()
35 [[fallthrough]]; in f()
38 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f()
43 case 10: // no warning, -Wimplicit-fallthrough is not enabled in this test, and does not need to in f()
49 [[fallthrough]] typedef int n1; // expected-error {{'fallthrough' attribute cannot be applied to a …
50 typedef int [[fallthrough]] n2; // expected-error {{'fallthrough' attribute cannot be applied to ty…
51 typedef int n3 [[fallthrough]]; // expected-error {{'fallthrough' attribute cannot be applied to a …
53 enum [[fallthrough]] E { // expected-error {{'fallthrough' attribute cannot be applied to a declara…
56 struct [[fallthrough]] S { // expected-error {{'fallthrough' attribute cannot be applied to a decla…
60 [[fallthrough]] // expected-error {{'fallthrough' attribute cannot be applied to a declaration}}
62 …[[fallthrough]] int n; // expected-error {{'fallthrough' attribute cannot be applied to a declarat… in g()
63 …[[fallthrough]] ++n; // expected-error {{'fallthrough' attribute only applies to empty statements}} in g()
67 [[fallthrough]]; in g()
71 [[fallthrough, fallthrough]]; // ok in g()
73 [[fallthrough(0)]]; // expected-error {{argument list}} in g()