blob: 5a5b82cf609caef73e432e9e4aa2042667921d65 [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyzer-checker=core,cplusplus.NewDeleteLeaks -verify %s
David Majnemerb1004102014-03-02 18:46:05 +00002// expected-no-diagnostics
3
4class A {
5public:
6 void f() {};
7 ~A() {
8 for (int i=0; i<3; i++)
9 f();
10 }
11};
12
13void error() {
14 A *a = new A();
15 delete a;
16}