clang-tools 22.0.0git
|
Namespaces | |
namespace | abseil |
namespace | altera |
namespace | android |
namespace | boost |
namespace | bugprone |
namespace | cert |
namespace | concurrency |
namespace | cppcoreguidelines |
namespace | custom |
namespace | darwin |
namespace | fuchsia |
namespace | |
namespace | hicpp |
namespace | linuxkernel |
namespace | llvm_check |
namespace | llvm_libc |
namespace | matchers |
namespace | misc |
namespace | modernize |
namespace | mpi |
namespace | objc |
namespace | openmp |
namespace | performance |
namespace | portability |
namespace | readability |
namespace | utils |
namespace | zircon |
Classes | |
class | CachedGlobList |
A GlobList that caches search results, so that search is performed only once for the same query. More... | |
struct | ChecksAndOptions |
class | ClangTidyASTConsumerFactory |
class | ClangTidyCheckFactories |
A collection of ClangTidyCheckFactory instances. More... | |
class | ClangTidyContext |
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context. More... | |
class | ClangTidyDiagnosticConsumer |
A diagnostic consumer that turns each Diagnostic into a SourceManager-independent ClangTidyError . More... | |
struct | ClangTidyError |
A detected error complete with information to display diagnostic and automatic fix. More... | |
struct | ClangTidyGlobalOptions |
Global options. More... | |
class | ClangTidyModule |
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name. More... | |
struct | ClangTidyOptions |
Contains options for clang-tidy. More... | |
class | ClangTidyOptionsProvider |
Abstract interface for retrieving various ClangTidy options. More... | |
class | ClangTidyPluginAction |
The core clang tidy plugin action. More... | |
class | ClangTidyProfiling |
struct | ClangTidyStats |
Contains displayed and ignored diagnostic counters for a ClangTidy run. More... | |
class | ConfigOptionsProvider |
Implementation of ClangTidyOptions interface, which is used for '-config' command-line option. More... | |
class | DefaultOptionsProvider |
Implementation of the ClangTidyOptionsProvider interface, which returns the same options for all files. More... | |
struct | FileFilter |
Contains a list of line ranges in a single file. More... | |
class | FileOptionsBaseProvider |
class | FileOptionsProvider |
Implementation of the ClangTidyOptionsProvider interface, which tries to find a configuration file in the closest parent directory of each source file. More... | |
class | GlobList |
Read-only set of strings represented as a list of positive and negative globs. More... | |
class | NoLintDirectiveHandler |
This class is used to locate NOLINT comments in the file being analyzed, to decide whether a diagnostic should be suppressed. More... | |
struct | OptionEnumMapping |
This class should be specialized by any enum type that needs to be converted to and from an llvm::StringRef. More... | |
struct | OptionEnumMapping< bugprone::SignalHandlerCheck::AsyncSafeFunctionSetKind > |
struct | OptionEnumMapping< concurrency::MtUnsafeCheck::FunctionSet > |
struct | OptionEnumMapping< cppcoreguidelines::ProBoundsAvoidUncheckedContainerAccess::FixModes > |
struct | OptionEnumMapping< misc::OverrideWithDifferentVisibilityCheck::ChangeKind > |
struct | OptionEnumMapping< misc::UseInternalLinkageCheck::FixModeKind > |
struct | OptionEnumMapping< modernize::Confidence::Level > |
struct | OptionEnumMapping< modernize::UseTrailingReturnTypeCheck::TransformLambda > |
struct | OptionEnumMapping< modernize::VariableNamer::NamingStyle > |
struct | OptionEnumMapping< readability::IdentifierNamingCheck::CaseType > |
struct | OptionEnumMapping< readability::IdentifierNamingCheck::HungarianPrefixType > |
class | RenamerClangTidyCheck |
Base class for clang-tidy checks that want to flag declarations and/or macros for renaming based on customizable criteria. More... |
Typedefs | |
using | ClangTidyModuleRegistry = llvm::Registry<ClangTidyModule> |
using | DiagCallback = llvm::function_ref<void(const llvm::SMDiagnostic &)> |
using | P = cppcoreguidelines::ProBoundsAvoidUncheckedContainerAccess |
using | FileExtensionsSet = llvm::SmallSet<llvm::StringRef, 5> |
Enumerations | |
enum | FixBehaviour { FB_NoFix , FB_Fix , FB_FixNotes } |
Controls what kind of fixes clang-tidy is allowed to apply. More... | |
enum class | NoLintType { NoLint , NoLintNextLine , NoLintBegin , NoLintEnd } |
Functions | |
static ClangTidyModuleRegistry::Add< altera::AlteraModule > | X ("altera-module", "Adds Altera FPGA OpenCL lint checks.") |
static ClangTidyModuleRegistry::Add< bugprone::BugproneModule > | X ("bugprone-module", "Adds checks for bugprone code constructs.") |
static ClangTidyModuleRegistry::Add< cert::CERTModule > | X ("cert-module", "Adds lint checks corresponding to CERT secure coding guidelines.") |
std::vector< std::string > | getCheckNames (const ClangTidyOptions &Options, bool AllowEnablingAnalyzerAlphaCheckers, bool ExperimentalCustomChecks) |
Fills the list of check names that are enabled when the provided filters are applied. | |
void | filterCheckOptions (ClangTidyOptions &Options, const std::vector< std::string > &EnabledChecks) |
Filters CheckOptions in Options to only include options specified in the EnabledChecks which is a sorted vector. | |
ClangTidyOptions::OptionMap | getCheckOptions (const ClangTidyOptions &Options, bool AllowEnablingAnalyzerAlphaCheckers, bool ExperimentalCustomChecks) |
Returns the effective check-specific options. | |
std::vector< ClangTidyError > | runClangTidy (clang::tidy::ClangTidyContext &Context, const CompilationDatabase &Compilations, ArrayRef< std::string > InputFiles, llvm::IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > BaseFS, bool ApplyAnyFix, bool EnableCheckProfile, llvm::StringRef StoreCheckProfile, bool Quiet) |
void | handleErrors (llvm::ArrayRef< ClangTidyError > Errors, ClangTidyContext &Context, FixBehaviour Fix, unsigned &WarningsAsErrorsCount, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > BaseFS) |
Displays the found Errors to the users. | |
void | exportReplacements (const llvm::StringRef MainFilePath, const std::vector< ClangTidyError > &Errors, raw_ostream &OS) |
ChecksAndOptions | getAllChecksAndOptions (bool AllowEnablingAnalyzerAlphaCheckers, bool ExperimentalCustomChecks) |
std::vector< ClangTidyError > | runClangTidy (clang::tidy::ClangTidyContext &Context, const tooling::CompilationDatabase &Compilations, ArrayRef< std::string > InputFiles, llvm::IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > BaseFS, bool ApplyAnyFix, bool EnableCheckProfile=false, llvm::StringRef StoreCheckProfile=StringRef(), bool Quiet=false) |
Run a set of clang-tidy checks on a set of files. | |
void | exportReplacements (StringRef MainFilePath, const std::vector< ClangTidyError > &Errors, raw_ostream &OS) |
Serializes replacements into YAML and writes them to the specified output stream. | |
static ClangTidyOptions::OptionMap::const_iterator | findPriorityOption (const ClangTidyOptions::OptionMap &Options, StringRef NamePrefix, StringRef LocalName, ClangTidyContext *Context) |
static std::optional< bool > | getAsBool (StringRef Value, const llvm::Twine &LookupName) |
static constexpr llvm::StringLiteral | ConfigWarning ("invalid configuration value '%0' for option '%1'%select{|; expected a " "bool|; expected an integer|; did you mean '%3'?}2") |
const llvm::StringMap< tooling::Replacements > * | getFixIt (const tooling::Diagnostic &Diagnostic, bool AnyFix) |
Gets the Fix attached to Diagnostic . | |
template<typename T> | |
static void | mergeVectors (std::optional< T > &Dest, const std::optional< T > &Src) |
static void | mergeCommaSeparatedLists (std::optional< std::string > &Dest, const std::optional< std::string > &Src) |
template<typename T> | |
static void | overrideValue (std::optional< T > &Dest, const std::optional< T > &Src) |
std::error_code | parseLineFilter (StringRef LineFilter, clang::tidy::ClangTidyGlobalOptions &Options) |
Parses -line-filter option and stores it to the Options . | |
llvm::ErrorOr< ClangTidyOptions > | parseConfiguration (llvm::MemoryBufferRef Config) |
Parses configuration from JSON and returns ClangTidyOptions or an error. | |
static void | diagHandlerImpl (const llvm::SMDiagnostic &Diag, void *Ctx) |
llvm::ErrorOr< ClangTidyOptions > | parseConfigurationWithDiags (llvm::MemoryBufferRef Config, DiagCallback Handler) |
std::string | configurationAsText (const ClangTidyOptions &Options) |
Serializes configuration to a YAML-encoded string. | |
std::error_code | parseLineFilter (llvm::StringRef LineFilter, ClangTidyGlobalOptions &Options) |
Parses LineFilter from JSON and stores it to the Options . | |
static ClangTidyModuleRegistry::Add< concurrency::ConcurrencyModule > | X ("concurrency-module", "Adds concurrency checks.") |
static ClangTidyModuleRegistry::Add< custom::CustomModule > | X ("custom-module", "Adds custom query lint checks.") |
static ClangTidyModuleRegistry::Add< darwin::DarwinModule > | X ("darwin-module", "Adds Darwin-specific lint checks.") |
static bool | consumeNegativeIndicator (StringRef &GlobList) |
static llvm::StringRef | extractNextGlob (StringRef &GlobList) |
static llvm::Regex | createRegexFromGlob (StringRef &Glob) |
static ClangTidyModuleRegistry::Add< misc::MiscModule > | X ("misc-module", "Adds miscellaneous lint checks.") |
static ClangTidyModuleRegistry::Add< mpi::MPIModule > | X ("mpi-module", "Adds MPI clang-tidy checks.") |
static std::optional< NoLintType > | strToNoLintType (StringRef Str) |
static std::string | trimWhitespace (StringRef Checks) |
static SmallVector< NoLintToken > | getNoLints (StringRef Buffer) |
static tooling::Diagnostic | makeNoLintError (const SourceManager &SrcMgr, FileID File, const NoLintToken &NoLint) |
static SmallVector< NoLintBlockToken > | formNoLintBlocks (SmallVector< NoLintToken > NoLints, const SourceManager &SrcMgr, FileID File, SmallVectorImpl< tooling::Diagnostic > &NoLintErrors) |
static std::pair< size_t, size_t > | getLineStartAndEnd (StringRef Buffer, size_t From) |
static bool | lineHasNoLint (StringRef Buffer, std::pair< size_t, size_t > LineStartAndEnd, NoLintType Type, StringRef DiagName) |
static bool | withinNoLintBlock (ArrayRef< NoLintBlockToken > NoLintBlocks, size_t DiagPos, StringRef DiagName) |
static std::optional< StringRef > | getBuffer (const SourceManager &SrcMgr, FileID File, bool AllowIO) |
static void | printStats (const ClangTidyStats &Stats) |
static std::unique_ptr< ClangTidyOptionsProvider > | createOptionsProvider (llvm::IntrusiveRefCntPtr< vfs::FileSystem > FS) |
static llvm::IntrusiveRefCntPtr< vfs::FileSystem > | getVfsFromFile (const std::string &OverlayFile, llvm::IntrusiveRefCntPtr< vfs::FileSystem > BaseFS) |
static StringRef | closest (StringRef Value, const StringSet<> &Allowed) |
static bool | verifyChecks (const StringSet<> &AllChecks, StringRef CheckGlob, StringRef Source) |
static bool | verifyFileExtensions (const std::vector< std::string > &HeaderFileExtensions, const std::vector< std::string > &ImplementationFileExtensions, StringRef Source) |
static bool | verifyOptions (const llvm::StringSet<> &ValidOptions, const ClangTidyOptions::OptionMap &OptionMap, StringRef Source) |
static SmallString< 256 > | makeAbsolute (llvm::StringRef Input) |
static llvm::IntrusiveRefCntPtr< vfs::OverlayFileSystem > | createBaseFS () |
int | clangTidyMain (int argc, const char **argv) |
static const NamedDecl * | findDecl (const RecordDecl &RecDecl, StringRef DeclName) |
static const CXXMethodDecl * | getOverrideMethod (const CXXMethodDecl *Method) |
Returns the function that Method is overridding. | |
static bool | hasNoName (const NamedDecl *Decl) |
static const NamedDecl * | getFailureForNamedDecl (const NamedDecl *ND) |
static NameLookup | findDeclInBases (const CXXRecordDecl &Parent, StringRef DeclName, bool AggressiveTemplateLookup) |
Returns a decl matching the DeclName in Parent or one of its base classes. | |
static std::string | getDiagnosticSuffix (const RenamerClangTidyCheck::ShouldFixStatus FixStatus, const std::string &Fixup) |
using clang::tidy::ClangTidyModuleRegistry = llvm::Registry<ClangTidyModule> |
Definition at line 17 of file ClangTidyModuleRegistry.h.
using clang::tidy::DiagCallback = llvm::function_ref<void(const llvm::SMDiagnostic &)> |
Definition at line 346 of file ClangTidyOptions.h.
using clang::tidy::FileExtensionsSet = llvm::SmallSet<llvm::StringRef, 5> |
Definition at line 16 of file FileExtensionsSet.h.
Definition at line 254 of file ProBoundsAvoidUncheckedContainerAccess.cpp.
Controls what kind of fixes clang-tidy is allowed to apply.
Enumerator | |
---|---|
FB_NoFix | Don't try to apply any fix. |
FB_Fix | Only apply fixes added to warnings. |
FB_FixNotes | Apply fixes found in notes. |
Definition at line 103 of file ClangTidy.h.
|
strong |
Enumerator | |
---|---|
NoLint | |
NoLintNextLine | |
NoLintBegin | |
NoLintEnd |
Definition at line 40 of file NoLintDirectiveHandler.cpp.
int clang::tidy::clangTidyMain | ( | int | argc, |
const char ** | argv ) |
Definition at line 382 of file ClangTidyMain.cpp.
Referenced by main().
|
static |
Definition at line 276 of file ClangTidyMain.cpp.
References ClangTidyCategory().
std::string clang::tidy::configurationAsText | ( | const ClangTidyOptions & | Options | ) |
Serializes configuration to a YAML-encoded string.
Definition at line 560 of file ClangTidyOptions.cpp.
Referenced by clang::clangd::ParsedAST::build().
|
staticconstexpr |
References ConfigWarning().
Referenced by ConfigWarning().
|
static |
Definition at line 17 of file GlobList.cpp.
Referenced by clang::tidy::GlobList::GlobList().
|
static |
Definition at line 368 of file ClangTidyMain.cpp.
References clang::tidy::ClangTidyStats::ErrorsIgnoredLineFilter.
|
static |
Definition at line 177 of file ClangTidyMain.cpp.
References ClangTidyCategory().
|
static |
Definition at line 32 of file GlobList.cpp.
Referenced by clang::tidy::GlobList::GlobList().
|
static |
Definition at line 544 of file ClangTidyOptions.cpp.
Referenced by parseConfigurationWithDiags().
void clang::tidy::exportReplacements | ( | const llvm::StringRef | MainFilePath, |
const std::vector< ClangTidyError > & | Errors, | ||
raw_ostream & | OS ) |
Definition at line 667 of file ClangTidy.cpp.
void clang::tidy::exportReplacements | ( | StringRef | MainFilePath, |
const std::vector< ClangTidyError > & | Errors, | ||
raw_ostream & | OS ) |
Serializes replacements into YAML and writes them to the specified output stream.
|
static |
Definition at line 25 of file GlobList.cpp.
Referenced by clang::tidy::GlobList::GlobList().
void clang::tidy::filterCheckOptions | ( | ClangTidyOptions & | Options, |
const std::vector< std::string > & | EnabledChecks ) |
Filters CheckOptions in Options
to only include options specified in the EnabledChecks
which is a sorted vector.
Definition at line 525 of file ClangTidy.cpp.
References clang::tidy::ClangTidyOptions::CheckOptions.
|
static |
Definition at line 85 of file RenamerClangTidyCheck.cpp.
Referenced by findDeclInBases().
|
static |
Returns a decl matching the DeclName
in Parent
or one of its base classes.
If AggressiveTemplateLookup
is true then it will check template dependent base classes as well. If a matching decl is found in multiple base classes then it will return a flag indicating the multiple resolutions.
Definition at line 142 of file RenamerClangTidyCheck.cpp.
References findDecl(), and findDeclInBases().
Referenced by findDeclInBases().
|
static |
Definition at line 66 of file ClangTidyCheck.cpp.
References findPriorityOption(), and clang::tidy::ClangTidyContext::getOptionsCollector().
Referenced by findPriorityOption().
|
static |
Definition at line 201 of file NoLintDirectiveHandler.cpp.
References makeNoLintError(), NoLint, NoLintBegin, and NoLintEnd.
ChecksAndOptions clang::tidy::getAllChecksAndOptions | ( | bool | AllowEnablingAnalyzerAlphaCheckers, |
bool | ExperimentalCustomChecks ) |
Definition at line 683 of file ClangTidy.cpp.
References AllowEnablingAnalyzerAlphaCheckers(), clang::tidy::ChecksAndOptions::Checks, clang::tidy::ClangTidyOptions::Checks, ExperimentalCustomChecks(), clang::tidy::ClangTidyContext::getOptions(), clang::tidy::ChecksAndOptions::Options, clang::tidy::custom::RegisterCustomChecks, and clang::tidy::ClangTidyContext::setOptionsCollector().
|
static |
Definition at line 93 of file ClangTidyCheck.cpp.
References getAsBool().
Referenced by getAsBool().
|
static |
Definition at line 327 of file NoLintDirectiveHandler.cpp.
std::vector< std::string > clang::tidy::getCheckNames | ( | const ClangTidyOptions & | Options, |
bool | AllowEnablingAnalyzerAlphaCheckers, | ||
bool | ExperimentalCustomChecks ) |
Fills the list of check names that are enabled when the provided filters are applied.
Definition at line 514 of file ClangTidy.cpp.
References AllowEnablingAnalyzerAlphaCheckers(), ExperimentalCustomChecks(), and clang::tidy::ClangTidyASTConsumerFactory::getCheckNames().
ClangTidyOptions::OptionMap clang::tidy::getCheckOptions | ( | const ClangTidyOptions & | Options, |
bool | AllowEnablingAnalyzerAlphaCheckers, | ||
bool | ExperimentalCustomChecks ) |
Returns the effective check-specific options.
The method configures ClangTidy with the specified Options
and collects effective options from all created checks. The returned set of options includes default check-specific options for all keys not overridden by Options
.
Definition at line 540 of file ClangTidy.cpp.
References AllowEnablingAnalyzerAlphaCheckers(), ExperimentalCustomChecks(), clang::tidy::ClangTidyASTConsumerFactory::getCheckOptions(), and clang::tidy::ClangTidyContext::setDiagnosticsEngine().
|
static |
Definition at line 557 of file RenamerClangTidyCheck.cpp.
References clang::tidy::RenamerClangTidyCheck::ConflictsWithKeyword, clang::tidy::RenamerClangTidyCheck::ConflictsWithMacroDefinition, clang::tidy::RenamerClangTidyCheck::FixInvalidIdentifier, clang::tidy::RenamerClangTidyCheck::IgnoreFailureThreshold, and clang::tidy::RenamerClangTidyCheck::ShouldFix.
Referenced by clang::tidy::RenamerClangTidyCheck::onEndOfTranslationUnit().
|
static |
Definition at line 118 of file RenamerClangTidyCheck.cpp.
References getOverrideMethod().
Referenced by clang::tidy::RenamerClangTidyCheck::addUsage().
const llvm::StringMap< tooling::Replacements > * clang::tidy::getFixIt | ( | const tooling::Diagnostic & | Diagnostic, |
bool | AnyFix ) |
Gets the Fix attached to Diagnostic
.
If there isn't a Fix attached to the diagnostic and AnyFix
is true, Check to see if exactly one note has a Fix and return it. Otherwise return nullptr.
Definition at line 343 of file ClangTidyDiagnosticConsumer.cpp.
|
static |
Definition at line 295 of file NoLintDirectiveHandler.cpp.
|
static |
Definition at line 111 of file NoLintDirectiveHandler.cpp.
References Checks(), and strToNoLintType().
Referenced by lineHasNoLint().
|
static |
Returns the function that Method
is overridding.
If There are none or multiple overrides it returns nullptr. If the overridden function itself is overridding then it will recurse up to find the first decl of the function.
Definition at line 99 of file RenamerClangTidyCheck.cpp.
Referenced by getFailureForNamedDecl().
|
static |
Definition at line 255 of file ClangTidyMain.cpp.
References ClangTidyCategory().
void clang::tidy::handleErrors | ( | llvm::ArrayRef< ClangTidyError > | Errors, |
ClangTidyContext & | Context, | ||
FixBehaviour | Fix, | ||
unsigned & | WarningsAsErrorsCount, | ||
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > | BaseFS ) |
Displays the found Errors
to the users.
If Fix
is FB_Fix or FB_FixNotes, Errors
containing fixes are automatically applied and reformatted. If no clang-format configuration file is found, the given \P FormatStyle is used.
Definition at line 640 of file ClangTidy.cpp.
References Fix().
|
static |
Definition at line 114 of file RenamerClangTidyCheck.cpp.
Referenced by clang::tidy::RenamerClangTidyCheck::addUsage().
|
static |
Definition at line 304 of file NoLintDirectiveHandler.cpp.
References getNoLints(), and NoLint.
|
static |
Definition at line 357 of file ClangTidyMain.cpp.
References clang::tidy::ClangTidyStats::errorsIgnored(), clang::tidy::ClangTidyStats::ErrorsIgnoredNonUserCode, and printStats().
|
static |
Definition at line 180 of file NoLintDirectiveHandler.cpp.
References NoLint, and NoLintBegin.
Referenced by formNoLintBlocks().
|
static |
Definition at line 269 of file ClangTidyOptions.cpp.
Referenced by clang::tidy::ClangTidyOptions::mergeWith().
|
static |
Definition at line 260 of file ClangTidyOptions.cpp.
Referenced by clang::tidy::ClangTidyOptions::mergeWith().
|
static |
Definition at line 276 of file ClangTidyOptions.cpp.
Referenced by clang::tidy::ClangTidyOptions::mergeWith().
llvm::ErrorOr< ClangTidyOptions > clang::tidy::parseConfiguration | ( | llvm::MemoryBufferRef | Config | ) |
Parses configuration from JSON and returns ClangTidyOptions
or an error.
Definition at line 535 of file ClangTidyOptions.cpp.
References Config().
Referenced by clang::tidy::FileOptionsBaseProvider::FileOptionsBaseProvider().
llvm::ErrorOr< ClangTidyOptions > clang::tidy::parseConfigurationWithDiags | ( | llvm::MemoryBufferRef | Config, |
DiagCallback | Handler ) |
Definition at line 549 of file ClangTidyOptions.cpp.
References Config(), and diagHandlerImpl().
std::error_code clang::tidy::parseLineFilter | ( | llvm::StringRef | LineFilter, |
ClangTidyGlobalOptions & | Options ) |
Parses LineFilter from JSON and stores it to the Options
.
References Config(), and LineFilter().
std::error_code clang::tidy::parseLineFilter | ( | StringRef | LineFilter, |
clang::tidy::ClangTidyGlobalOptions & | Options ) |
Parses -line-filter option and stores it to the Options
.
Definition at line 527 of file ClangTidyOptions.cpp.
References clang::tidy::ClangTidyGlobalOptions::LineFilter, and LineFilter().
|
static |
Definition at line 148 of file ClangTidyMain.cpp.
References ClangTidyCategory().
Referenced by makeAbsolute().
std::vector< ClangTidyError > clang::tidy::runClangTidy | ( | clang::tidy::ClangTidyContext & | Context, |
const CompilationDatabase & | Compilations, | ||
ArrayRef< std::string > | InputFiles, | ||
llvm::IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > | BaseFS, | ||
bool | ApplyAnyFix, | ||
bool | EnableCheckProfile, | ||
llvm::StringRef | StoreCheckProfile, | ||
bool | Quiet ) |
Definition at line 557 of file ClangTidy.cpp.
References clang::tidy::ClangTidyASTConsumerFactory::createASTConsumer(), EnableCheckProfile(), clang::tidy::ClangTidyOptions::ExtraArgs, clang::tidy::ClangTidyOptions::ExtraArgsBefore, clang::tidy::ClangTidyContext::getOptionsForFile(), Quiet(), clang::tidy::ClangTidyContext::setDiagnosticsEngine(), clang::tidy::ClangTidyContext::setEnableProfiling(), clang::tidy::ClangTidyContext::setProfileStoragePrefix(), StoreCheckProfile(), and clang::tidy::ClangTidyDiagnosticConsumer::take().
std::vector< ClangTidyError > clang::tidy::runClangTidy | ( | clang::tidy::ClangTidyContext & | Context, |
const tooling::CompilationDatabase & | Compilations, | ||
ArrayRef< std::string > | InputFiles, | ||
llvm::IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > | BaseFS, | ||
bool | ApplyAnyFix, | ||
bool | EnableCheckProfile = false, | ||
llvm::StringRef | StoreCheckProfile = StringRef(), | ||
bool | Quiet = false ) |
Run a set of clang-tidy checks on a set of files.
EnableCheckProfile | If provided, it enables check profile collection in MatchFinder, and will contain the result of the profile. |
StoreCheckProfile | If provided, and EnableCheckProfile is true, the profile will not be output to stderr, but will instead be stored as a JSON file in the specified directory. |
References EnableCheckProfile(), Quiet(), and StoreCheckProfile().
|
static |
Definition at line 44 of file NoLintDirectiveHandler.cpp.
References NoLint, NoLintBegin, NoLintEnd, and NoLintNextLine.
Referenced by getNoLints().
|
static |
Definition at line 61 of file NoLintDirectiveHandler.cpp.
References Checks().
|
static |
Definition at line 291 of file ClangTidyMain.cpp.
References ClangTidyCategory().
|
static |
Definition at line 319 of file ClangTidyMain.cpp.
References ClangTidyCategory().
|
static |
Definition at line 339 of file ClangTidyMain.cpp.
References ClangTidyCategory().
|
static |
Definition at line 319 of file NoLintDirectiveHandler.cpp.
|
static |
Referenced by clang::tidy::misc::skeleton().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 19 of file ClangTidyForceLinker.h.
volatile int clang::tidy::AbseilModuleAnchorSource = 0 |
Definition at line 83 of file AbseilTidyModule.cpp.
|
static |
Definition at line 24 of file ClangTidyForceLinker.h.
volatile int clang::tidy::AlteraModuleAnchorSource = 0 |
Definition at line 46 of file AlteraTidyModule.cpp.
|
static |
Definition at line 29 of file ClangTidyForceLinker.h.
volatile int clang::tidy::AndroidModuleAnchorSource = 0 |
Definition at line 70 of file AndroidTidyModule.cpp.
|
static |
Definition at line 34 of file ClangTidyForceLinker.h.
volatile int clang::tidy::BoostModuleAnchorSource = 0 |
Definition at line 35 of file BoostTidyModule.cpp.
|
static |
Definition at line 39 of file ClangTidyForceLinker.h.
volatile int clang::tidy::BugproneModuleAnchorSource = 0 |
Definition at line 310 of file BugproneTidyModule.cpp.
|
static |
Definition at line 44 of file ClangTidyForceLinker.h.
volatile int clang::tidy::CERTModuleAnchorSource = 0 |
Definition at line 367 of file CERTTidyModule.cpp.
|
static |
Definition at line 49 of file ClangTidyForceLinker.h.
volatile int clang::tidy::ConcurrencyModuleAnchorSource = 0 |
Definition at line 38 of file ConcurrencyTidyModule.cpp.
|
static |
Definition at line 54 of file ClangTidyForceLinker.h.
volatile int clang::tidy::CppCoreGuidelinesModuleAnchorSource = 0 |
Definition at line 166 of file CppCoreGuidelinesTidyModule.cpp.
volatile int clang::tidy::CustomModuleAnchorSource = 0 |
Definition at line 57 of file CustomTidyModule.cpp.
|
static |
Definition at line 66 of file ClangTidyForceLinker.h.
volatile int clang::tidy::DarwinModuleAnchorSource = 0 |
Definition at line 35 of file DarwinTidyModule.cpp.
|
static |
Definition at line 71 of file ClangTidyForceLinker.h.
volatile int clang::tidy::FuchsiaModuleAnchorSource = 0 |
Definition at line 55 of file FuchsiaTidyModule.cpp.
|
static |
Definition at line 76 of file ClangTidyForceLinker.h.
volatile int clang::tidy::GoogleModuleAnchorSource = 0 |
Definition at line 106 of file GoogleTidyModule.cpp.
|
static |
Definition at line 81 of file ClangTidyForceLinker.h.
volatile int clang::tidy::HICPPModuleAnchorSource = 0 |
Definition at line 122 of file HICPPTidyModule.cpp.
|
static |
Definition at line 86 of file ClangTidyForceLinker.h.
volatile int clang::tidy::LinuxKernelModuleAnchorSource = 0 |
Definition at line 34 of file LinuxKernelTidyModule.cpp.
|
static |
Definition at line 96 of file ClangTidyForceLinker.h.
volatile int clang::tidy::LLVMLibcModuleAnchorSource = 0 |
Definition at line 43 of file LLVMLibcTidyModule.cpp.
|
static |
Definition at line 91 of file ClangTidyForceLinker.h.
volatile int clang::tidy::LLVMModuleAnchorSource = 0 |
Definition at line 68 of file LLVMTidyModule.cpp.
|
static |
Definition at line 101 of file ClangTidyForceLinker.h.
volatile int clang::tidy::MiscModuleAnchorSource = 0 |
Definition at line 98 of file MiscTidyModule.cpp.
|
static |
Definition at line 106 of file ClangTidyForceLinker.h.
volatile int clang::tidy::ModernizeModuleAnchorSource = 0 |
Definition at line 149 of file ModernizeTidyModule.cpp.
volatile int clang::tidy::MPIModuleAnchorSource = 0 |
Definition at line 34 of file MPITidyModule.cpp.
|
static |
Definition at line 119 of file ClangTidyForceLinker.h.
volatile int clang::tidy::ObjCModuleAnchorSource = 0 |
Definition at line 56 of file ObjCTidyModule.cpp.
|
static |
Definition at line 124 of file ClangTidyForceLinker.h.
volatile int clang::tidy::OpenMPModuleAnchorSource = 0 |
Definition at line 37 of file OpenMPTidyModule.cpp.
|
static |
Definition at line 129 of file ClangTidyForceLinker.h.
volatile int clang::tidy::PerformanceModuleAnchorSource = 0 |
Definition at line 85 of file PerformanceTidyModule.cpp.
|
static |
Definition at line 134 of file ClangTidyForceLinker.h.
volatile int clang::tidy::PortabilityModuleAnchorSource = 0 |
Definition at line 46 of file PortabilityTidyModule.cpp.
|
static |
Definition at line 139 of file ClangTidyForceLinker.h.
volatile int clang::tidy::ReadabilityModuleAnchorSource = 0 |
Definition at line 196 of file ReadabilityTidyModule.cpp.
|
staticconstexpr |
Definition at line 289 of file ClangTidyMain.cpp.
|
static |
Definition at line 144 of file ClangTidyForceLinker.h.
volatile int clang::tidy::ZirconModuleAnchorSource = 0 |
Definition at line 35 of file ZirconTidyModule.cpp.