summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2015-02-07 19:54:19 +0000
committerGabor Horvath <xazax.hun@gmail.com>2015-02-07 19:54:19 +0000
commit3880bee0ff044e2ddd7790c45a919436123830f8 (patch)
tree35328cd32f6a15ac7c3668fe120139311be48e34 /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
parent17d9015d270a13d799a498a40a5ce3d8b660ee0a (diff)
downloadbcm5719-llvm-3880bee0ff044e2ddd7790c45a919436123830f8.tar.gz
bcm5719-llvm-3880bee0ff044e2ddd7790c45a919436123830f8.zip
[clang-tidy] Checker for inefficient use of algorithms on associative containers
Summary: Associative containers implements some of the algorithms as methods which should be preferred to the algorithms in the algorithm header. The methods can take advantage of the order of the elements. Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7246 llvm-svn: 228505
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
index fe56017247b..f28140da67c 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -12,6 +12,7 @@
#include "../ClangTidyModuleRegistry.h"
#include "ArgumentCommentCheck.h"
#include "BoolPointerImplicitConversion.h"
+#include "InefficientAlgorithmCheck.h"
#include "SwappedArgumentsCheck.h"
#include "UndelegatedConstructor.h"
#include "UniqueptrResetRelease.h"
@@ -27,6 +28,8 @@ public:
CheckFactories.registerCheck<ArgumentCommentCheck>("misc-argument-comment");
CheckFactories.registerCheck<BoolPointerImplicitConversion>(
"misc-bool-pointer-implicit-conversion");
+ CheckFactories.registerCheck<InefficientAlgorithmCheck>(
+ "misc-inefficient-algorithm");
CheckFactories.registerCheck<SwappedArgumentsCheck>(
"misc-swapped-arguments");
CheckFactories.registerCheck<UndelegatedConstructorCheck>(
OpenPOWER on IntegriCloud