1// RUN: %check_clang_tidy -std=c++20 %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions
2
3// Private constructor/destructor.
4class 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
13class PrivOutOfLine {
14 PrivOutOfLine();
15};
16
17PrivOutOfLine::PrivOutOfLine() {}
18// CHECK-MESSAGES: :[[@LINE-1]]:16: warning: use '= default'
19// CHECK-FIXES: PrivOutOfLine::PrivOutOfLine() = default;
20

source code of clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx20.cpp