diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-03-16 00:32:25 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-03-16 00:32:25 +0000 |
commit | 57a5c6b56c782d578d86cbf2e58bb403719afdee (patch) | |
tree | 640406129f00eb22d7ed054a054bf4c32f60397d /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
parent | 208caf22d97e0ad26c7c5dffed1a371c2dbb3a48 (diff) | |
download | bcm5719-llvm-57a5c6b56c782d578d86cbf2e58bb403719afdee.tar.gz bcm5719-llvm-57a5c6b56c782d578d86cbf2e58bb403719afdee.zip |
Move remove-cstr-calls from a standalone executable to a clang-tidy check readability-redundant-string-cstr
http://reviews.llvm.org/D7318
Patch by Richard Thomson!
llvm-svn: 232338
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp index e868303c5ba..0d3c46bdaf5 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -15,6 +15,7 @@ #include "ElseAfterReturnCheck.h" #include "FunctionSizeCheck.h" #include "RedundantSmartptrGetCheck.h" +#include "RedundantStringCStrCheck.h" #include "ShrinkToFitCheck.h" namespace clang { @@ -34,19 +35,20 @@ public: "readability-function-size"); CheckFactories.registerCheck<RedundantSmartptrGetCheck>( "readability-redundant-smartptr-get"); - CheckFactories.registerCheck<ShrinkToFitCheck>( - "readability-shrink-to-fit"); + CheckFactories.registerCheck<RedundantStringCStrCheck>( + "readability-redundant-string-cstr"); + CheckFactories.registerCheck<ShrinkToFitCheck>("readability-shrink-to-fit"); } }; -} // namespace readability +// Register the ReadabilityModule using this statically initialized variable. +static ClangTidyModuleRegistry::Add<ReadabilityModule> + X("readability-module", "Adds readability-related checks."); -// Register the MiscTidyModule using this statically initialized variable. -static ClangTidyModuleRegistry::Add<readability::ReadabilityModule> -X("readability-module", "Adds readability-related checks."); +} // namespace readability // This anchor is used to force the linker to link in the generated object file -// and thus register the MiscModule. +// and thus register the ReadabilityModule. volatile int ReadabilityModuleAnchorSource = 0; } // namespace tidy |