1 | // RUN: %check_clang_tidy -std=c++20 %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions |
2 | |
3 | // Private constructor/destructor. |
4 | class Priv { |
5 | Priv() {} |
6 | // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use '= default' |
7 | // CHECK-FIXES: Priv() = default; |
8 | ~Priv() {} |
9 | // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use '= default' |
10 | // CHECK-FIXES: ~Priv() = default; |
11 | }; |
12 | |
13 | class PrivOutOfLine { |
14 | PrivOutOfLine(); |
15 | }; |
16 | |
17 | PrivOutOfLine::PrivOutOfLine() {} |
18 | // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: use '= default' |
19 | // CHECK-FIXES: PrivOutOfLine::PrivOutOfLine() = default; |
20 | |