Changeset View
Changeset View
Standalone View
Standalone View
clang-tidy/modernize/ModernizeTidyModule.cpp
//===--- ModernizeTidyModule.cpp - clang-tidy -----------------------------===// | //===--- ModernizeTidyModule.cpp - clang-tidy -----------------------------===// | ||||
// | // | ||||
// The LLVM Compiler Infrastructure | // The LLVM Compiler Infrastructure | ||||
// | // | ||||
// This file is distributed under the University of Illinois Open Source | // This file is distributed under the University of Illinois Open Source | ||||
// License. See LICENSE.TXT for details. | // License. See LICENSE.TXT for details. | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#include "../ClangTidy.h" | #include "../ClangTidy.h" | ||||
#include "../ClangTidyModule.h" | #include "../ClangTidyModule.h" | ||||
#include "../ClangTidyModuleRegistry.h" | #include "../ClangTidyModuleRegistry.h" | ||||
#include "AvoidBindCheck.h" | #include "AvoidBindCheck.h" | ||||
#include "DeprecatedHeadersCheck.h" | #include "DeprecatedHeadersCheck.h" | ||||
#include "ExplicitOperatorBoolCheck.h" | |||||
#include "LoopConvertCheck.h" | #include "LoopConvertCheck.h" | ||||
#include "MakeSharedCheck.h" | #include "MakeSharedCheck.h" | ||||
#include "MakeUniqueCheck.h" | #include "MakeUniqueCheck.h" | ||||
#include "OperatorVoidPointerCheck.h" | |||||
#include "PassByValueCheck.h" | #include "PassByValueCheck.h" | ||||
#include "RawStringLiteralCheck.h" | #include "RawStringLiteralCheck.h" | ||||
#include "RedundantVoidArgCheck.h" | #include "RedundantVoidArgCheck.h" | ||||
#include "ReplaceAutoPtrCheck.h" | #include "ReplaceAutoPtrCheck.h" | ||||
#include "ShrinkToFitCheck.h" | #include "ShrinkToFitCheck.h" | ||||
#include "UseAutoCheck.h" | #include "UseAutoCheck.h" | ||||
#include "UseBoolLiteralsCheck.h" | #include "UseBoolLiteralsCheck.h" | ||||
#include "UseDefaultCheck.h" | #include "UseDefaultCheck.h" | ||||
#include "UseNullptrCheck.h" | #include "UseNullptrCheck.h" | ||||
#include "UseOverrideCheck.h" | #include "UseOverrideCheck.h" | ||||
using namespace clang::ast_matchers; | using namespace clang::ast_matchers; | ||||
namespace clang { | namespace clang { | ||||
namespace tidy { | namespace tidy { | ||||
namespace modernize { | namespace modernize { | ||||
class ModernizeModule : public ClangTidyModule { | class ModernizeModule : public ClangTidyModule { | ||||
public: | public: | ||||
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { | void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { | ||||
CheckFactories.registerCheck<AvoidBindCheck>( | CheckFactories.registerCheck<AvoidBindCheck>( | ||||
"modernize-avoid-bind"); | "modernize-avoid-bind"); | ||||
CheckFactories.registerCheck<DeprecatedHeadersCheck>( | CheckFactories.registerCheck<DeprecatedHeadersCheck>( | ||||
"modernize-deprecated-headers"); | "modernize-deprecated-headers"); | ||||
CheckFactories.registerCheck<ExplicitOperatorBoolCheck>( | |||||
"modernize-explicit-operator-bool"); | |||||
CheckFactories.registerCheck<LoopConvertCheck>("modernize-loop-convert"); | CheckFactories.registerCheck<LoopConvertCheck>("modernize-loop-convert"); | ||||
CheckFactories.registerCheck<MakeSharedCheck>("modernize-make-shared"); | CheckFactories.registerCheck<MakeSharedCheck>("modernize-make-shared"); | ||||
CheckFactories.registerCheck<MakeUniqueCheck>("modernize-make-unique"); | CheckFactories.registerCheck<MakeUniqueCheck>("modernize-make-unique"); | ||||
CheckFactories.registerCheck<OperatorVoidPointerCheck>( | |||||
"modernize-operator-void-pointer"); | |||||
CheckFactories.registerCheck<PassByValueCheck>("modernize-pass-by-value"); | CheckFactories.registerCheck<PassByValueCheck>("modernize-pass-by-value"); | ||||
CheckFactories.registerCheck<RawStringLiteralCheck>( | CheckFactories.registerCheck<RawStringLiteralCheck>( | ||||
"modernize-raw-string-literal"); | "modernize-raw-string-literal"); | ||||
CheckFactories.registerCheck<RedundantVoidArgCheck>( | CheckFactories.registerCheck<RedundantVoidArgCheck>( | ||||
"modernize-redundant-void-arg"); | "modernize-redundant-void-arg"); | ||||
CheckFactories.registerCheck<ReplaceAutoPtrCheck>( | CheckFactories.registerCheck<ReplaceAutoPtrCheck>( | ||||
"modernize-replace-auto-ptr"); | "modernize-replace-auto-ptr"); | ||||
CheckFactories.registerCheck<ShrinkToFitCheck>("modernize-shrink-to-fit"); | CheckFactories.registerCheck<ShrinkToFitCheck>("modernize-shrink-to-fit"); | ||||
Show All 38 Lines |