summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2017-03-13 21:39:00 +0000
committerAaron Ballman <aaron@aaronballman.com>2017-03-13 21:39:00 +0000
commit9dd8caad1f955119c3804029f72bd443986f3dc9 (patch)
tree613fb9b22fbe98dfcdaed99098ba8b613ead2ffe /clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp
parent38a91a0de661967b3609d044e63985101d69e153 (diff)
downloadbcm5719-llvm-9dd8caad1f955119c3804029f72bd443986f3dc9.tar.gz
bcm5719-llvm-9dd8caad1f955119c3804029f72bd443986f3dc9.zip
Add the 'AllowSoleDefaultDtor' and 'AllowMissingMoveFunctions' options to the cppcoreguidelines-special-member-functions check.
Patch by Florian Gross. llvm-svn: 297671
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