summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-07-15 09:50:32 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-07-15 09:50:32 +0000
commit47c4d101e00953aefb071625c68f3d9ab8373e4a (patch)
tree6e1f1deaad47c6e9841c149536d1b66331dbaf0c /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
parent1015f8d753904f3bba4b2f2bdbe37718dcd98cda (diff)
downloadbcm5719-llvm-47c4d101e00953aefb071625c68f3d9ab8373e4a.tar.gz
bcm5719-llvm-47c4d101e00953aefb071625c68f3d9ab8373e4a.zip
[clang-tidy] Add a checker that removes deducible arguments from std::make_pair
Those may be incompatible with C++11 and are unnecessary. We suggest removing the template arguments when they match the types of the make_pair arguments or replace it with std::pair and explicit template arguments when not. Differential Revision: http://reviews.llvm.org/D4497 llvm-svn: 213058
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
index 34abfb388b3..248d0f13c41 100644
--- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
@@ -12,6 +12,7 @@
#include "../ClangTidyModuleRegistry.h"
#include "AvoidCStyleCastsCheck.h"
#include "ExplicitConstructorCheck.h"
+#include "ExplicitMakePairCheck.h"
using namespace clang::ast_matchers;
@@ -22,6 +23,9 @@ class GoogleModule : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.addCheckFactory(
+ "google-build-explicit-make-pair",
+ new ClangTidyCheckFactory<build::ExplicitMakePairCheck>());
+ CheckFactories.addCheckFactory(
"google-explicit-constructor",
new ClangTidyCheckFactory<ExplicitConstructorCheck>());
CheckFactories.addCheckFactory(
OpenPOWER on IntegriCloud