clang-tools
3.9.0
|
Contains options for clang-tidy. More...
#include <ClangTidyOptions.h>
Public Types | |
typedef std::pair< std::string, std::string > | StringPair |
typedef std::map< std::string, std::string > | OptionMap |
typedef std::vector< std::string > | ArgList |
Public Member Functions | |
ClangTidyOptions | mergeWith (const ClangTidyOptions &Other) const |
Creates a new ClangTidyOptions instance combined from all fields of this instance overridden by the fields of Other that have a value. More... | |
Static Public Member Functions | |
static ClangTidyOptions | getDefaults () |
These options are used for all settings that haven't been overridden by the OptionsProvider . More... | |
Public Attributes | |
llvm::Optional< std::string > | Checks |
Checks filter. More... | |
llvm::Optional< std::string > | WarningsAsErrors |
WarningsAsErrors filter. More... | |
llvm::Optional< std::string > | HeaderFilterRegex |
Output warnings from headers matching this filter. More... | |
llvm::Optional< bool > | SystemHeaders |
Output warnings from system headers matching HeaderFilterRegex . More... | |
llvm::Optional< bool > | AnalyzeTemporaryDtors |
Turns on temporary destructor-based analysis. More... | |
llvm::Optional< std::string > | User |
Specifies the name or e-mail of the user running clang-tidy. More... | |
OptionMap | CheckOptions |
Key-value mapping used to store check-specific options. More... | |
llvm::Optional< ArgList > | ExtraArgs |
Add extra compilation arguments to the end of the list. More... | |
llvm::Optional< ArgList > | ExtraArgsBefore |
Add extra compilation arguments to the start of the list. More... | |
Contains options for clang-tidy.
These options may be read from configuration files, and may be different for different translation units.
Definition at line 49 of file ClangTidyOptions.h.
typedef std::vector<std::string> clang::tidy::ClangTidyOptions::ArgList |
Definition at line 90 of file ClangTidyOptions.h.
typedef std::map<std::string, std::string> clang::tidy::ClangTidyOptions::OptionMap |
Definition at line 85 of file ClangTidyOptions.h.
typedef std::pair<std::string, std::string> clang::tidy::ClangTidyOptions::StringPair |
Definition at line 84 of file ClangTidyOptions.h.
|
static |
These options are used for all settings that haven't been overridden by the OptionsProvider
.
Allow no checks and no headers by default. This method initializes check-specific options by calling ClangTidyModule::getModuleOptions()
of each registered ClangTidyModule
.
Definition at line 105 of file ClangTidyOptions.cpp.
References AnalyzeTemporaryDtors, Checks, HeaderFilterRegex, mergeWith(), SystemHeaders, User, and WarningsAsErrors.
Referenced by clang::tidy::ClangTidyContext::getOptionsForFile().
ClangTidyOptions clang::tidy::ClangTidyOptions::mergeWith | ( | const ClangTidyOptions & | Other | ) | const |
Creates a new ClangTidyOptions
instance combined from all fields of this instance overridden by the fields of Other
that have a value.
Definition at line 121 of file ClangTidyOptions.cpp.
References AnalyzeTemporaryDtors, CheckOptions, Checks, ExtraArgs, ExtraArgsBefore, HeaderFilterRegex, Result, SystemHeaders, User, and WarningsAsErrors.
Referenced by getDefaults(), clang::tidy::ClangTidyOptionsProvider::getOptions(), and clang::tidy::ClangTidyContext::getOptionsForFile().
llvm::Optional<bool> clang::tidy::ClangTidyOptions::AnalyzeTemporaryDtors |
Turns on temporary destructor-based analysis.
Definition at line 76 of file ClangTidyOptions.h.
Referenced by clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(), getDefaults(), llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), and mergeWith().
OptionMap clang::tidy::ClangTidyOptions::CheckOptions |
Key-value mapping used to store check-specific options.
Definition at line 88 of file ClangTidyOptions.h.
Referenced by clang::tidy::modernize::ModernizeModule::getModuleOptions(), clang::tidy::cert::CERTModule::getModuleOptions(), clang::tidy::google::GoogleModule::getModuleOptions(), llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), mergeWith(), and clang::tidy::setStaticAnalyzerCheckerOpts().
llvm::Optional<std::string> clang::tidy::ClangTidyOptions::Checks |
Checks filter.
Definition at line 63 of file ClangTidyOptions.h.
Referenced by getDefaults(), llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), mergeWith(), and clang::tidy::ClangTidyPluginAction::ParseArgs().
llvm::Optional<ArgList> clang::tidy::ClangTidyOptions::ExtraArgs |
Add extra compilation arguments to the end of the list.
Definition at line 93 of file ClangTidyOptions.h.
Referenced by llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), mergeWith(), and clang::tidy::runClangTidy().
llvm::Optional<ArgList> clang::tidy::ClangTidyOptions::ExtraArgsBefore |
Add extra compilation arguments to the start of the list.
Definition at line 96 of file ClangTidyOptions.h.
Referenced by llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), mergeWith(), and clang::tidy::runClangTidy().
llvm::Optional<std::string> clang::tidy::ClangTidyOptions::HeaderFilterRegex |
Output warnings from headers matching this filter.
Warnings from main files will always be displayed.
Definition at line 70 of file ClangTidyOptions.h.
Referenced by getDefaults(), llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), and mergeWith().
llvm::Optional<bool> clang::tidy::ClangTidyOptions::SystemHeaders |
Output warnings from system headers matching HeaderFilterRegex
.
Definition at line 73 of file ClangTidyOptions.h.
Referenced by getDefaults(), and mergeWith().
llvm::Optional<std::string> clang::tidy::ClangTidyOptions::User |
Specifies the name or e-mail of the user running clang-tidy.
This option is used, for example, to place the correct user name in TODO() comments in the relevant check.
Definition at line 82 of file ClangTidyOptions.h.
Referenced by getDefaults(), llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), and mergeWith().
llvm::Optional<std::string> clang::tidy::ClangTidyOptions::WarningsAsErrors |
WarningsAsErrors filter.
Definition at line 66 of file ClangTidyOptions.h.
Referenced by getDefaults(), llvm::yaml::MappingTraits< ClangTidyOptions >::mapping(), and mergeWith().