blob: 72d654c6e0606d24eaca483fdb3c51f59eea9395 [file] [log] [blame]
Artem Dergachev78692ea2016-08-02 12:21:09 +00001// RUN: %clang_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s
2
3// expected-no-diagnostics
4
5int foo1(int n) {
6 int result = 0;
7 switch (n) {
8 case 33:
9 result += 33;
10 [[clang::fallthrough]];
11 case 44:
12 result += 44;
13 }
14 return result;
15}
16
17// Identical to foo1 except the missing attribute.
18int foo2(int n) {
19 int result = 0;
20 switch (n) {
21 case 33:
22 result += 33;
23 ;
24 case 44:
25 result += 44;
26 }
27 return result;
28}