From f65a549a82781f77b5d5ab2ed888ac09eaec7399 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Thu, 20 Mar 2014 09:39:36 +0000 Subject: 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 --- clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp') diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index a9386965a7e..944adf90083 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -34,7 +34,7 @@ void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) { // Do not be confused: isExplicit means 'explicit' keyword is present, // isImplicit means that it's a compiler-generated constructor. if (Ctor->isOutOfLine() || Ctor->isExplicit() || Ctor->isImplicit() || - Ctor->isDeleted()) + Ctor->isDeleted() || Ctor->isCopyOrMoveConstructor()) return; if (Ctor->getNumParams() == 0 || Ctor->getMinRequiredArguments() > 1) return; -- cgit v1.2.3