clang-tools 20.0.0git
|
Implementation of ClangTidyOptions interface, which is used for '-config' command-line option. More...
#include <ClangTidyOptions.h>
Public Member Functions | |
ConfigOptionsProvider (ClangTidyGlobalOptions GlobalOptions, ClangTidyOptions DefaultOptions, ClangTidyOptions ConfigOptions, ClangTidyOptions OverrideOptions, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS=nullptr) | |
std::vector< OptionsSource > | getRawOptions (llvm::StringRef FileName) override |
Returns an ordered vector of OptionsSources, in order of increasing priority. | |
Public Member Functions inherited from clang::tidy::DefaultOptionsProvider | |
DefaultOptionsProvider (ClangTidyGlobalOptions GlobalOptions, ClangTidyOptions Options) | |
const ClangTidyGlobalOptions & | getGlobalOptions () override |
Returns global options, which are independent of the file. | |
std::vector< OptionsSource > | getRawOptions (llvm::StringRef FileName) override |
Returns an ordered vector of OptionsSources, in order of increasing priority. | |
Public Member Functions inherited from clang::tidy::ClangTidyOptionsProvider | |
virtual | ~ClangTidyOptionsProvider () |
virtual const ClangTidyGlobalOptions & | getGlobalOptions ()=0 |
Returns global options, which are independent of the file. | |
virtual std::vector< OptionsSource > | getRawOptions (llvm::StringRef FileName)=0 |
Returns an ordered vector of OptionsSources, in order of increasing priority. | |
ClangTidyOptions | getOptions (llvm::StringRef FileName) |
Returns options applying to a specific translation unit with the specified FileName . | |
Additional Inherited Members | |
Public Types inherited from clang::tidy::ClangTidyOptionsProvider | |
using | OptionsSource = std::pair< ClangTidyOptions, std::string > |
ClangTidyOptions and its source. | |
Static Public Attributes inherited from clang::tidy::ClangTidyOptionsProvider | |
static const char | OptionsSourceTypeDefaultBinary [] |
static const char | OptionsSourceTypeCheckCommandLineOption [] |
static const char | OptionsSourceTypeConfigCommandLineOption [] |
Protected Types inherited from clang::tidy::FileOptionsBaseProvider | |
using | ConfigFileHandler = std::pair< std::string, std::function< llvm::ErrorOr< ClangTidyOptions >(llvm::MemoryBufferRef)> > |
using | ConfigFileHandlers = std::vector< ConfigFileHandler > |
Configuration file handlers listed in the order of priority. | |
Protected Member Functions inherited from clang::tidy::FileOptionsBaseProvider | |
FileOptionsBaseProvider (ClangTidyGlobalOptions GlobalOptions, ClangTidyOptions DefaultOptions, ClangTidyOptions OverrideOptions, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS) | |
FileOptionsBaseProvider (ClangTidyGlobalOptions GlobalOptions, ClangTidyOptions DefaultOptions, ClangTidyOptions OverrideOptions, ConfigFileHandlers ConfigHandlers) | |
void | addRawFileOptions (llvm::StringRef AbsolutePath, std::vector< OptionsSource > &CurOptions) |
std::optional< OptionsSource > | tryReadConfigFile (llvm::StringRef Directory) |
Try to read configuration files from Directory using registered ConfigHandlers . | |
Protected Attributes inherited from clang::tidy::FileOptionsBaseProvider | |
llvm::StringMap< OptionsSource > | CachedOptions |
ClangTidyOptions | OverrideOptions |
ConfigFileHandlers | ConfigHandlers |
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > | FS |
Implementation of ClangTidyOptions interface, which is used for '-config' command-line option.
Definition at line 252 of file ClangTidyOptions.h.
clang::tidy::ConfigOptionsProvider::ConfigOptionsProvider | ( | ClangTidyGlobalOptions | GlobalOptions, |
ClangTidyOptions | DefaultOptions, | ||
ClangTidyOptions | ConfigOptions, | ||
ClangTidyOptions | OverrideOptions, | ||
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > | FS = nullptr |
||
) |
Definition at line 285 of file ClangTidyOptions.cpp.
|
overridevirtual |
Returns an ordered vector of OptionsSources, in order of increasing priority.
Reimplemented from clang::tidy::DefaultOptionsProvider.
Definition at line 295 of file ClangTidyOptions.cpp.
References clang::tidy::FileOptionsBaseProvider::addRawFileOptions(), FileName, clang::tidy::FileOptionsBaseProvider::FS, clang::tidy::DefaultOptionsProvider::getRawOptions(), clang::tidy::ClangTidyOptions::InheritParentConfig, clang::tidy::ClangTidyOptionsProvider::OptionsSourceTypeCheckCommandLineOption, clang::tidy::ClangTidyOptionsProvider::OptionsSourceTypeConfigCommandLineOption, and clang::tidy::FileOptionsBaseProvider::OverrideOptions.