diff options
author | Alexander Kornienko <alexfh@google.com> | 2016-01-29 15:54:26 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2016-01-29 15:54:26 +0000 |
commit | 5aebfe2e4ac51ed95ca8751ee11e9952fda91012 (patch) | |
tree | 897515012886af8b170157589e62e55fbf9b79c0 /clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp | |
parent | bfee5f73529d1ba48746f1a059fa81e565541a23 (diff) | |
download | bcm5719-llvm-5aebfe2e4ac51ed95ca8751ee11e9952fda91012.tar.gz bcm5719-llvm-5aebfe2e4ac51ed95ca8751ee11e9952fda91012.zip |
[clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables.
Patch by Felix Berger!
Differential revision: http://reviews.llvm.org/D13849
llvm-svn: 259199
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp | 3 |
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 977e6a86b64..32097eb6249 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 "ForRangeCopyCheck.h" #include "ImplicitCastInLoopCheck.h" #include "UnnecessaryCopyInitialization.h" @@ -21,6 +22,8 @@ namespace performance { class PerformanceModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { + CheckFactories.registerCheck<ForRangeCopyCheck>( + "performance-for-range-copy"); CheckFactories.registerCheck<ImplicitCastInLoopCheck>( "performance-implicit-cast-in-loop"); CheckFactories.registerCheck<UnnecessaryCopyInitialization>( |