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