//===--- 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 "UnconventionalAssignOperatorCheck.h" #include "BoolPointerImplicitConversionCheck.h" #include "DanglingHandleCheck.h" #include "DefinitionsInHeadersCheck.h" #include "FoldInitTypeCheck.h" #include "ForwardDeclarationNamespaceCheck.h" #include "InaccurateEraseCheck.h" #include "IncorrectRoundings.h" #include "InefficientAlgorithmCheck.h" #include "MacroParenthesesCheck.h" #include "MacroRepeatedSideEffectsCheck.h" #include "MisplacedWideningCastCheck.h" #include "MoveConstantArgumentCheck.h" #include "MoveConstructorInitCheck.h" #include "MultipleStatementMacroCheck.h" #include "NewDeleteOverloadsCheck.h" #include "NoexceptMoveConstructorCheck.h" #include "NonCopyableObjects.h" #include "PointerAndIntegralOperationCheck.h" #include "RedundantExpressionCheck.h" #include "SizeofContainerCheck.h" #include "SizeofExpressionCheck.h" #include "StaticAssertCheck.h" #include "StringConstructorCheck.h" #include "StringIntegerAssignmentCheck.h" #include "StringLiteralWithEmbeddedNulCheck.h" #include "SuspiciousMissingCommaCheck.h" #include "SuspiciousSemicolonCheck.h" #include "SuspiciousStringCompareCheck.h" #include "SwappedArgumentsCheck.h" #include "ThrowByValueCatchByReferenceCheck.h" #include "UndelegatedConstructor.h" #include "UniqueptrResetReleaseCheck.h" #include "UnusedAliasDeclsCheck.h" #include "UnusedParametersCheck.h" #include "UnusedRAIICheck.h" #include "UnusedUsingDeclsCheck.h" #include "VirtualNearMissCheck.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-unconventional-assign-operator"); CheckFactories.registerCheck( "misc-bool-pointer-implicit-conversion"); CheckFactories.registerCheck( "misc-dangling-handle"); CheckFactories.registerCheck( "misc-definitions-in-headers"); CheckFactories.registerCheck( "misc-fold-init-type"); CheckFactories.registerCheck( "misc-forward-declaration-namespace"); CheckFactories.registerCheck( "misc-inaccurate-erase"); CheckFactories.registerCheck( "misc-incorrect-roundings"); CheckFactories.registerCheck( "misc-inefficient-algorithm"); CheckFactories.registerCheck( "misc-macro-parentheses"); CheckFactories.registerCheck( "misc-macro-repeated-side-effects"); CheckFactories.registerCheck( "misc-misplaced-widening-cast"); CheckFactories.registerCheck( "misc-move-const-arg"); CheckFactories.registerCheck( "misc-move-constructor-init"); CheckFactories.registerCheck( "misc-multiple-statement-macro"); CheckFactories.registerCheck( "misc-new-delete-overloads"); CheckFactories.registerCheck( "misc-noexcept-move-constructor"); CheckFactories.registerCheck( "misc-non-copyable-objects"); CheckFactories.registerCheck( "misc-pointer-and-integral-operation"); CheckFactories.registerCheck( "misc-redundant-expression"); CheckFactories.registerCheck("misc-sizeof-container"); CheckFactories.registerCheck( "misc-sizeof-expression"); CheckFactories.registerCheck( "misc-static-assert"); CheckFactories.registerCheck( "misc-string-constructor"); CheckFactories.registerCheck( "misc-string-integer-assignment"); CheckFactories.registerCheck( "misc-string-literal-with-embedded-nul"); CheckFactories.registerCheck( "misc-suspicious-missing-comma"); CheckFactories.registerCheck( "misc-suspicious-semicolon"); CheckFactories.registerCheck( "misc-suspicious-string-compare"); CheckFactories.registerCheck( "misc-swapped-arguments"); CheckFactories.registerCheck( "misc-throw-by-value-catch-by-reference"); 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"); CheckFactories.registerCheck( "misc-unused-using-decls"); CheckFactories.registerCheck( "misc-virtual-near-miss"); } }; } // 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