summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp
index 5461745ac66..013ba8623a6 100644
--- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp
+++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp
@@ -3,7 +3,12 @@
class DefinesDestructor {
~DefinesDestructor();
};
-// CHECK-MESSAGES: [[@LINE-3]]:7: warning: class 'DefinesDestructor' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
+// CHECK-MESSAGES: [[@LINE-3]]:7: warning: class 'DefinesDestructor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
+
+class DefinesDefaultedDestructor {
+ ~DefinesDefaultedDestructor() = default;
+};
+// CHECK-MESSAGES: [[@LINE-3]]:7: warning: class 'DefinesDefaultedDestructor' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
class DefinesCopyConstructor {
DefinesCopyConstructor(const DefinesCopyConstructor &);
OpenPOWER on IntegriCloud