Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / copypaste / attributes.cpp
blobf71545130cbb09ebaa8944a6de53ada9d5643fd9
1 // RUN: %clang_analyze_cc1 -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
3 // expected-no-diagnostics
5 int 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;
14 return result;
17 // Identical to foo1 except the missing attribute.
18 int foo2(int n) {
19 int result = 0;
20 switch (n) {
21 case 33:
22 result += 33;
24 case 44:
25 result += 44;
27 return result;