clang-tools  14.0.0git
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::altera::IdDependentBackwardBranchCheck, clang::tidy::altera::KernelNameRestrictionCheck, clang::tidy::altera::SingleWorkItemBarrierCheck, clang::tidy::altera::StructPackAlignCheck, clang::tidy::altera::UnrollLoopsCheck, clang::tidy::android::CloexecCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::bugprone::BadSignalToKillThreadCheck, clang::tidy::bugprone::BoolPointerImplicitConversionCheck, clang::tidy::bugprone::BranchCloneCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::DynamicStaticInitializersCheck, clang::tidy::bugprone::EasilySwappableParametersCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::FoldInitTypeCheck, clang::tidy::bugprone::ForwardDeclarationNamespaceCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::bugprone::ImplicitWideningOfMultiplicationResultCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::bugprone::IncorrectRoundingsCheck, clang::tidy::bugprone::InfiniteLoopCheck, clang::tidy::bugprone::IntegerDivisionCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::bugprone::MacroParenthesesCheck, clang::tidy::bugprone::MacroRepeatedSideEffectsCheck, clang::tidy::bugprone::MisplacedOperatorInStrlenInAllocCheck, clang::tidy::bugprone::MisplacedPointerArithmeticInAllocCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::bugprone::MultipleStatementMacroCheck, clang::tidy::bugprone::NoEscapeCheck, clang::tidy::bugprone::NotNullTerminatedResultCheck, clang::tidy::bugprone::ParentVirtualCallCheck, clang::tidy::bugprone::PosixReturnCheck, clang::tidy::bugprone::RedundantBranchConditionCheck, clang::tidy::bugprone::SignalHandlerCheck, clang::tidy::bugprone::SignedCharMisuseCheck, clang::tidy::bugprone::SizeofContainerCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::SpuriouslyWakeUpFunctionsCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::bugprone::SuspiciousIncludeCheck, clang::tidy::bugprone::SuspiciousMemoryComparisonCheck, 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::UnhandledExceptionAtNewCheck, clang::tidy::bugprone::UnhandledSelfAssignmentCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cert::CommandProcessorCheck, clang::tidy::cert::DefaultOperatorNewAlignmentCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::FloatLoopCounter, clang::tidy::cert::LimitedRandomnessCheck, clang::tidy::cert::MutatingCopyCheck, clang::tidy::cert::NonTrivialTypesLibcMemoryCallsCheck, 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::concurrency::MtUnsafeCheck, clang::tidy::concurrency::ThreadCanceltypeAsynchronousCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::AvoidNonConstGlobalVariablesCheck, clang::tidy::cppcoreguidelines::InitVariablesCheck, clang::tidy::cppcoreguidelines::InterfacesGlobalInitCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck, 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::cppcoreguidelines::VirtualClassDestructorCheck, clang::tidy::darwin::AvoidSpinlockCheck, clang::tidy::darwin::DispatchOnceNonstaticCheck, clang::tidy::fuchsia::DefaultArgumentsCallsCheck, clang::tidy::fuchsia::DefaultArgumentsDeclarationsCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::fuchsia::OverloadedOperatorCheck, 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::AvoidNSObjectNewCheck, 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::OverloadedUnaryAndCheck, clang::tidy::google::UpgradeGoogletestCaseCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::hicpp::NoAssemblerCheck, clang::tidy::hicpp::SignedBitwiseCheck, clang::tidy::linuxkernel::MustCheckErrsCheck, clang::tidy::llvm_check::IncludeOrderCheck, clang::tidy::llvm_check::PreferIsaOrDynCastInConditionalsCheck, clang::tidy::llvm_check::PreferRegisterOverUnsignedCheck, clang::tidy::llvm_check::TwineLocalCheck, clang::tidy::llvm_libc::CalleeNamespaceCheck, clang::tidy::llvm_libc::ImplementationInNamespaceCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::misc::MisplacedConstCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::NonCopyableObjectsCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::misc::NoRecursionCheck, 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::ReplaceDisallowCopyAndAssignMacroCheck, 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::UseTrailingReturnTypeCheck, 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::DeallocInCategoryCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::objc::MissingHashCheck, clang::tidy::objc::NSInvocationArgumentLifetimeCheck, 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::NoAutomaticMoveCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::performance::NoIntToPtrCheck, clang::tidy::performance::TriviallyDestructibleCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::portability::RestrictSystemIncludesCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::AvoidConstParamsInDecls, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::readability::ConstReturnTypeCheck, clang::tidy::readability::ContainerDataPointerCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::readability::ConvertMemberFunctionsToStatic, clang::tidy::readability::DeleteNullPointerCheck, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::FunctionCognitiveComplexityCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::readability::IdentifierLengthCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::readability::IsolateDeclarationCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::MakeMemberFunctionConstCheck, clang::tidy::readability::MisleadingIndentationCheck, clang::tidy::readability::MisplacedArrayIndexCheck, clang::tidy::readability::NamedParameterCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::NonConstParameterCheck, clang::tidy::readability::QualifiedAutoCheck, clang::tidy::readability::RedundantAccessSpecifiersCheck, 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::SuspiciousCallArgumentCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::readability::UppercaseLiteralSuffixCheck, clang::tidy::readability::UseAnyOfAllOfCheck, clang::tidy::RenamerClangTidyCheck, clang::tidy::utils::HeaderGuardCheck, clang::tidy::utils::TransformerClangTidyCheck, 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 bool isLanguageVersionSupported (const LangOptions &LangOpts) const
 Override this to disable registering matchers and PP callbacks if an invalid language version is being used. 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...
 
DiagnosticBuilder diag (StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning)
 Add a diagnostic with the check's name. More...
 
DiagnosticBuilder configurationDiag (StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning) const
 Adds a diagnostic to report errors in the check's configuration. 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 54 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 18 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::RenamerClangTidyCheck, clang::tidy::altera::IdDependentBackwardBranchCheck, clang::tidy::llvm_check::PreferIsaOrDynCastInConditionalsCheck, clang::tidy::readability::SuspiciousCallArgumentCheck, clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::bugprone::ForwardDeclarationNamespaceCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::google::build::UsingNamespaceDirectiveCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::modernize::RedundantVoidArgCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::readability::FunctionCognitiveComplexityCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::bugprone::ImplicitWideningOfMultiplicationResultCheck, clang::tidy::modernize::UseTrailingReturnTypeCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::google::objc::FunctionNamingCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::misc::UnconventionalAssignOperatorCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::bugprone::DynamicStaticInitializersCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::google::readability::AvoidCStyleCastsCheck, clang::tidy::google::build::ExplicitMakePairCheck, clang::tidy::linuxkernel::MustCheckErrsCheck, clang::tidy::performance::TriviallyDestructibleCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::google::runtime::OverloadedUnaryAndCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::readability::ContainerDataPointerCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::abseil::RedundantStrcatCallsCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::bugprone::BoolPointerImplicitConversionCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cppcoreguidelines::VirtualClassDestructorCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::objc::PropertyDeclarationCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::readability::NamedParameterCheck, clang::tidy::readability::QualifiedAutoCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::abseil::UpgradeDurationConversionsCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::bugprone::UnhandledSelfAssignmentCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::google::objc::AvoidNSObjectNewCheck, clang::tidy::google::objc::AvoidThrowingObjCExceptionCheck, clang::tidy::google::objc::GlobalVariableDeclarationCheck, clang::tidy::google::UpgradeGoogletestCaseCheck, clang::tidy::mpi::BufferDerefCheck, clang::tidy::mpi::TypeMismatchCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::UseAnyOfAllOfCheck, clang::tidy::altera::SingleWorkItemBarrierCheck, clang::tidy::android::CloexecOpenCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::FoldInitTypeCheck, clang::tidy::bugprone::NoEscapeCheck, clang::tidy::bugprone::SignedCharMisuseCheck, clang::tidy::cert::NonTrivialTypesLibcMemoryCallsCheck, clang::tidy::cppcoreguidelines::SlicingCheck, clang::tidy::fuchsia::StaticallyConstructedObjectsCheck, clang::tidy::fuchsia::TrailingReturnCheck, clang::tidy::google::ExplicitConstructorCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::NoRecursionCheck, clang::tidy::misc::StaticAssertCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::ShrinkToFitCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseUncaughtExceptionsCheck, clang::tidy::objc::DeallocInCategoryCheck, clang::tidy::objc::NSInvocationArgumentLifetimeCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::openmp::UseDefaultNoneCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::readability::RedundantAccessSpecifiersCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::abseil::FasterStrsplitDelimiterCheck, clang::tidy::abseil::NoInternalDependenciesCheck, clang::tidy::abseil::NoNamespaceCheck, clang::tidy::abseil::StrCatAppendCheck, clang::tidy::altera::UnrollLoopsCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::bugprone::BranchCloneCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::IncorrectRoundingsCheck, clang::tidy::bugprone::NotNullTerminatedResultCheck, clang::tidy::bugprone::SignalHandlerCheck, clang::tidy::bugprone::ThrowKeywordMissingCheck, clang::tidy::bugprone::UndelegatedConstructorCheck, clang::tidy::bugprone::UnhandledExceptionAtNewCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::cert::DefaultOperatorNewAlignmentCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::MutatingCopyCheck, clang::tidy::cert::PostfixOperatorCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::cert::StaticObjectExceptionCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::InitVariablesCheck, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck, clang::tidy::cppcoreguidelines::ProTypeCstyleCastCheck, clang::tidy::cppcoreguidelines::ProTypeStaticCastDowncastCheck, clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck, clang::tidy::cppcoreguidelines::ProTypeVarargCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::llvm_libc::CalleeNamespaceCheck, clang::tidy::llvm_libc::ImplementationInNamespaceCheck, clang::tidy::modernize::DeprecatedIosBaseAliasesCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::ReturnBracedInitListCheck, clang::tidy::modernize::UnaryStaticAssertCheck, clang::tidy::objc::AvoidNSErrorInitCheck, clang::tidy::objc::MissingHashCheck, clang::tidy::objc::SuperSelfCheck, clang::tidy::performance::InefficientAlgorithmCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::StringCompareCheck, clang::tidy::zircon::TemporaryObjectsCheck, clang::tidy::abseil::DurationDivisionCheck, clang::tidy::abseil::DurationFactoryFloatCheck, clang::tidy::abseil::DurationFactoryScaleCheck, clang::tidy::android::CloexecFopenCheck, clang::tidy::bugprone::SpuriouslyWakeUpFunctionsCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::cert::CommandProcessorCheck, clang::tidy::cert::LimitedRandomnessCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::cert::ThrownExceptionTypeCheck, clang::tidy::cert::VariadicFunctionDefCheck, clang::tidy::cppcoreguidelines::ProBoundsArrayToPointerDecayCheck, clang::tidy::cppcoreguidelines::ProTypeConstCastCheck, clang::tidy::cppcoreguidelines::ProTypeReinterpretCastCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::modernize::AvoidCArraysCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::MakeMemberFunctionConstCheck, clang::tidy::readability::RedundantControlFlowCheck, clang::tidy::altera::StructPackAlignCheck, clang::tidy::bugprone::MisplacedOperatorInStrlenInAllocCheck, clang::tidy::bugprone::MisplacedPointerArithmeticInAllocCheck, clang::tidy::bugprone::MultipleStatementMacroCheck, clang::tidy::bugprone::UndefinedMemoryManipulationCheck, clang::tidy::cert::FloatLoopCounter, clang::tidy::cppcoreguidelines::ProBoundsPointerArithmeticCheck, clang::tidy::google::DefaultArgumentsCheck, clang::tidy::llvm_check::PreferRegisterOverUnsignedCheck, clang::tidy::misc::UnusedUsingDeclsCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::performance::ImplicitConversionInLoopCheck, clang::tidy::readability::ConvertMemberFunctionsToStatic, clang::tidy::readability::IdentifierLengthCheck, clang::tidy::readability::MisleadingIndentationCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::readability::SimplifyBooleanExprCheck, clang::tidy::readability::SimplifySubscriptExprCheck, 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::TimeComparisonCheck, clang::tidy::abseil::TimeSubtractionCheck, clang::tidy::android::CloexecDupCheck, clang::tidy::bugprone::EasilySwappableParametersCheck, clang::tidy::bugprone::InfiniteLoopCheck, clang::tidy::bugprone::IntegerDivisionCheck, clang::tidy::bugprone::RedundantBranchConditionCheck, clang::tidy::bugprone::SizeofContainerCheck, clang::tidy::bugprone::SuspiciousMemoryComparisonCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::SuspiciousSemicolonCheck, clang::tidy::bugprone::TerminatingContinueCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::cert::StrToNumCheck, clang::tidy::cppcoreguidelines::AvoidNonConstGlobalVariablesCheck, clang::tidy::darwin::AvoidSpinlockCheck, clang::tidy::darwin::DispatchOnceNonstaticCheck, clang::tidy::misc::MisplacedConstCheck, clang::tidy::misc::RedundantExpressionCheck, clang::tidy::misc::UnusedAliasDeclsCheck, clang::tidy::modernize::ConcatNestedNamespacesCheck, clang::tidy::modernize::UseNullptrCheck, clang::tidy::performance::NoAutomaticMoveCheck, clang::tidy::readability::DeleteNullPointerCheck, clang::tidy::readability::IsolateDeclarationCheck, clang::tidy::readability::MisplacedArrayIndexCheck, clang::tidy::readability::StaticDefinitionInAnonymousNamespaceCheck, 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::CloexecPipe2Check, clang::tidy::android::CloexecPipeCheck, clang::tidy::android::CloexecSocketCheck, clang::tidy::bugprone::BadSignalToKillThreadCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::ParentVirtualCallCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck, clang::tidy::bugprone::SuspiciousMemsetUsageCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::concurrency::MtUnsafeCheck, clang::tidy::concurrency::ThreadCanceltypeAsynchronousCheck, clang::tidy::cppcoreguidelines::InterfacesGlobalInitCheck, clang::tidy::fuchsia::DefaultArgumentsCallsCheck, clang::tidy::fuchsia::DefaultArgumentsDeclarationsCheck, clang::tidy::fuchsia::OverloadedOperatorCheck, clang::tidy::fuchsia::VirtualInheritanceCheck, clang::tidy::hicpp::NoAssemblerCheck, clang::tidy::hicpp::SignedBitwiseCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::performance::NoIntToPtrCheck, clang::tidy::readability::ConstReturnTypeCheck, clang::tidy::readability::NonConstParameterCheck, clang::tidy::readability::RedundantDeclarationCheck, clang::tidy::readability::RedundantFunctionPtrDereferenceCheck, clang::tidy::readability::RedundantStringCStrCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::modernize::UseAutoCheck, clang::tidy::readability::AvoidConstParamsInDecls, clang::tidy::llvm_check::TwineLocalCheck, clang::tidy::misc::NonCopyableObjectsCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::bugprone::SwappedArgumentsCheck, clang::tidy::bugprone::PosixReturnCheck, clang::tidy::utils::TransformerClangTidyCheck, and clang::tidy::modernize::MakeSmartPtrCheck.

Definition at line 113 of file ClangTidyCheck.h.

◆ configurationDiag()

DiagnosticBuilder clang::tidy::ClangTidyCheck::configurationDiag ( StringRef  Description,
DiagnosticIDs::Level  Level = DiagnosticIDs::Warning 
) const

Adds a diagnostic to report errors in the check's configuration.

Definition at line 36 of file ClangTidyCheck.cpp.

◆ diag() [1/2]

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

◆ diag() [2/2]

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

Add a diagnostic with the check's name.

Definition at line 30 of file ClangTidyCheck.cpp.

◆ getCurrentMainFile()

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

Returns the main file name of the current translation unit.

Definition at line 418 of file ClangTidyCheck.h.

◆ getLangOpts()

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

Returns the language options from the context.

Definition at line 420 of file ClangTidyCheck.h.

◆ isLanguageVersionSupported()

virtual bool clang::tidy::ClangTidyCheck::isLanguageVersionSupported ( const LangOptions &  LangOpts) const
inlinevirtual

Override this to disable registering matchers and PP callbacks if an invalid language version is being used.

For example if a check is examining overloaded functions then this should be overridden to return false when the CPlusPlus flag is not set in LangOpts.

Reimplemented in clang::tidy::readability::ContainerDataPointerCheck, clang::tidy::llvm_check::PreferIsaOrDynCastInConditionalsCheck, clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::modernize::ReplaceDisallowCopyAndAssignMacroCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::google::build::UsingNamespaceDirectiveCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::modernize::DeprecatedHeadersCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::modernize::RedundantVoidArgCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::modernize::MakeUniqueCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::google::objc::FunctionNamingCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::misc::UnconventionalAssignOperatorCheck, clang::tidy::modernize::UseTrailingReturnTypeCheck, clang::tidy::google::build::ExplicitMakePairCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::performance::TriviallyDestructibleCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::bugprone::DynamicStaticInitializersCheck, clang::tidy::google::runtime::OverloadedUnaryAndCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::abseil::RedundantStrcatCallsCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::objc::PropertyDeclarationCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::abseil::UpgradeDurationConversionsCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::bugprone::SignalHandlerCheck, clang::tidy::cppcoreguidelines::VirtualClassDestructorCheck, clang::tidy::google::objc::AvoidNSObjectNewCheck, clang::tidy::google::objc::AvoidThrowingObjCExceptionCheck, clang::tidy::google::objc::GlobalVariableDeclarationCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::readability::QualifiedAutoCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::NoEscapeCheck, clang::tidy::bugprone::UnhandledSelfAssignmentCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::fuchsia::StaticallyConstructedObjectsCheck, clang::tidy::fuchsia::TrailingReturnCheck, clang::tidy::google::ExplicitConstructorCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::StaticAssertCheck, clang::tidy::modernize::ShrinkToFitCheck, clang::tidy::modernize::UseUncaughtExceptionsCheck, clang::tidy::objc::DeallocInCategoryCheck, clang::tidy::objc::NSInvocationArgumentLifetimeCheck, clang::tidy::openmp::UseDefaultNoneCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::RedundantAccessSpecifiersCheck, clang::tidy::readability::UseAnyOfAllOfCheck, clang::tidy::abseil::FasterStrsplitDelimiterCheck, clang::tidy::abseil::NoInternalDependenciesCheck, clang::tidy::abseil::NoNamespaceCheck, clang::tidy::abseil::StrCatAppendCheck, clang::tidy::abseil::StringFindStrContainsCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::ThrowKeywordMissingCheck, clang::tidy::bugprone::UndelegatedConstructorCheck, clang::tidy::bugprone::UnhandledExceptionAtNewCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::cert::DefaultOperatorNewAlignmentCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::MutatingCopyCheck, clang::tidy::cert::NonTrivialTypesLibcMemoryCallsCheck, clang::tidy::cert::PostfixOperatorCheck, clang::tidy::cert::StaticObjectExceptionCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::ProTypeCstyleCastCheck, clang::tidy::cppcoreguidelines::ProTypeStaticCastDowncastCheck, clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck, clang::tidy::cppcoreguidelines::ProTypeVarargCheck, clang::tidy::google::UpgradeGoogletestCaseCheck, clang::tidy::llvm_libc::CalleeNamespaceCheck, clang::tidy::llvm_libc::ImplementationInNamespaceCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::DeprecatedIosBaseAliasesCheck, clang::tidy::modernize::ReturnBracedInitListCheck, clang::tidy::modernize::UnaryStaticAssertCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::objc::AvoidNSErrorInitCheck, clang::tidy::objc::MissingHashCheck, clang::tidy::objc::SuperSelfCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::performance::InefficientAlgorithmCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::StringCompareCheck, clang::tidy::abseil::DurationDivisionCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::cert::ThrownExceptionTypeCheck, clang::tidy::cert::VariadicFunctionDefCheck, clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck, clang::tidy::cppcoreguidelines::ProBoundsArrayToPointerDecayCheck, clang::tidy::cppcoreguidelines::ProTypeConstCastCheck, clang::tidy::cppcoreguidelines::ProTypeReinterpretCastCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::modernize::AvoidCArraysCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::readability::MakeMemberFunctionConstCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::performance::ImplicitConversionInLoopCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::SimplifySubscriptExprCheck, clang::tidy::misc::UnusedAliasDeclsCheck, clang::tidy::modernize::ConcatNestedNamespacesCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::performance::NoAutomaticMoveCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::readability::RedundantStringCStrCheck, clang::tidy::modernize::UseAutoCheck, and clang::tidy::modernize::UseNullptrCheck.

Definition at line 69 of file ClangTidyCheck.h.

◆ 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.

This will only be executed if the function isLanguageVersionSupported returns true.

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::RenamerClangTidyCheck, clang::tidy::altera::IdDependentBackwardBranchCheck, clang::tidy::llvm_check::PreferIsaOrDynCastInConditionalsCheck, clang::tidy::readability::SuspiciousCallArgumentCheck, clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::bugprone::ForwardDeclarationNamespaceCheck, clang::tidy::google::build::UsingNamespaceDirectiveCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::bugprone::MoveForwardingReferenceCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::modernize::RedundantVoidArgCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::readability::FunctionCognitiveComplexityCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::bugprone::ImplicitWideningOfMultiplicationResultCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::bugprone::ForwardingReferenceOverloadCheck, clang::tidy::google::objc::FunctionNamingCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::misc::UnconventionalAssignOperatorCheck, clang::tidy::modernize::UseTrailingReturnTypeCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::bugprone::DynamicStaticInitializersCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::google::readability::AvoidCStyleCastsCheck, clang::tidy::google::build::ExplicitMakePairCheck, clang::tidy::linuxkernel::MustCheckErrsCheck, clang::tidy::performance::TriviallyDestructibleCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::google::runtime::OverloadedUnaryAndCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::readability::ContainerSizeEmptyCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::abseil::RedundantStrcatCallsCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::bugprone::BoolPointerImplicitConversionCheck, clang::tidy::bugprone::VirtualNearMissCheck, clang::tidy::cppcoreguidelines::VirtualClassDestructorCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::objc::PropertyDeclarationCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::readability::ContainerDataPointerCheck, clang::tidy::readability::NamedParameterCheck, clang::tidy::readability::QualifiedAutoCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::abseil::UpgradeDurationConversionsCheck, clang::tidy::bugprone::InaccurateEraseCheck, clang::tidy::bugprone::UnhandledSelfAssignmentCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::google::objc::AvoidNSObjectNewCheck, clang::tidy::google::objc::AvoidThrowingObjCExceptionCheck, clang::tidy::google::objc::GlobalVariableDeclarationCheck, clang::tidy::mpi::BufferDerefCheck, clang::tidy::mpi::TypeMismatchCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::performance::NoexceptMoveConstructorCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::readability::UseAnyOfAllOfCheck, clang::tidy::altera::SingleWorkItemBarrierCheck, clang::tidy::android::CloexecOpenCheck, clang::tidy::boost::UseToStringCheck, clang::tidy::bugprone::FoldInitTypeCheck, clang::tidy::bugprone::NoEscapeCheck, clang::tidy::bugprone::SignedCharMisuseCheck, clang::tidy::cert::NonTrivialTypesLibcMemoryCallsCheck, clang::tidy::cppcoreguidelines::SlicingCheck, clang::tidy::fuchsia::StaticallyConstructedObjectsCheck, clang::tidy::fuchsia::TrailingReturnCheck, clang::tidy::google::ExplicitConstructorCheck, clang::tidy::misc::NewDeleteOverloadsCheck, clang::tidy::misc::NoRecursionCheck, clang::tidy::misc::StaticAssertCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::ShrinkToFitCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseUncaughtExceptionsCheck, clang::tidy::objc::DeallocInCategoryCheck, clang::tidy::objc::NSInvocationArgumentLifetimeCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::openmp::UseDefaultNoneCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::readability::RedundantAccessSpecifiersCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::abseil::FasterStrsplitDelimiterCheck, clang::tidy::abseil::NoInternalDependenciesCheck, clang::tidy::abseil::NoNamespaceCheck, clang::tidy::abseil::StrCatAppendCheck, clang::tidy::altera::UnrollLoopsCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::bugprone::BranchCloneCheck, clang::tidy::bugprone::CopyConstructorInitCheck, clang::tidy::bugprone::IncorrectRoundingsCheck, clang::tidy::bugprone::NotNullTerminatedResultCheck, clang::tidy::bugprone::SignalHandlerCheck, clang::tidy::bugprone::ThrowKeywordMissingCheck, clang::tidy::bugprone::UndelegatedConstructorCheck, clang::tidy::bugprone::UnhandledExceptionAtNewCheck, clang::tidy::bugprone::UseAfterMoveCheck, clang::tidy::cert::DefaultOperatorNewAlignmentCheck, clang::tidy::cert::DontModifyStdNamespaceCheck, clang::tidy::cert::MutatingCopyCheck, clang::tidy::cert::PostfixOperatorCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::cert::StaticObjectExceptionCheck, clang::tidy::cppcoreguidelines::AvoidGotoCheck, clang::tidy::cppcoreguidelines::InitVariablesCheck, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck, clang::tidy::cppcoreguidelines::ProTypeCstyleCastCheck, clang::tidy::cppcoreguidelines::ProTypeStaticCastDowncastCheck, clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck, clang::tidy::cppcoreguidelines::ProTypeVarargCheck, clang::tidy::google::UpgradeGoogletestCaseCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::llvm_libc::CalleeNamespaceCheck, clang::tidy::llvm_libc::ImplementationInNamespaceCheck, clang::tidy::modernize::DeprecatedIosBaseAliasesCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::ReturnBracedInitListCheck, clang::tidy::modernize::UnaryStaticAssertCheck, clang::tidy::objc::AvoidNSErrorInitCheck, clang::tidy::objc::MissingHashCheck, clang::tidy::objc::SuperSelfCheck, clang::tidy::performance::InefficientAlgorithmCheck, clang::tidy::readability::NamespaceCommentCheck, clang::tidy::readability::StringCompareCheck, clang::tidy::zircon::TemporaryObjectsCheck, clang::tidy::abseil::DurationDivisionCheck, clang::tidy::abseil::DurationFactoryFloatCheck, clang::tidy::abseil::DurationFactoryScaleCheck, clang::tidy::android::CloexecFopenCheck, clang::tidy::bugprone::SpuriouslyWakeUpFunctionsCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::bugprone::StringIntegerAssignmentCheck, clang::tidy::bugprone::UnusedRaiiCheck, clang::tidy::cert::CommandProcessorCheck, clang::tidy::cert::LimitedRandomnessCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::cert::ThrownExceptionTypeCheck, clang::tidy::cert::VariadicFunctionDefCheck, clang::tidy::cppcoreguidelines::ProBoundsArrayToPointerDecayCheck, clang::tidy::cppcoreguidelines::ProTypeConstCastCheck, clang::tidy::cppcoreguidelines::ProTypeReinterpretCastCheck, clang::tidy::fuchsia::MultipleInheritanceCheck, clang::tidy::hicpp::ExceptionBaseclassCheck, clang::tidy::modernize::AvoidCArraysCheck, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::performance::MoveConstructorInitCheck, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::MakeMemberFunctionConstCheck, clang::tidy::readability::RedundantControlFlowCheck, clang::tidy::altera::StructPackAlignCheck, clang::tidy::bugprone::MisplacedOperatorInStrlenInAllocCheck, clang::tidy::bugprone::MisplacedPointerArithmeticInAllocCheck, clang::tidy::bugprone::MultipleStatementMacroCheck, clang::tidy::bugprone::UndefinedMemoryManipulationCheck, clang::tidy::cert::FloatLoopCounter, clang::tidy::cppcoreguidelines::ProBoundsPointerArithmeticCheck, clang::tidy::google::DefaultArgumentsCheck, clang::tidy::llvm_check::PreferRegisterOverUnsignedCheck, clang::tidy::misc::UnusedUsingDeclsCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::performance::ImplicitConversionInLoopCheck, clang::tidy::readability::ConvertMemberFunctionsToStatic, clang::tidy::readability::IdentifierLengthCheck, clang::tidy::readability::MisleadingIndentationCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::readability::SimplifyBooleanExprCheck, clang::tidy::readability::SimplifySubscriptExprCheck, 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::TimeComparisonCheck, clang::tidy::abseil::TimeSubtractionCheck, clang::tidy::android::CloexecDupCheck, clang::tidy::bugprone::EasilySwappableParametersCheck, clang::tidy::bugprone::InfiniteLoopCheck, clang::tidy::bugprone::IntegerDivisionCheck, clang::tidy::bugprone::RedundantBranchConditionCheck, clang::tidy::bugprone::SizeofContainerCheck, clang::tidy::bugprone::SuspiciousMemoryComparisonCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::SuspiciousSemicolonCheck, clang::tidy::bugprone::TerminatingContinueCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::cert::StrToNumCheck, clang::tidy::cppcoreguidelines::AvoidNonConstGlobalVariablesCheck, clang::tidy::darwin::AvoidSpinlockCheck, clang::tidy::darwin::DispatchOnceNonstaticCheck, clang::tidy::misc::MisplacedConstCheck, clang::tidy::misc::RedundantExpressionCheck, clang::tidy::misc::UnusedAliasDeclsCheck, clang::tidy::modernize::ConcatNestedNamespacesCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseNullptrCheck, clang::tidy::performance::NoAutomaticMoveCheck, clang::tidy::readability::DeleteNullPointerCheck, clang::tidy::readability::IsolateDeclarationCheck, clang::tidy::readability::MisplacedArrayIndexCheck, clang::tidy::readability::StaticDefinitionInAnonymousNamespaceCheck, 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::CloexecPipe2Check, clang::tidy::android::CloexecPipeCheck, clang::tidy::android::CloexecSocketCheck, clang::tidy::bugprone::BadSignalToKillThreadCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::ParentVirtualCallCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck, clang::tidy::bugprone::SuspiciousMemsetUsageCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::concurrency::MtUnsafeCheck, clang::tidy::concurrency::ThreadCanceltypeAsynchronousCheck, clang::tidy::cppcoreguidelines::InterfacesGlobalInitCheck, clang::tidy::fuchsia::DefaultArgumentsCallsCheck, clang::tidy::fuchsia::DefaultArgumentsDeclarationsCheck, clang::tidy::fuchsia::OverloadedOperatorCheck, clang::tidy::fuchsia::VirtualInheritanceCheck, clang::tidy::hicpp::NoAssemblerCheck, clang::tidy::hicpp::SignedBitwiseCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::performance::NoIntToPtrCheck, clang::tidy::readability::ConstReturnTypeCheck, clang::tidy::readability::NonConstParameterCheck, clang::tidy::readability::RedundantDeclarationCheck, clang::tidy::readability::RedundantFunctionPtrDereferenceCheck, clang::tidy::readability::RedundantStringCStrCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::modernize::UseAutoCheck, clang::tidy::readability::AvoidConstParamsInDecls, clang::tidy::llvm_check::TwineLocalCheck, clang::tidy::misc::NonCopyableObjectsCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::bugprone::SwappedArgumentsCheck, clang::tidy::bugprone::PosixReturnCheck, clang::tidy::utils::TransformerClangTidyCheck, and clang::tidy::modernize::MakeSmartPtrCheck.

Definition at line 109 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.

This will only be executed if the function isLanguageVersionSupported returns true.

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::RenamerClangTidyCheck, clang::tidy::utils::TransformerClangTidyCheck, clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::modernize::ReplaceDisallowCopyAndAssignMacroCheck, clang::tidy::modernize::DeprecatedHeadersCheck, clang::tidy::bugprone::SuspiciousIncludeCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::bugprone::LambdaFunctionNameCheck, clang::tidy::utils::HeaderGuardCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::modernize::UseTrailingReturnTypeCheck, clang::tidy::bugprone::ImplicitWideningOfMultiplicationResultCheck, clang::tidy::bugprone::MacroParenthesesCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::portability::RestrictSystemIncludesCheck, clang::tidy::bugprone::NotNullTerminatedResultCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::cert::SetLongJmpCheck, clang::tidy::google::UpgradeGoogletestCaseCheck, clang::tidy::google::readability::TodoCommentCheck, clang::tidy::llvm_libc::RestrictSystemLibcHeadersCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::bugprone::BadSignalToKillThreadCheck, clang::tidy::cppcoreguidelines::InitVariablesCheck, clang::tidy::google::readability::AvoidUnderscoreInGoogletestNameCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::readability::RedundantPreprocessorCheck, clang::tidy::llvm_check::IncludeOrderCheck, clang::tidy::bugprone::MacroRepeatedSideEffectsCheck, and clang::tidy::altera::KernelNameRestrictionCheck.

Definition at line 91 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::utils::TransformerClangTidyCheck, clang::tidy::readability::SuspiciousCallArgumentCheck, clang::tidy::modernize::ReplaceDisallowCopyAndAssignMacroCheck, clang::tidy::modernize::ReplaceAutoPtrCheck, clang::tidy::readability::BracesAroundStatementsCheck, clang::tidy::RenamerClangTidyCheck, clang::tidy::modernize::UseEqualsDeleteCheck, clang::tidy::misc::UniqueptrResetReleaseCheck, clang::tidy::bugprone::SuspiciousIncludeCheck, clang::tidy::modernize::UseEqualsDefaultCheck, clang::tidy::cppcoreguidelines::ProTypeMemberInitCheck, clang::tidy::google::build::UnnamedNamespaceInHeaderCheck, clang::tidy::readability::FunctionSizeCheck, clang::tidy::readability::IdentifierNamingCheck, clang::tidy::bugprone::ArgumentCommentCheck, clang::tidy::bugprone::ImplicitWideningOfMultiplicationResultCheck, clang::tidy::bugprone::ReservedIdentifierCheck, clang::tidy::misc::DefinitionsInHeadersCheck, clang::tidy::cppcoreguidelines::NoMallocCheck, clang::tidy::cppcoreguidelines::OwningMemoryCheck, clang::tidy::modernize::UseNodiscardCheck, clang::tidy::modernize::UseNoexceptCheck, clang::tidy::readability::FunctionCognitiveComplexityCheck, clang::tidy::bugprone::AssertSideEffectCheck, clang::tidy::utils::HeaderGuardCheck, clang::tidy::cppcoreguidelines::MacroUsageCheck, clang::tidy::cppcoreguidelines::ProBoundsConstantArrayIndexCheck, clang::tidy::google::readability::GlobalNamesInHeadersCheck, clang::tidy::misc::NonPrivateMemberVariablesInClassesCheck, clang::tidy::abseil::StringFindStartswithCheck, clang::tidy::misc::ThrowByValueCatchByReferenceCheck, clang::tidy::modernize::UseEmplaceCheck, clang::tidy::modernize::UseUsingCheck, clang::tidy::performance::FasterStringFindCheck, clang::tidy::performance::UnnecessaryCopyInitialization, clang::tidy::performance::UnnecessaryValueParamCheck, clang::tidy::portability::RestrictSystemIncludesCheck, clang::tidy::readability::RedundantSmartptrGetCheck, clang::tidy::bugprone::DynamicStaticInitializersCheck, clang::tidy::bugprone::TooSmallLoopVariableCheck, clang::tidy::performance::InefficientVectorOperationCheck, clang::tidy::performance::TypePromotionInMathFnCheck, clang::tidy::altera::SingleWorkItemBarrierCheck, clang::tidy::bugprone::ExceptionEscapeCheck, clang::tidy::bugprone::MisplacedWideningCastCheck, clang::tidy::performance::InefficientStringConcatenationCheck, clang::tidy::performance::MoveConstArgCheck, clang::tidy::readability::InconsistentDeclarationParameterNameCheck, clang::tidy::modernize::MakeSmartPtrCheck, clang::tidy::modernize::ReplaceRandomShuffleCheck, clang::tidy::readability::QualifiedAutoCheck, clang::tidy::readability::RedundantMemberInitCheck, clang::tidy::bugprone::UnhandledSelfAssignmentCheck, clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck, clang::tidy::portability::SIMDIntrinsicsCheck, clang::tidy::altera::StructPackAlignCheck, clang::tidy::bugprone::SignedCharMisuseCheck, clang::tidy::cert::NonTrivialTypesLibcMemoryCallsCheck, clang::tidy::modernize::AvoidBindCheck, clang::tidy::modernize::UseDefaultMemberInitCheck, clang::tidy::modernize::UseTransparentFunctorsCheck, clang::tidy::openmp::ExceptionEscapeCheck, clang::tidy::readability::SimplifySubscriptExprCheck, clang::tidy::readability::StaticAccessedThroughInstanceCheck, clang::tidy::readability::UppercaseLiteralSuffixCheck, clang::tidy::android::ComparisonInTempFailureRetryCheck, clang::tidy::bugprone::EasilySwappableParametersCheck, clang::tidy::bugprone::NotNullTerminatedResultCheck, clang::tidy::cert::ProperlySeededRandomGeneratorCheck, clang::tidy::cppcoreguidelines::PreferMemberInitializerCheck, clang::tidy::hicpp::MultiwayPathsCoveredCheck, clang::tidy::performance::NoAutomaticMoveCheck, clang::tidy::zircon::TemporaryObjectsCheck, clang::tidy::abseil::StringFindStrContainsCheck, clang::tidy::bugprone::DanglingHandleCheck, clang::tidy::bugprone::SignalHandlerCheck, clang::tidy::bugprone::StringConstructorCheck, clang::tidy::cppcoreguidelines::NarrowingConversionsCheck, clang::tidy::modernize::UseBoolLiteralsCheck, clang::tidy::modernize::UseOverrideCheck, clang::tidy::performance::ForRangeCopyCheck, clang::tidy::readability::ImplicitBoolConversionCheck, clang::tidy::readability::MagicNumbersCheck, clang::tidy::readability::UniqueptrDeleteReleaseCheck, clang::tidy::bugprone::SuspiciousEnumUsageCheck, clang::tidy::cppcoreguidelines::InitVariablesCheck, clang::tidy::modernize::PassByValueCheck, clang::tidy::readability::IdentifierLengthCheck, clang::tidy::readability::RedundantStringInitCheck, clang::tidy::bugprone::SuspiciousMissingCommaCheck, clang::tidy::bugprone::UnusedReturnValueCheck, clang::tidy::misc::UnusedParametersCheck, clang::tidy::modernize::LoopConvertCheck, clang::tidy::modernize::UseNullptrCheck, clang::tidy::readability::ElseAfterReturnCheck, clang::tidy::bugprone::SizeofExpressionCheck, clang::tidy::bugprone::SuspiciousStringCompareCheck, clang::tidy::concurrency::MtUnsafeCheck, clang::tidy::readability::RedundantDeclarationCheck, clang::tidy::modernize::UseAutoCheck, clang::tidy::google::runtime::IntegerTypesCheck, clang::tidy::objc::ForbiddenSubclassingCheck, clang::tidy::modernize::RawStringLiteralCheck, clang::tidy::hicpp::SignedBitwiseCheck, and clang::tidy::readability::SimplifyBooleanExprCheck.

Definition at line 133 of file ClangTidyCheck.h.

Member Data Documentation

◆ Options

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

The documentation for this class was generated from the following files:
clang::tidy::ClangTidyCheck::registerMatchers
virtual void registerMatchers(ast_matchers::MatchFinder *Finder)
Override this to register AST matchers with Finder.
Definition: ClangTidyCheck.h:109