diff options
| author | Alexander Kornienko <alexfh@google.com> | 2015-11-25 15:56:11 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2015-11-25 15:56:11 +0000 |
| commit | e4ac60d7bc115089fe78e29c304aa2fe4cb13f02 (patch) | |
| tree | bbe0ed105951fa6b34858406f20a67a70dd02487 /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp | |
| parent | 25150784ae5013c34a6bc0eb7d180e08835cf297 (diff) | |
| download | bcm5719-llvm-e4ac60d7bc115089fe78e29c304aa2fe4cb13f02.tar.gz bcm5719-llvm-e4ac60d7bc115089fe78e29c304aa2fe4cb13f02.zip | |
[clang-tidy] Const std::move() argument ClangTidy check
ClangTidy check for finding cases when std::move() is called with const or
trivially copyable arguments, that doesn't lead to any move or argument but it
makes copy. FixIt generates patch for removing call of std::move().
Patch by Vadym Doroshenko! (+ a couple of minor fixes)
Differential Revision: http://reviews.llvm.org/D12031
llvm-svn: 254070
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp | 3 |
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 f093b0f5c95..3d3e4866a6e 100644 --- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp @@ -18,6 +18,7 @@ #include "InefficientAlgorithmCheck.h" #include "MacroParenthesesCheck.h" #include "MacroRepeatedSideEffectsCheck.h" +#include "MoveConstantArgumentCheck.h" #include "MoveConstructorInitCheck.h" #include "NewDeleteOverloadsCheck.h" #include "NoexceptMoveConstructorCheck.h" @@ -54,6 +55,8 @@ public: "misc-macro-parentheses"); CheckFactories.registerCheck<MacroRepeatedSideEffectsCheck>( "misc-macro-repeated-side-effects"); + CheckFactories.registerCheck<MoveConstantArgumentCheck>( + "misc-move-const-arg"); CheckFactories.registerCheck<MoveConstructorInitCheck>( "misc-move-constructor-init"); CheckFactories.registerCheck<NewDeleteOverloadsCheck>( |

