//===------- HICPPTidyModule.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 "../bugprone/UseAfterMoveCheck.h" #include "../cppcoreguidelines/AvoidGotoCheck.h" #include "../cppcoreguidelines/NoMallocCheck.h" #include "../cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h" #include "../cppcoreguidelines/ProTypeMemberInitCheck.h" #include "../cppcoreguidelines/ProTypeVarargCheck.h" #include "../cppcoreguidelines/SpecialMemberFunctionsCheck.h" #include "../google/DefaultArgumentsCheck.h" #include "../google/ExplicitConstructorCheck.h" #include "../misc/NewDeleteOverloadsCheck.h" #include "../misc/StaticAssertCheck.h" #include "../bugprone/UndelegatedConstructorCheck.h" #include "../modernize/DeprecatedHeadersCheck.h" #include "../modernize/UseAutoCheck.h" #include "../modernize/UseEmplaceCheck.h" #include "../modernize/UseEqualsDefaultCheck.h" #include "../modernize/UseEqualsDeleteCheck.h" #include "../modernize/UseNoexceptCheck.h" #include "../modernize/UseNullptrCheck.h" #include "../modernize/UseOverrideCheck.h" #include "../performance/MoveConstArgCheck.h" #include "../performance/NoexceptMoveConstructorCheck.h" #include "../readability/BracesAroundStatementsCheck.h" #include "../readability/FunctionSizeCheck.h" #include "../readability/IdentifierNamingCheck.h" #include "ExceptionBaseclassCheck.h" #include "MultiwayPathsCoveredCheck.h" #include "NoAssemblerCheck.h" #include "SignedBitwiseCheck.h" namespace clang { namespace tidy { namespace hicpp { class HICPPModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { CheckFactories.registerCheck( "hicpp-avoid-goto"); CheckFactories.registerCheck( "hicpp-braces-around-statements"); CheckFactories.registerCheck( "hicpp-deprecated-headers"); CheckFactories.registerCheck( "hicpp-exception-baseclass"); CheckFactories.registerCheck( "hicpp-multiway-paths-covered"); CheckFactories.registerCheck("hicpp-signed-bitwise"); CheckFactories.registerCheck( "hicpp-explicit-conversions"); CheckFactories.registerCheck( "hicpp-function-size"); CheckFactories.registerCheck( "hicpp-named-parameter"); CheckFactories.registerCheck( "hicpp-invalid-access-moved"); CheckFactories.registerCheck( "hicpp-member-init"); CheckFactories.registerCheck( "hicpp-move-const-arg"); CheckFactories.registerCheck( "hicpp-new-delete-operators"); CheckFactories.registerCheck( "hicpp-noexcept-move"); CheckFactories .registerCheck( "hicpp-no-array-decay"); CheckFactories.registerCheck("hicpp-no-assembler"); CheckFactories.registerCheck( "hicpp-no-malloc"); CheckFactories .registerCheck( "hicpp-special-member-functions"); CheckFactories.registerCheck( "hicpp-static-assert"); CheckFactories.registerCheck("hicpp-use-auto"); CheckFactories.registerCheck( "hicpp-undelegated-constructor"); CheckFactories.registerCheck( "hicpp-use-emplace"); CheckFactories.registerCheck( "hicpp-use-equals-default"); CheckFactories.registerCheck( "hicpp-use-equals-delete"); CheckFactories.registerCheck( "hicpp-use-noexcept"); CheckFactories.registerCheck( "hicpp-use-nullptr"); CheckFactories.registerCheck( "hicpp-use-override"); CheckFactories.registerCheck( "hicpp-vararg"); } }; // Register the HICPPModule using this statically initialized variable. static ClangTidyModuleRegistry::Add X("hicpp-module", "Adds High-Integrity C++ checks."); } // namespace hicpp // This anchor is used to force the linker to link in the generated object file // and thus register the HICPPModule. volatile int HICPPModuleAnchorSource = 0; } // namespace tidy } // namespace clang