clang-tools
3.9.0
|
Namespaces | |
boost | |
cert | |
cppcoreguidelines | |
llvm | |
matchers | |
misc | |
modernize | |
performance | |
readability | |
utils | |
Classes | |
class | OptionsView |
Provides access to the ClangTidyCheck options via check-local names. More... | |
class | ClangTidyCheck |
Base class for all clang-tidy checks. More... | |
class | ClangTidyASTConsumerFactory |
struct | ClangTidyMessage |
A message from a clang-tidy check. More... | |
struct | ClangTidyError |
A detected error complete with information to display diagnostic and automatic fix. More... | |
class | GlobList |
Read-only set of strings represented as a list of positive and negative globs. More... | |
struct | ClangTidyStats |
Contains displayed and ignored diagnostic counters for a ClangTidy run. More... | |
struct | ProfileData |
Container for clang-tidy profiling data. 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... | |
class | ClangTidyCheckFactories |
A collection of ClangTidyCheckFactory instances. More... | |
class | ClangTidyModule |
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name. More... | |
struct | FileFilter |
Contains a list of line ranges in a single file. More... | |
struct | ClangTidyGlobalOptions |
Global options. More... | |
struct | ClangTidyOptions |
Contains options for clang-tidy. More... | |
class | ClangTidyOptionsProvider |
Abstract interface for retrieving various ClangTidy options. More... | |
class | DefaultOptionsProvider |
Implementation of the ClangTidyOptionsProvider interface, which returns the same options for all files. More... | |
class | ConfigOptionsProvider |
Implementation of ClangTidyOptions interface, which is used for '-config' command-line option. More... | |
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 | ClangTidyPluginAction |
The core clang tidy plugin action. More... | |
Typedefs | |
typedef llvm::Registry < ClangTidyModule > | ClangTidyModuleRegistry |
Functions | |
static ClangTidyModuleRegistry::Add < cert::CERTModule > | X ("cert-module","Adds lint checks corresponding to CERT secure coding guidelines.") |
static void | setStaticAnalyzerCheckerOpts (const ClangTidyOptions &Opts, AnalyzerOptionsRef AnalyzerOptions) |
std::vector< std::string > | getCheckNames (const ClangTidyOptions &Options) |
Fills the list of check names that are enabled when the provided filters are applied. More... | |
ClangTidyOptions::OptionMap | getCheckOptions (const ClangTidyOptions &Options) |
Returns the effective check-specific options. More... | |
ClangTidyStats | runClangTidy (std::unique_ptr< ClangTidyOptionsProvider > OptionsProvider, const tooling::CompilationDatabase &Compilations, ArrayRef< std::string > InputFiles, std::vector< ClangTidyError > *Errors, ProfileData *Profile=nullptr) |
Run a set of clang-tidy checks on a set of files. More... | |
void | handleErrors (const std::vector< ClangTidyError > &Errors, bool Fix, unsigned &WarningsAsErrorsCount) |
Displays the found Errors to the users. More... | |
void | exportReplacements (const std::vector< ClangTidyError > &Errors, raw_ostream &OS) |
Serializes replacements into YAML and writes them to the specified output stream. More... | |
std::error_code | parseLineFilter (StringRef LineFilter, clang::tidy::ClangTidyGlobalOptions &Options) |
Parses -line-filter option and stores it to the Options . More... | |
llvm::ErrorOr< ClangTidyOptions > | parseConfiguration (StringRef Config) |
std::string | configurationAsText (const ClangTidyOptions &Options) |
Serializes configuration to a YAML-encoded string. More... | |
std::error_code | parseLineFilter (llvm::StringRef LineFilter, ClangTidyGlobalOptions &Options) |
Parses LineFilter from JSON and stores it to the Options . More... | |
llvm::ErrorOr< ClangTidyOptions > | parseConfiguration (llvm::StringRef Config) |
Parses configuration from JSON and returns ClangTidyOptions or an error. More... | |
static ClangTidyModuleRegistry::Add < misc::MiscModule > | X ("misc-module","Adds miscellaneous lint checks.") |
static void | printStats (const ClangTidyStats &Stats) |
static void | printProfileData (const ProfileData &Profile, llvm::raw_ostream &OS) |
static std::unique_ptr < ClangTidyOptionsProvider > | createOptionsProvider () |
static int | clangTidyMain (int argc, const char **argv) |
typedef llvm::Registry<ClangTidyModule> clang::tidy::ClangTidyModuleRegistry |
Definition at line 21 of file ClangTidyModuleRegistry.h.
|
static |
Definition at line 206 of file ClangTidyMain.cpp.
std::string clang::tidy::configurationAsText | ( | const ClangTidyOptions & | Options | ) |
Serializes configuration to a YAML-encoded string.
Definition at line 322 of file ClangTidyOptions.cpp.
|
static |
Definition at line 158 of file ClangTidyMain.cpp.
void clang::tidy::exportReplacements | ( | const std::vector< ClangTidyError > & | Errors, |
raw_ostream & | OS | ||
) |
Serializes replacements into YAML and writes them to the specified output stream.
Definition at line 510 of file ClangTidy.cpp.
std::vector< std::string > clang::tidy::getCheckNames | ( | const ClangTidyOptions & | Options | ) |
Fills the list of check names that are enabled when the provided filters are applied.
Definition at line 395 of file ClangTidy.cpp.
References Context, and clang::tidy::ClangTidyASTConsumerFactory::getCheckNames().
ClangTidyOptions::OptionMap clang::tidy::getCheckOptions | ( | const ClangTidyOptions & | Options | ) |
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 403 of file ClangTidy.cpp.
References Context, and clang::tidy::ClangTidyASTConsumerFactory::getCheckOptions().
void clang::tidy::handleErrors | ( | const std::vector< ClangTidyError > & | Errors, |
bool | Fix, | ||
unsigned & | WarningsAsErrorsCount | ||
) |
Displays the found Errors
to the users.
If Fix
is true, Errors
containing fixes are automatically applied.
Definition at line 485 of file ClangTidy.cpp.
llvm::ErrorOr<ClangTidyOptions> clang::tidy::parseConfiguration | ( | llvm::StringRef | Config | ) |
Parses configuration from JSON and returns ClangTidyOptions
or an error.
llvm::ErrorOr<ClangTidyOptions> clang::tidy::parseConfiguration | ( | StringRef | Config | ) |
Definition at line 313 of file ClangTidyOptions.cpp.
Referenced by clang::tidy::FileOptionsProvider::FileOptionsProvider().
std::error_code clang::tidy::parseLineFilter | ( | llvm::StringRef | LineFilter, |
ClangTidyGlobalOptions & | Options | ||
) |
Parses LineFilter from JSON and stores it to the Options
.
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 306 of file ClangTidyOptions.cpp.
References clang::tidy::ClangTidyGlobalOptions::LineFilter.
|
static |
Definition at line 119 of file ClangTidyMain.cpp.
|
static |
Definition at line 91 of file ClangTidyMain.cpp.
ClangTidyStats clang::tidy::runClangTidy | ( | std::unique_ptr< ClangTidyOptionsProvider > | OptionsProvider, |
const tooling::CompilationDatabase & | Compilations, | ||
ArrayRef< std::string > | InputFiles, | ||
std::vector< ClangTidyError > * | Errors, | ||
ProfileData * | Profile = nullptr |
||
) |
Run a set of clang-tidy checks on a set of files.
Profile | if provided, it enables check profile collection in MatchFinder, and will contain the result of the profile. |
Definition at line 412 of file ClangTidy.cpp.
References Context, clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(), clang::tidy::ClangTidyOptions::ExtraArgs, clang::tidy::ClangTidyOptions::ExtraArgsBefore, Filename, clang::tidy::ClangTidyContext::getErrors(), clang::tidy::ClangTidyContext::getOptionsForFile(), clang::tidy::ClangTidyContext::getStats(), and clang::tidy::ClangTidyContext::setCheckProfileData().
|
static |
Definition at line 227 of file ClangTidy.cpp.
References clang::tidy::ClangTidyOptions::CheckOptions.
Referenced by clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer().
|
static |
|
static |
|
static |
Definition at line 332 of file ClangTidyMain.cpp.
volatile int clang::tidy::BoostModuleAnchorSource = 0 |
Definition at line 35 of file BoostTidyModule.cpp.
|
static |
Definition at line 83 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 327 of file ClangTidyMain.cpp.
volatile int clang::tidy::CERTModuleAnchorSource = 0 |
Definition at line 88 of file CERTTidyModule.cpp.
|
static |
Definition at line 93 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 342 of file ClangTidyMain.cpp.
volatile int clang::tidy::CppCoreGuidelinesModuleAnchorSource = 0 |
Definition at line 69 of file CppCoreGuidelinesTidyModule.cpp.
|
static |
Definition at line 98 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 347 of file ClangTidyMain.cpp.
volatile int clang::tidy::GoogleModuleAnchorSource = 0 |
Definition at line 99 of file GoogleTidyModule.cpp.
|
static |
Definition at line 88 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 337 of file ClangTidyMain.cpp.
volatile int clang::tidy::LLVMModuleAnchorSource = 0 |
Definition at line 41 of file LLVMTidyModule.cpp.
|
static |
Definition at line 103 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 352 of file ClangTidyMain.cpp.
volatile int clang::tidy::MiscModuleAnchorSource = 0 |
Definition at line 152 of file MiscTidyModule.cpp.
|
static |
Definition at line 108 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 357 of file ClangTidyMain.cpp.
volatile int clang::tidy::ModernizeModuleAnchorSource = 0 |
Definition at line 91 of file ModernizeTidyModule.cpp.
|
static |
Definition at line 113 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 362 of file ClangTidyMain.cpp.
volatile int clang::tidy::PerformanceModuleAnchorSource = 0 |
Definition at line 48 of file PerformanceTidyModule.cpp.
|
static |
Definition at line 118 of file ClangTidyPlugin.cpp.
|
static |
Definition at line 367 of file ClangTidyMain.cpp.
volatile int clang::tidy::ReadabilityModuleAnchorSource = 0 |
Definition at line 83 of file ReadabilityTidyModule.cpp.