Artem Dergachev | 78692ea | 2016-08-02 12:21:09 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s |
2 | |||||
3 | // Tests if function try blocks are correctly handled. | ||||
4 | |||||
5 | void nonCompoundStmt1(int& x) | ||||
6 | try { x += 1; } catch(...) { x -= 1; } // expected-warning{{Detected code clone.}} | ||||
7 | |||||
8 | void nonCompoundStmt2(int& x) | ||||
9 | try { x += 1; } catch(...) { x -= 1; } // expected-note{{Related code clone is here.}} |