diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2015-08-20 15:52:52 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2015-08-20 15:52:52 +0000 |
commit | 9392ced26353f4a0feecf027175d4706fc8e08a6 (patch) | |
tree | 8ea5aa3a314f69bc1e6c81c62f91021ca71baf6e /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp | |
parent | ccf59731e3b7d4920c04339c600ec67af648a9d0 (diff) | |
download | bcm5719-llvm-9392ced26353f4a0feecf027175d4706fc8e08a6.tar.gz bcm5719-llvm-9392ced26353f4a0feecf027175d4706fc8e08a6.zip |
Add a new clang-tidy check (misc-move-constructor-init) that diagnoses move constructor initializations that call copy constructors instead of move constructors.
llvm-svn: 245571
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 8c401eecd4c..b82bdf82b48 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 "MoveConstructorInitCheck.h" #include "NoexceptMoveConstructorCheck.h" #include "StaticAssertCheck.h" #include "SwappedArgumentsCheck.h" @@ -50,6 +51,8 @@ public: "misc-macro-parentheses"); CheckFactories.registerCheck<MacroRepeatedSideEffectsCheck>( "misc-macro-repeated-side-effects"); + CheckFactories.registerCheck<MoveConstructorInitCheck>( + "misc-move-constructor-init"); CheckFactories.registerCheck<NoexceptMoveConstructorCheck>( "misc-noexcept-move-constructor"); CheckFactories.registerCheck<StaticAssertCheck>( |