blob: 7a69097579abb8cfea131ca0eaa1bb5e945879cb [file] [log] [blame]
// RUN: %clang_cc1 -analyze -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}}