Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / copypaste / text-diagnostics.cpp
bloba3132e9534c57af7f5ad0751931414d100043aa6
1 // RUN: %clang_analyze_cc1 -analyzer-output=text -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
3 void log();
5 int max(int a, int b) { // expected-warning{{Duplicate code detected}} // expected-note{{Duplicate code detected}}
6 log();
7 if (a > b)
8 return a;
9 return b;
12 int maxClone(int a, int b) { // expected-note{{Similar code here}}
13 log();
14 if (a > b)
15 return a;
16 return b;