diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-03-20 09:39:36 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-03-20 09:39:36 +0000 |
commit | f65a549a82781f77b5d5ab2ed888ac09eaec7399 (patch) | |
tree | 1f84df995dfff32e9e3ee94c2c3b1a337f292f6d /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | 09952d2d7108857e555086154120937058b8a55c (diff) | |
download | bcm5719-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/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |