Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / copypaste / blocks.cpp
blob23821560ea375e988b873456277ec47ac70e0afc
1 // RUN: %clang_analyze_cc1 -fblocks -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
3 // This tests if we search for clones in blocks.
5 void log();
7 auto BlockA = ^(int a, int b){ // expected-warning{{Duplicate code detected}}
8 log();
9 if (a > b)
10 return a;
11 return b;
14 auto BlockB = ^(int a, int b){ // expected-note{{Similar code here}}
15 log();
16 if (a > b)
17 return a;
18 return b;