xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-cxx17.cpp (revision 90d42b1cab04b76e9e934f1e5076f014d1195e72)
1*90d42b1cSAlexander Shaposhnikov // RUN: %check_clang_tidy -std=c++17 %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions
2*90d42b1cSAlexander Shaposhnikov 
3*90d42b1cSAlexander Shaposhnikov // Private constructor/destructor.
4*90d42b1cSAlexander Shaposhnikov class Priv {
Priv()5*90d42b1cSAlexander Shaposhnikov   Priv() {}
~Priv()6*90d42b1cSAlexander Shaposhnikov   ~Priv() {}
7*90d42b1cSAlexander Shaposhnikov   // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use '= default'
8*90d42b1cSAlexander Shaposhnikov   // CHECK-FIXES: ~Priv() = default;
9*90d42b1cSAlexander Shaposhnikov };
10*90d42b1cSAlexander Shaposhnikov 
11*90d42b1cSAlexander Shaposhnikov class PrivOutOfLine {
12*90d42b1cSAlexander Shaposhnikov   PrivOutOfLine();
13*90d42b1cSAlexander Shaposhnikov };
14*90d42b1cSAlexander Shaposhnikov 
PrivOutOfLine()15*90d42b1cSAlexander Shaposhnikov PrivOutOfLine::PrivOutOfLine() {}
16*90d42b1cSAlexander Shaposhnikov // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: use '= default'
17*90d42b1cSAlexander Shaposhnikov // CHECK-FIXES: PrivOutOfLine::PrivOutOfLine() = default;
18