blob: d77714591b9124d0779c7c007fdcde97b375b000 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
// RUN: %clang_analyze_cc1 -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -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}}
|