clang-tools  9.0.0svn
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::tidy::ClangTidyCheck Class Reference

Base class for all clang-tidy checks. More...

#include <ClangTidyCheck.h>

Inherits MatchCallback.

Inherited by clang::tidy::abseil::DurationAdditionCheck, clang::tidy::abseil::DurationComparisonCheck, clang::tidy::abseil::DurationConversionCastCheck, clang::tidy::abseil::DurationDivisionCheck, clang::tidy::abseil::DurationFactoryFloatCheck, clang::tidy::abseil::DurationFactoryScaleCheck, clang::tidy::abseil::DurationSubtractionCheck, clang::tidy::abseil::DurationUnnecessaryConversionCheck, clang::tidy::abseil::FasterStrsplitDelimiterCheck, clang::tidy::abseil::NoInternalDependenciesCheck, clang::tidy::abseil::NoNamespaceCheck, clang::tidy::abseil::RedundantStrcatCallsCheck, clang::tidy::abseil::StrCatAppendCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::abseil::TimeComparisonCheck, clang::tidy::abseil::TimeSubtractionCheck, clang::tidy::abseil::UpgradeDurationConversionsCheck, clang::tidy::android::CloexecCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::bugprone::BoolPointerImplicitConversionCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::FoldInitTypeCheck, clang::tidy::bugprone::ForwardDeclarationNamespaceCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::bugprone::IncorrectRoundingsCheck, clang::tidy::bugprone::IntegerDivisionCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::bugprone::MacroParenthesesCheck, clang::tidy::bugprone::MacroRepeatedSideEffectsCheck, clang::tidy::bugprone::MisplacedOperatorInStrlenInAllocCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::bugprone::MultipleStatementMacroCheck, clang::tidy::bugprone::ParentVirtualCallCheck, clang::tidy::bugprone::SizeofContainerCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::bugprone::SuspiciousMemsetUsageCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::SuspiciousSemicolonCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::bugprone::SwappedArgumentsCheck, clang::tidy::bugprone::TerminatingContinueCheck, clang::tidy::bugprone::ThrowKeywordMissingCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::bugprone::UndefinedMemoryManipulationCheck, clang::tidy::bugprone::UndelegatedConstructorCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cert::CommandProcessorCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::FloatLoopCounter, clang::tidy::cert::LimitedRandomnessCheck, clang::tidy::cert::PostfixOperatorCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::cert::StaticObjectExceptionCheck, clang::tidy::cert::StrToNumCheck, clang::tidy::cert::ThrownExceptionTypeCheck, clang::tidy::cert::VariadicFunctionDefCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::InterfacesGlobalInitCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::cppcoreguidelines::ProBoundsArrayToPointerDecayCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::cppcoreguidelines::ProBoundsPointerArithmeticCheck, clang::tidy::cppcoreguidelines::ProTypeConstCastCheck, clang::tidy::cppcoreguidelines::ProTypeCstyleCastCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::cppcoreguidelines::ProTypeReinterpretCastCheck, clang::tidy::cppcoreguidelines::ProTypeStaticCastDowncastCheck, clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck, clang::tidy::cppcoreguidelines::ProTypeVarargCheck, clang::tidy::cppcoreguidelines::SlicingCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::fuchsia::DefaultArgumentsCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::fuchsia::OverloadedOperatorCheck, clang::tidy::fuchsia::RestrictSystemIncludesCheck, clang::tidy::fuchsia::StaticallyConstructedObjectsCheck, clang::tidy::fuchsia::TrailingReturnCheck, clang::tidy::fuchsia::VirtualInheritanceCheck, clang::tidy::google::build::ExplicitMakePairCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::google::build::UsingNamespaceDirectiveCheck, clang::tidy::google::DefaultArgumentsCheck, clang::tidy::google::ExplicitConstructorCheck, clang::tidy::google::objc::AvoidThrowingObjCExceptionCheck, clang::tidy::google::objc::FunctionNamingCheck, clang::tidy::google::objc::GlobalVariableDeclarationCheck, clang::tidy::google::readability::AvoidCStyleCastsCheck, clang::tidy::google::readability::AvoidUnderscoreInGoogletestNameCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::google::readability::TodoCommentCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::google::runtime::NonConstReferences, clang::tidy::google::runtime::OverloadedUnaryAndCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::hicpp::NoAssemblerCheck, clang::tidy::hicpp::SignedBitwiseCheck, clang::tidy::llvm::IncludeOrderCheck, clang::tidy::llvm::TwineLocalCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::misc::MisplacedConstCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::NonCopyableObjectsCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::misc::RedundantExpressionCheck, clang::tidy::misc::StaticAssertCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::misc::UnconventionalAssignOperatorCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::misc::UnusedAliasDeclsCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::misc::UnusedUsingDeclsCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::AvoidCArraysCheck, clang::tidy::modernize::ConcatNestedNamespacesCheck, clang::tidy::modernize::DeprecatedHeadersCheck, clang::tidy::modernize::DeprecatedIosBaseAliasesCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::modernize::RedundantVoidArgCheck, clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::modernize::ReturnBracedInitListCheck, clang::tidy::modernize::ShrinkToFitCheck, clang::tidy::modernize::UnaryStaticAssertCheck, clang::tidy::modernize::UseAutoCheck, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::modernize::UseNullptrCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::modernize::UseUncaughtExceptionsCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::mpi::BufferDerefCheck, clang::tidy::mpi::TypeMismatchCheck, clang::tidy::objc::AvoidNSErrorInitCheck, clang::tidy::objc::AvoidSpinlockCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::objc::PropertyDeclarationCheck, clang::tidy::objc::SuperSelfCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::openmp::UseDefaultNoneCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::performance::ImplicitConversionInLoopCheck, clang::tidy::performance::InefficientAlgorithmCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::AvoidConstParamsInDecls, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::readability::ConstReturnTypeCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::readability::DeletedDefaultCheck, clang::tidy::readability::DeleteNullPointerCheck, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::readability::IdentifierNamingCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::readability::IsolateDeclarationCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::MisleadingIndentationCheck, clang::tidy::readability::MisplacedArrayIndexCheck, clang::tidy::readability::NamedParameterCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::NonConstParameterCheck, clang::tidy::readability::RedundantControlFlowCheck, clang::tidy::readability::RedundantDeclarationCheck, clang::tidy::readability::RedundantFunctionPtrDereferenceCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::readability::RedundantPreprocessorCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::readability::RedundantStringCStrCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::readability::SimplifyBooleanExprCheck, clang::tidy::readability::SimplifySubscriptExprCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::readability::StaticDefinitionInAnonymousNamespaceCheck, clang::tidy::readability::StringCompareCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::readability::UppercaseLiteralSuffixCheck, clang::tidy::utils::HeaderGuardCheck, and clang::tidy::zircon::TemporaryObjectsCheck.

Collaboration diagram for clang::tidy::ClangTidyCheck:
Collaboration graph
[legend]

Classes

class  OptionsView
 Provides access to the ClangTidyCheck options via check-local names. More...
 

Public Member Functions

 ClangTidyCheck (StringRef CheckName, ClangTidyContext *Context)
 Initializes the check with CheckName and Context. More...
 
virtual void registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP)
 Override this to register PPCallbacks in the preprocessor. More...
 
virtual void registerMatchers (ast_matchers::MatchFinder *Finder)
 Override this to register AST matchers with Finder. More...
 
virtual void check (const ast_matchers::MatchFinder::MatchResult &Result)
 ClangTidyChecks that register ASTMatchers should do the actual work in here. More...
 
DiagnosticBuilder diag (SourceLocation Loc, StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning)
 Add a diagnostic with the check's name. More...
 
virtual void storeOptions (ClangTidyOptions::OptionMap &Options)
 Should store all options supported by this check with their current values or default values for options that haven't been overridden. More...
 

Protected Member Functions

StringRef getCurrentMainFile () const
 Returns the main file name of the current translation unit. More...
 
const LangOptions & getLangOpts () const
 Returns the language options from the context. More...
 

Protected Attributes

OptionsView Options
 

Detailed Description

Base class for all clang-tidy checks.

To implement a ClangTidyCheck, write a subclass and override some of the base class's methods. E.g. to implement a check that validates namespace declarations, override registerMatchers:

void registerMatchers(ast_matchers::MatchFinder *Finder) override {
Finder->addMatcher(namespaceDecl().bind("namespace"), this);
}

and then override check(const MatchResult &Result) to do the actual check for each match.

A new ClangTidyCheck instance is created per translation unit.

FIXME: Figure out whether carrying information from one TU to another is useful/necessary.

Definition at line 47 of file ClangTidyCheck.h.

Constructor & Destructor Documentation

◆ ClangTidyCheck()

clang::tidy::ClangTidyCheck::ClangTidyCheck ( StringRef  CheckName,
ClangTidyContext Context 
)

Initializes the check with CheckName and Context.

Derived classes must implement the constructor with this signature or delegate it. If a check needs to read options, it can do this in the constructor using the Options.get() methods below.

Definition at line 14 of file ClangTidyCheck.cpp.

Member Function Documentation

◆ check()

virtual void clang::tidy::ClangTidyCheck::check ( const ast_matchers::MatchFinder::MatchResult &  Result)
inlinevirtual

ClangTidyChecks that register ASTMatchers should do the actual work in here.

Reimplemented in clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::bugprone::ForwardDeclarationNamespaceCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::readability::IdentifierNamingCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::google::build::UsingNamespaceDirectiveCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::modernize::RedundantVoidArgCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::bugprone::BoolPointerImplicitConversionCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::google::objc::FunctionNamingCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::misc::UnconventionalAssignOperatorCheck, clang::tidy::readability::NamedParameterCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::google::readability::AvoidCStyleCastsCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::android::CloexecOpenCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::FoldInitTypeCheck, clang::tidy::cppcoreguidelines::SlicingCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::mpi::BufferDerefCheck, clang::tidy::mpi::TypeMismatchCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::abseil::RedundantStrcatCallsCheck, clang::tidy::bugprone::IncorrectRoundingsCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::objc::PropertyDeclarationCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::zircon::TemporaryObjectsCheck, clang::tidy::abseil::DurationFactoryFloatCheck, clang::tidy::abseil::DurationFactoryScaleCheck, clang::tidy::android::CloexecFopenCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::cert::CommandProcessorCheck, clang::tidy::cert::LimitedRandomnessCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::google::objc::AvoidThrowingObjCExceptionCheck, clang::tidy::google::build::ExplicitMakePairCheck, clang::tidy::google::objc::GlobalVariableDeclarationCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::RedundantControlFlowCheck, clang::tidy::abseil::UpgradeDurationConversionsCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::MisplacedOperatorInStrlenInAllocCheck, clang::tidy::bugprone::MultipleStatementMacroCheck, clang::tidy::bugprone::UndefinedMemoryManipulationCheck, clang::tidy::cert::FloatLoopCounter, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::cppcoreguidelines::ProBoundsPointerArithmeticCheck, clang::tidy::fuchsia::StaticallyConstructedObjectsCheck, clang::tidy::fuchsia::TrailingReturnCheck, clang::tidy::google::runtime::OverloadedUnaryAndCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::StaticAssertCheck, clang::tidy::misc::UnusedUsingDeclsCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::ShrinkToFitCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseUncaughtExceptionsCheck, clang::tidy::objc::SuperSelfCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::openmp::UseDefaultNoneCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::readability::MisleadingIndentationCheck, clang::tidy::readability::SimplifyBooleanExprCheck, clang::tidy::readability::UppercaseLiteralSuffixCheck, clang::tidy::abseil::DurationAdditionCheck, clang::tidy::abseil::DurationComparisonCheck, clang::tidy::abseil::DurationConversionCastCheck, clang::tidy::abseil::DurationSubtractionCheck, clang::tidy::abseil::DurationUnnecessaryConversionCheck, clang::tidy::abseil::FasterStrsplitDelimiterCheck, clang::tidy::abseil::NoInternalDependenciesCheck, clang::tidy::abseil::NoNamespaceCheck, clang::tidy::abseil::StrCatAppendCheck, clang::tidy::abseil::TimeComparisonCheck, clang::tidy::abseil::TimeSubtractionCheck, clang::tidy::android::CloexecDupCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::IntegerDivisionCheck, clang::tidy::bugprone::SizeofContainerCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::SuspiciousSemicolonCheck, clang::tidy::bugprone::TerminatingContinueCheck, clang::tidy::bugprone::ThrowKeywordMissingCheck, clang::tidy::bugprone::UndelegatedConstructorCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::PostfixOperatorCheck, clang::tidy::cert::StaticObjectExceptionCheck, clang::tidy::cert::StrToNumCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::ProTypeCstyleCastCheck, clang::tidy::cppcoreguidelines::ProTypeStaticCastDowncastCheck, clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck, clang::tidy::cppcoreguidelines::ProTypeVarargCheck, clang::tidy::hicpp::SignedBitwiseCheck, clang::tidy::misc::MisplacedConstCheck, clang::tidy::misc::RedundantExpressionCheck, clang::tidy::modernize::DeprecatedIosBaseAliasesCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::ReturnBracedInitListCheck, clang::tidy::modernize::UnaryStaticAssertCheck, clang::tidy::objc::AvoidNSErrorInitCheck, clang::tidy::objc::AvoidSpinlockCheck, clang::tidy::performance::InefficientAlgorithmCheck, clang::tidy::readability::DeletedDefaultCheck, clang::tidy::readability::DeleteNullPointerCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::IsolateDeclarationCheck, clang::tidy::readability::MisplacedArrayIndexCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::readability::StaticDefinitionInAnonymousNamespaceCheck, clang::tidy::readability::StringCompareCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::abseil::DurationDivisionCheck, clang::tidy::android::CloexecAccept4Check, clang::tidy::android::CloexecAcceptCheck, clang::tidy::android::CloexecCreatCheck, clang::tidy::android::CloexecEpollCreate1Check, clang::tidy::android::CloexecEpollCreateCheck, clang::tidy::android::CloexecInotifyInit1Check, clang::tidy::android::CloexecInotifyInitCheck, clang::tidy::android::CloexecMemfdCreateCheck, clang::tidy::android::CloexecSocketCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::ParentVirtualCallCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck, clang::tidy::bugprone::SuspiciousMemsetUsageCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::cert::ThrownExceptionTypeCheck, clang::tidy::cert::VariadicFunctionDefCheck, clang::tidy::cppcoreguidelines::InterfacesGlobalInitCheck, clang::tidy::cppcoreguidelines::ProBoundsArrayToPointerDecayCheck, clang::tidy::cppcoreguidelines::ProTypeConstCastCheck, clang::tidy::cppcoreguidelines::ProTypeReinterpretCastCheck, clang::tidy::fuchsia::DefaultArgumentsCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::fuchsia::OverloadedOperatorCheck, clang::tidy::fuchsia::VirtualInheritanceCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::hicpp::NoAssemblerCheck, clang::tidy::modernize::AvoidCArraysCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::readability::ConstReturnTypeCheck, clang::tidy::readability::NonConstParameterCheck, clang::tidy::readability::RedundantFunctionPtrDereferenceCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::google::DefaultArgumentsCheck, clang::tidy::google::ExplicitConstructorCheck, clang::tidy::google::runtime::NonConstReferences, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::performance::ImplicitConversionInLoopCheck, clang::tidy::readability::AvoidConstParamsInDecls, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::RedundantDeclarationCheck, clang::tidy::readability::SimplifySubscriptExprCheck, clang::tidy::llvm::TwineLocalCheck, clang::tidy::misc::NonCopyableObjectsCheck, clang::tidy::misc::UnusedAliasDeclsCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::modernize::ConcatNestedNamespacesCheck, clang::tidy::bugprone::SwappedArgumentsCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::readability::RedundantStringCStrCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::modernize::UseAutoCheck, and clang::tidy::modernize::UseNullptrCheck.

Definition at line 90 of file ClangTidyCheck.h.

References Description, diag(), and Loc.

Referenced by diag().

◆ diag()

DiagnosticBuilder clang::tidy::ClangTidyCheck::diag ( SourceLocation  Loc,
StringRef  Description,
DiagnosticIDs::Level  Level = DiagnosticIDs::Warning 
)

Add a diagnostic with the check's name.

Definition at line 21 of file ClangTidyCheck.cpp.

References check(), clang::tidy::ClangTidyContext::diag(), and Result.

Referenced by clang::tidy::modernize::UseOverrideCheck::check(), clang::tidy::google::runtime::NonConstReferences::check(), clang::tidy::modernize::UseBoolLiteralsCheck::check(), clang::tidy::modernize::UseTransparentFunctorsCheck::check(), clang::tidy::readability::SimplifySubscriptExprCheck::check(), clang::tidy::bugprone::SuspiciousEnumUsageCheck::check(), clang::tidy::performance::ForRangeCopyCheck::check(), clang::tidy::bugprone::DanglingHandleCheck::check(), clang::tidy::bugprone::SizeofExpressionCheck::check(), clang::tidy::bugprone::StringConstructorCheck::check(), clang::tidy::bugprone::SuspiciousStringCompareCheck::check(), clang::tidy::bugprone::UnusedReturnValueCheck::check(), clang::tidy::readability::ImplicitBoolConversionCheck::check(), clang::tidy::performance::UnnecessaryValueParamCheck::check(), clang::tidy::modernize::UseDefaultMemberInitCheck::check(), clang::tidy::performance::InefficientStringConcatenationCheck::check(), clang::tidy::performance::UnnecessaryCopyInitialization::check(), clang::tidy::objc::ForbiddenSubclassingCheck::check(), clang::tidy::portability::SIMDIntrinsicsCheck::check(), clang::tidy::performance::MoveConstructorInitCheck::check(), clang::tidy::modernize::UseEmplaceCheck::check(), clang::tidy::modernize::ReplaceRandomShuffleCheck::check(), clang::tidy::modernize::MakeSmartPtrCheck::check(), clang::tidy::performance::FasterStringFindCheck::check(), clang::tidy::readability::ContainerSizeEmptyCheck::check(), clang::tidy::modernize::RawStringLiteralCheck::check(), clang::tidy::google::readability::GlobalNamesInHeadersCheck::check(), clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck::check(), clang::tidy::misc::ThrowByValueCatchByReferenceCheck::check(), clang::tidy::abseil::StringFindStartswithCheck::check(), clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck::check(), clang::tidy::bugprone::MisplacedWideningCastCheck::check(), clang::tidy::bugprone::TooSmallLoopVariableCheck::check(), clang::tidy::performance::TypePromotionInMathFnCheck::check(), clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::check(), clang::tidy::modernize::UseNoexceptCheck::check(), clang::tidy::misc::DefinitionsInHeadersCheck::check(), clang::tidy::modernize::UseNodiscardCheck::check(), clang::tidy::modernize::UseEqualsDefaultCheck::check(), clang::tidy::readability::BracesAroundStatementsCheck::check(), check(), clang::tidy::readability::UppercaseLiteralSuffixCheck::checkBoundMatch(), clang::tidy::cert::ProperlySeededRandomGeneratorCheck::checkSeed(), clang::tidy::cppcoreguidelines::getValueAsString(), clang::tidy::cppcoreguidelines::isEmpty(), clang::tidy::performance::UnnecessaryValueParamCheck::onEndOfTranslationUnit(), and clang::tidy::readability::IdentifierNamingCheck::onEndOfTranslationUnit().

◆ getCurrentMainFile()

StringRef clang::tidy::ClangTidyCheck::getCurrentMainFile ( ) const
inlineprotected

Returns the main file name of the current translation unit.

Definition at line 186 of file ClangTidyCheck.h.

References clang::tidy::ClangTidyContext::getCurrentFile().

◆ getLangOpts()

const LangOptions& clang::tidy::ClangTidyCheck::getLangOpts ( ) const
inlineprotected

◆ registerMatchers()

virtual void clang::tidy::ClangTidyCheck::registerMatchers ( ast_matchers::MatchFinder *  Finder)
inlinevirtual

Override this to register AST matchers with Finder.

This should be used by clang-tidy checks that analyze code properties that dependent on AST knowledge.

You can register as many matchers as necessary with Finder. Usually, "this" will be used as callback, but you can also specify other callback classes. Thereby, different matchers can trigger different callbacks.

If you need to merge information between the different matchers, you can store these as members of the derived class. However, note that all matches occur in the order of the AST traversal.

Reimplemented in clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::bugprone::ForwardDeclarationNamespaceCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::readability::IdentifierNamingCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::google::build::UsingNamespaceDirectiveCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::modernize::RedundantVoidArgCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::bugprone::BoolPointerImplicitConversionCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::google::objc::FunctionNamingCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::misc::UnconventionalAssignOperatorCheck, clang::tidy::readability::NamedParameterCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::google::readability::AvoidCStyleCastsCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::android::CloexecOpenCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::FoldInitTypeCheck, clang::tidy::cppcoreguidelines::SlicingCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::mpi::BufferDerefCheck, clang::tidy::mpi::TypeMismatchCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::abseil::RedundantStrcatCallsCheck, clang::tidy::bugprone::IncorrectRoundingsCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::objc::PropertyDeclarationCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::zircon::TemporaryObjectsCheck, clang::tidy::abseil::DurationFactoryFloatCheck, clang::tidy::abseil::DurationFactoryScaleCheck, clang::tidy::android::CloexecFopenCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::cert::CommandProcessorCheck, clang::tidy::cert::LimitedRandomnessCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::google::objc::AvoidThrowingObjCExceptionCheck, clang::tidy::google::build::ExplicitMakePairCheck, clang::tidy::google::objc::GlobalVariableDeclarationCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::RedundantControlFlowCheck, clang::tidy::abseil::UpgradeDurationConversionsCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::MisplacedOperatorInStrlenInAllocCheck, clang::tidy::bugprone::MultipleStatementMacroCheck, clang::tidy::bugprone::UndefinedMemoryManipulationCheck, clang::tidy::cert::FloatLoopCounter, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::cppcoreguidelines::ProBoundsPointerArithmeticCheck, clang::tidy::fuchsia::StaticallyConstructedObjectsCheck, clang::tidy::fuchsia::TrailingReturnCheck, clang::tidy::google::runtime::OverloadedUnaryAndCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::StaticAssertCheck, clang::tidy::misc::UnusedUsingDeclsCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::modernize::ShrinkToFitCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseUncaughtExceptionsCheck, clang::tidy::objc::SuperSelfCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::openmp::UseDefaultNoneCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::readability::MisleadingIndentationCheck, clang::tidy::readability::SimplifyBooleanExprCheck, clang::tidy::readability::UppercaseLiteralSuffixCheck, clang::tidy::abseil::DurationAdditionCheck, clang::tidy::abseil::DurationComparisonCheck, clang::tidy::abseil::DurationConversionCastCheck, clang::tidy::abseil::DurationSubtractionCheck, clang::tidy::abseil::DurationUnnecessaryConversionCheck, clang::tidy::abseil::FasterStrsplitDelimiterCheck, clang::tidy::abseil::NoInternalDependenciesCheck, clang::tidy::abseil::NoNamespaceCheck, clang::tidy::abseil::StrCatAppendCheck, clang::tidy::abseil::TimeComparisonCheck, clang::tidy::abseil::TimeSubtractionCheck, clang::tidy::android::CloexecDupCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::IntegerDivisionCheck, clang::tidy::bugprone::SizeofContainerCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::SuspiciousSemicolonCheck, clang::tidy::bugprone::TerminatingContinueCheck, clang::tidy::bugprone::ThrowKeywordMissingCheck, clang::tidy::bugprone::UndelegatedConstructorCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::PostfixOperatorCheck, clang::tidy::cert::StaticObjectExceptionCheck, clang::tidy::cert::StrToNumCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::ProTypeCstyleCastCheck, clang::tidy::cppcoreguidelines::ProTypeStaticCastDowncastCheck, clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck, clang::tidy::cppcoreguidelines::ProTypeVarargCheck, clang::tidy::hicpp::SignedBitwiseCheck, clang::tidy::misc::MisplacedConstCheck, clang::tidy::misc::RedundantExpressionCheck, clang::tidy::modernize::DeprecatedIosBaseAliasesCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::ReturnBracedInitListCheck, clang::tidy::modernize::UnaryStaticAssertCheck, clang::tidy::objc::AvoidNSErrorInitCheck, clang::tidy::objc::AvoidSpinlockCheck, clang::tidy::performance::InefficientAlgorithmCheck, clang::tidy::readability::DeletedDefaultCheck, clang::tidy::readability::DeleteNullPointerCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::IsolateDeclarationCheck, clang::tidy::readability::MisplacedArrayIndexCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::readability::StaticDefinitionInAnonymousNamespaceCheck, clang::tidy::readability::StringCompareCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::abseil::DurationDivisionCheck, clang::tidy::android::CloexecAccept4Check, clang::tidy::android::CloexecAcceptCheck, clang::tidy::android::CloexecCreatCheck, clang::tidy::android::CloexecEpollCreate1Check, clang::tidy::android::CloexecEpollCreateCheck, clang::tidy::android::CloexecInotifyInit1Check, clang::tidy::android::CloexecInotifyInitCheck, clang::tidy::android::CloexecMemfdCreateCheck, clang::tidy::android::CloexecSocketCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::ParentVirtualCallCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck, clang::tidy::bugprone::SuspiciousMemsetUsageCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::cert::ThrownExceptionTypeCheck, clang::tidy::cert::VariadicFunctionDefCheck, clang::tidy::cppcoreguidelines::InterfacesGlobalInitCheck, clang::tidy::cppcoreguidelines::ProBoundsArrayToPointerDecayCheck, clang::tidy::cppcoreguidelines::ProTypeConstCastCheck, clang::tidy::cppcoreguidelines::ProTypeReinterpretCastCheck, clang::tidy::fuchsia::DefaultArgumentsCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::fuchsia::OverloadedOperatorCheck, clang::tidy::fuchsia::VirtualInheritanceCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::hicpp::NoAssemblerCheck, clang::tidy::modernize::AvoidCArraysCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::readability::ConstReturnTypeCheck, clang::tidy::readability::NonConstParameterCheck, clang::tidy::readability::RedundantFunctionPtrDereferenceCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::google::DefaultArgumentsCheck, clang::tidy::google::ExplicitConstructorCheck, clang::tidy::google::runtime::NonConstReferences, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::performance::ImplicitConversionInLoopCheck, clang::tidy::readability::AvoidConstParamsInDecls, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::RedundantDeclarationCheck, clang::tidy::readability::SimplifySubscriptExprCheck, clang::tidy::llvm::TwineLocalCheck, clang::tidy::misc::NonCopyableObjectsCheck, clang::tidy::misc::UnusedAliasDeclsCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::modernize::ConcatNestedNamespacesCheck, clang::tidy::bugprone::SwappedArgumentsCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::readability::RedundantStringCStrCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::modernize::UseAutoCheck, and clang::tidy::modernize::UseNullptrCheck.

Definition at line 86 of file ClangTidyCheck.h.

◆ registerPPCallbacks()

virtual void clang::tidy::ClangTidyCheck::registerPPCallbacks ( const SourceManager &  SM,
Preprocessor *  PP,
Preprocessor *  ModuleExpanderPP 
)
inlinevirtual

Override this to register PPCallbacks in the preprocessor.

This should be used for clang-tidy checks that analyze preprocessor- dependent properties, e.g. include directives and macro definitions.

There are two Preprocessors to choose from that differ in how they handle modular #includes:

  • PP is the real Preprocessor. It doesn't walk into modular #includes and thus doesn't generate PPCallbacks for their contents.
  • ModuleExpanderPP preprocesses the whole translation unit in the non-modular mode, which allows it to generate PPCallbacks not only for the main file and textual headers, but also for all transitively included modular headers when the analysis runs with modules enabled. When modules are not enabled ModuleExpanderPP just points to the real preprocessor.

Reimplemented in clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::IdentifierNamingCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::modernize::DeprecatedHeadersCheck, clang::tidy::bugprone::MacroParenthesesCheck, clang::tidy::utils::HeaderGuardCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::fuchsia::RestrictSystemIncludesCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::readability::RedundantPreprocessorCheck, clang::tidy::google::readability::AvoidUnderscoreInGoogletestNameCheck, clang::tidy::google::readability::TodoCommentCheck, clang::tidy::llvm::IncludeOrderCheck, clang::tidy::modernize::PassByValueCheck, and clang::tidy::bugprone::MacroRepeatedSideEffectsCheck.

Definition at line 71 of file ClangTidyCheck.h.

◆ storeOptions()

virtual void clang::tidy::ClangTidyCheck::storeOptions ( ClangTidyOptions::OptionMap Options)
inlinevirtual

Should store all options supported by this check with their current values or default values for options that haven't been overridden.

The check should use Options.store() to store each option it supports whether it has the default value or it has been overridden.

Reimplemented in clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::readability::IdentifierNamingCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::fuchsia::RestrictSystemIncludesCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::readability::UppercaseLiteralSuffixCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::zircon::TemporaryObjectsCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::google::runtime::NonConstReferences, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::readability::SimplifyBooleanExprCheck, clang::tidy::readability::SimplifySubscriptExprCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseAutoCheck, and clang::tidy::modernize::UseNullptrCheck.

Definition at line 101 of file ClangTidyCheck.h.

References Result.

Referenced by clang::tidy::modernize::RawStringLiteralCheck::storeOptions().

Member Data Documentation

◆ Options

OptionsView clang::tidy::ClangTidyCheck::Options
protected

The documentation for this class was generated from the following files: