//===--- MiscTidyModule.cpp - clang-tidy ----------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "../ClangTidy.h" #include "../ClangTidyModule.h" #include "../ClangTidyModuleRegistry.h" #include "ArgumentCommentCheck.h" #include "AssertSideEffectCheck.h" #include "AssignOperatorSignatureCheck.h" #include "BoolPointerImplicitConversionCheck.h" #include "InaccurateEraseCheck.h" #include "InefficientAlgorithmCheck.h" #include "MacroParenthesesCheck.h" #include "MacroRepeatedSideEffectsCheck.h" #include "MoveConstructorInitCheck.h" #include "NoexceptMoveConstructorCheck.h" #include "StaticAssertCheck.h" #include "SwappedArgumentsCheck.h" #include "UndelegatedConstructor.h" #include "UniqueptrResetReleaseCheck.h" #include "UnusedAliasDeclsCheck.h" #include "UnusedParametersCheck.h" #include "UnusedRAIICheck.h" namespace clang { namespace tidy { namespace misc { class MiscModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { CheckFactories.registerCheck("misc-argument-comment"); CheckFactories.registerCheck( "misc-assert-side-effect"); CheckFactories.registerCheck( "misc-assign-operator-signature"); CheckFactories.registerCheck( "misc-bool-pointer-implicit-conversion"); CheckFactories.registerCheck( "misc-inaccurate-erase"); CheckFactories.registerCheck( "misc-inefficient-algorithm"); CheckFactories.registerCheck( "misc-macro-parentheses"); CheckFactories.registerCheck( "misc-macro-repeated-side-effects"); CheckFactories.registerCheck( "misc-move-constructor-init"); CheckFactories.registerCheck( "misc-noexcept-move-constructor"); CheckFactories.registerCheck( "misc-static-assert"); CheckFactories.registerCheck( "misc-swapped-arguments"); CheckFactories.registerCheck( "misc-undelegated-constructor"); CheckFactories.registerCheck( "misc-uniqueptr-reset-release"); CheckFactories.registerCheck( "misc-unused-alias-decls"); CheckFactories.registerCheck( "misc-unused-parameters"); CheckFactories.registerCheck("misc-unused-raii"); } }; } // namespace misc // Register the MiscTidyModule using this statically initialized variable. static ClangTidyModuleRegistry::Add X("misc-module", "Adds miscellaneous lint checks."); // This anchor is used to force the linker to link in the generated object file // and thus register the MiscModule. volatile int MiscModuleAnchorSource = 0; } // namespace tidy } // namespace clang