You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
462 B
10 lines
462 B
7 months ago
|
// RUN: %clang_analyze_cc1 -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
|
||
|
|
||
|
// Tests if function try blocks are correctly handled.
|
||
|
|
||
|
void nonCompoundStmt1(int& x)
|
||
|
try { x += 1; } catch(...) { x -= 1; } // expected-warning{{Duplicate code detected}}
|
||
|
|
||
|
void nonCompoundStmt2(int& x)
|
||
|
try { x += 1; } catch(...) { x -= 1; } // expected-note{{Similar code here}}
|