Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / copypaste / function-try-block.cpp
blobd0fbc50f67ef8420c6469bfc056b54c8fe147e38
1 // RUN: %clang_analyze_cc1 -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
3 // Tests if function try blocks are correctly handled.
5 void nonCompoundStmt1(int& x)
6 try { x += 1; } catch(...) { x -= 1; } // expected-warning{{Duplicate code detected}}
8 void nonCompoundStmt2(int& x)
9 try { x += 1; } catch(...) { x -= 1; } // expected-note{{Similar code here}}