blob: f71545130cbb09ebaa8944a6de53ada9d5643fd9 [file] [log] [blame]
Raphael Isemann561f0de2017-09-04 05:56:36 +00001// RUN: %clang_analyze_cc1 -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
Artem Dergachev78692ea2016-08-02 12:21:09 +00002
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}