summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-09-10 11:06:43 +0000
committerAlexander Kornienko <alexfh@google.com>2014-09-10 11:06:43 +0000
commitbe8c143dd604ecdbe246d4a3bfdc0483e873557f (patch)
tree9e5cd12f7d7c12c54ce69407eedd8032bf4964f0 /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
parentb6bbf341cb1939a03395b169c59f2fe0628c6042 (diff)
downloadbcm5719-llvm-be8c143dd604ecdbe246d4a3bfdc0483e873557f.tar.gz
bcm5719-llvm-be8c143dd604ecdbe246d4a3bfdc0483e873557f.zip
Unique-ptrify ClangTidyCheckFactories. Add a more convenient alternative to
addCheckFactory: registerCheck. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5288 llvm-svn: 217489
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp32
1 files changed, 11 insertions, 21 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
index 8cf70d30492..489f5b31dd7 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -24,27 +24,17 @@ namespace tidy {
class MiscModule : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
- CheckFactories.addCheckFactory(
- "misc-argument-comment",
- new ClangTidyCheckFactory<ArgumentCommentCheck>());
- CheckFactories.addCheckFactory(
- "misc-bool-pointer-implicit-conversion",
- new ClangTidyCheckFactory<BoolPointerImplicitConversion>());
- CheckFactories.addCheckFactory(
- "misc-redundant-smartptr-get",
- new ClangTidyCheckFactory<RedundantSmartptrGet>());
- CheckFactories.addCheckFactory(
- "misc-swapped-arguments",
- new ClangTidyCheckFactory<SwappedArgumentsCheck>());
- CheckFactories.addCheckFactory(
- "misc-undelegated-constructor",
- new ClangTidyCheckFactory<UndelegatedConstructorCheck>());
- CheckFactories.addCheckFactory(
- "misc-unused-raii",
- new ClangTidyCheckFactory<UnusedRAIICheck>());
- CheckFactories.addCheckFactory(
- "misc-use-override",
- new ClangTidyCheckFactory<UseOverride>());
+ CheckFactories.registerCheck<ArgumentCommentCheck>("misc-argument-comment");
+ CheckFactories.registerCheck<BoolPointerImplicitConversion>(
+ "misc-bool-pointer-implicit-conversion");
+ CheckFactories.registerCheck<RedundantSmartptrGet>(
+ "misc-redundant-smartptr-get");
+ CheckFactories.registerCheck<SwappedArgumentsCheck>(
+ "misc-swapped-arguments");
+ CheckFactories.registerCheck<UndelegatedConstructorCheck>(
+ "misc-undelegated-constructor");
+ CheckFactories.registerCheck<UnusedRAIICheck>("misc-unused-raii");
+ CheckFactories.registerCheck<UseOverride>("misc-use-override");
}
};
OpenPOWER on IntegriCloud