1 | // RUN: clang-tidy %s -checks=-*,bugprone-undelegated-constructor -- -std=c++98 | count 0 |
---|---|
2 | |
3 | // Note: this test expects no diagnostics, but FileCheck cannot handle that, |
4 | // hence the use of | count 0. |
5 | |
6 | struct Ctor; |
7 | Ctor foo(); |
8 | |
9 | struct Ctor { |
10 | Ctor(); |
11 | Ctor(int); |
12 | Ctor(int, int); |
13 | Ctor(Ctor *i) { |
14 | Ctor(); |
15 | Ctor(0); |
16 | Ctor(1, 2); |
17 | foo(); |
18 | } |
19 | }; |
20 | |
21 | Ctor::Ctor() { |
22 | Ctor(1); |
23 | } |
24 |