• Home
  • Raw
  • Download

Lines Matching +full:clang +full:- +full:3

1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough %s
6 if (n - 1) { in fallthrough()
8 } else if (n - 2) { in fallthrough()
10 } else if (n - 3) { in fallthrough()
13 case -1: // no warning here, ignore fall-through from unreachable code in fallthrough()
15-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthr… in fallthrough()
17-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthr… in fallthrough()
193: // expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[… in fallthrough()
22-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthr… in fallthrough()
25-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthr… in fallthrough()
34-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthr… in fallthrough()
36 …case 66: // expected-warning{{unannotated fall-through between switch labels}} expected-note{{ins… in fallthrough()
55 [[clang::fallthrough]]; in fallthrough()
56 case 9: // no warning here, intended fall-through marked with an attribute in fallthrough()
58 [[clang::fallthrough]]; in fallthrough()
59 default: { // no warning here, intended fall-through marked with an attribute in fallthrough()
63 [[clang::fallthrough]]; in fallthrough()
66 case 10: // no warning here, intended fall-through marked with an attribute in fallthrough()
67 if (n % 3 == 0) { in fallthrough()
68 n %= 3; in fallthrough()
70 [[clang::fallthrough]]; in fallthrough()
72 …case 110: // expected-warning{{unannotated fall-through between switch labels}} but no fix-it hin… in fallthrough()
77 case 12: // no warning here, intended fall-through, no statement between labels in fallthrough()
87 case 15: // no warning here, there's no fall-through in fallthrough()
98 case 19: { // no warning here, there's no fall-through in fallthrough()
100 return 3; in fallthrough()
102 case 21: { // no warning here, there's no fall-through in fallthrough()
105 case 23: // no warning here, there's no fall-through in fallthrough()
108 case 25: // no warning here, there's no fall-through in fallthrough()
127 default: // no warning here, there's no fall-through in fallthrough2()
143 case 3: in fallthrough3()
154 …MY_SWITCH(n, 13, n *= 2, 14, break) // expected-warning{{unannotated fall-through between switch … in fallthrough_macro1()
158 MY_CASE(44, break); // expected-warning{{unannotated fall-through between switch labels}} in fallthrough_macro1()
159 MY_CASE(55, n += 3); in fallthrough_macro1()
162 switch (n + 3) { in fallthrough_macro1()
164 …MY_CASE2(444, n += 44, 4444, break); // expected-warning{{unannotated fall-through between switch… in fallthrough_macro1()
168 …MY_SWITCH2(n + 4, MY_CASE(17, n *= 3), MY_CASE(19, break)) // expected-warning{{unannotated fall- in fallthrough_macro1()
170 …_CASE(21, break), MY_CASE2(23, n *= 7, 25, break)) // expected-warning{{unannotated fall-through … in fallthrough_macro1()
183 [[clang::fallthrough]]; // expected-warning{{fallthrough annotation in unreachable code}} in fallthrough_position()
186 [[clang::fallthrough]]; // expected-warning{{fallthrough annotation in unreachable code}} in fallthrough_position()
189-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthr… in fallthrough_position()
197 [[clang::fallthrough]]; // no warning here in fallthrough_position()
200 [[clang::fallthrough]]; // no warning here in fallthrough_position()
218 [[clang::fallthrough]]; // no warning here, this shouldn't be treated as unreachable code in fallthrough_covered_enums()
237 [[clang::fallthrough]]; // no diagnostics in fallthrough_in_local_class()
241 expected-warning{{unannotated fall-through between switch labels}} \ in fallthrough_in_local_class()
242 expected-note{{insert 'break;' to avoid fall-through}} in fallthrough_in_local_class()
257 [[clang::fallthrough]]; // no diagnostics in fallthrough_in_lambda()
261 expected-warning{{unannotated fall-through between switch labels}} \ in fallthrough_in_lambda()
262 expected-note{{insert 'break;' to avoid fall-through}} in fallthrough_in_lambda()
284 [[clang::fallthrough]]; // expected-warning{{fallthrough annotation in unreachable code}} in fallthrough_placement_error()
287 …[[clang::fallthrough]]; // expected-error{{fallthrough annotation does not directly precede switch… in fallthrough_placement_error()
290 …[[clang::fallthrough]]; // expected-error{{fallthrough annotation does not directly precede switch… in fallthrough_placement_error()
292 [[clang::fallthrough]]; in fallthrough_placement_error()
294 …[[clang::fallthrough]]; // expected-error{{fallthrough annotation does not directly precede switch… in fallthrough_placement_error()
300 [[clang::fallthrough]]; // expected-error{{fallthrough annotation is outside switch statement}} in fallthrough_targets()
302 …[[clang::fallthrough]] // expected-error{{fallthrough attribute is only allowed on empty statemen… in fallthrough_targets()
306 [[clang::fallthrough]]; // no warning here, correct target in fallthrough_targets()
308 …[[clang::fallthrough]] // expected-error{{fallthrough attribute is only allowed on empty statemen… in fallthrough_targets()
311 …[[clang::fallthrough]] // expected-error{{fallthrough attribute is only allowed on empty statem… in fallthrough_targets()