summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-03-20 09:39:36 +0000
committerAlexander Kornienko <alexfh@google.com>2014-03-20 09:39:36 +0000
commitf65a549a82781f77b5d5ab2ed888ac09eaec7399 (patch)
tree1f84df995dfff32e9e3ee94c2c3b1a337f292f6d /clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp
parent09952d2d7108857e555086154120937058b8a55c (diff)
downloadbcm5719-llvm-f65a549a82781f77b5d5ab2ed888ac09eaec7399.tar.gz
bcm5719-llvm-f65a549a82781f77b5d5ab2ed888ac09eaec7399.zip
clang-tidy explicit constructor check: don't warn on copy or move constructors.
Summary: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Explicit_Constructors "The exception is copy constructors, which, in the rare cases when we allow them, should probably not be explicit." Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3122 llvm-svn: 204322
Diffstat (limited to 'clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp')
-rw-r--r--clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp
index 56bc443cbe2..b09afe2f9f7 100644
--- a/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp
+++ b/clang-tools-extra/unittests/clang-tidy/GoogleModuleTest.cpp
@@ -12,8 +12,12 @@ namespace test {
TEST(ExplicitConstructorCheckTest, SingleArgumentConstructorsOnly) {
EXPECT_NO_CHANGES(ExplicitConstructorCheck, "class C { C(); };");
EXPECT_NO_CHANGES(ExplicitConstructorCheck, "class C { C(int i, int j); };");
+ EXPECT_NO_CHANGES(ExplicitConstructorCheck, "class C { C(const C&); };");
+ EXPECT_NO_CHANGES(ExplicitConstructorCheck, "class C { C(C&&); };");
EXPECT_NO_CHANGES(ExplicitConstructorCheck,
"class C { C(const C&) = delete; };");
+ EXPECT_NO_CHANGES(ExplicitConstructorCheck,
+ "class C { C(int) = delete; };");
}
TEST(ExplicitConstructorCheckTest, Basic) {
OpenPOWER on IntegriCloud