summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
diff options
context:
space:
mode:
authorSamuel Benzaquen <sbenza@google.com>2016-02-12 19:28:14 +0000
committerSamuel Benzaquen <sbenza@google.com>2016-02-12 19:28:14 +0000
commit51e1523d70842bd401b4a46940acf6d4ea19e483 (patch)
tree209928dcd0815c7fe56d9075cdc150282914b5d2 /clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
parent96fccc2d0912a39daba0cc0e3343987e8748133a (diff)
downloadbcm5719-llvm-51e1523d70842bd401b4a46940acf6d4ea19e483.tar.gz
bcm5719-llvm-51e1523d70842bd401b4a46940acf6d4ea19e483.zip
[clang-tidy] Add check performance-faster-string-find
Summary: Add check performance-faster-string-find. It replaces single character string literals to character literals in calls to string::find and friends. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16152 llvm-svn: 260712
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp b/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
index 32097eb6249..bacc5ccb070 100644
--- a/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
@@ -11,6 +11,7 @@
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
+#include "FasterStringFindCheck.h"
#include "ForRangeCopyCheck.h"
#include "ImplicitCastInLoopCheck.h"
#include "UnnecessaryCopyInitialization.h"
@@ -22,6 +23,8 @@ namespace performance {
class PerformanceModule : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+ CheckFactories.registerCheck<FasterStringFindCheck>(
+ "performance-faster-string-find");
CheckFactories.registerCheck<ForRangeCopyCheck>(
"performance-for-range-copy");
CheckFactories.registerCheck<ImplicitCastInLoopCheck>(
OpenPOWER on IntegriCloud