brintos

brintos / llvm-project-archived public Read only

0
0
Text · 594 B · 38dfa5e Raw
20 lines · cpp
1// RUN: %check_clang_tidy -std=c++20 %s modernize-use-equals-default %t -- -- -fno-delayed-template-parsing -fexceptions2 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