clang-tools 20.0.0git
|
A source of configuration fragments. More...
#include <ConfigProvider.h>
Public Member Functions | |
virtual | ~Provider ()=default |
Config | getConfig (const Params &, DiagnosticCallback) const |
Build a config based on this provider. | |
Static Public Member Functions | |
static std::unique_ptr< Provider > | fromYAMLFile (llvm::StringRef AbsPath, llvm::StringRef Directory, const ThreadsafeFS &, bool Trusted=false) |
Reads fragments from a single YAML file with a fixed path. | |
static std::unique_ptr< Provider > | fromAncestorRelativeYAMLFiles (llvm::StringRef RelPath, const ThreadsafeFS &, bool Trusted=false) |
static std::unique_ptr< Provider > | combine (std::vector< const Provider * >) |
A provider that includes fragments from all the supplied providers. | |
A source of configuration fragments.
Generally these providers reflect a fixed policy for obtaining config, but return different concrete configuration over time. e.g. a provider that reads config from files is responsive to file changes.
Definition at line 62 of file ConfigProvider.h.
|
virtualdefault |
|
static |
A provider that includes fragments from all the supplied providers.
Order is preserved; later providers take precedence over earlier ones.
Definition at line 147 of file ConfigProvider.cpp.
Referenced by clang::clangd::clangdMain().
|
static |
Definition at line 84 of file ConfigProvider.cpp.
References clang::clangd::absoluteParent(), clang::clangd::config::Params::FreshTime, clang::clangd::config::Params::Path, and Trusted.
Referenced by clang::clangd::clangdMain().
|
static |
Reads fragments from a single YAML file with a fixed path.
If non-empty, Directory will be used to resolve relative paths in the fragments.
Definition at line 56 of file ConfigProvider.cpp.
References Directory, clang::clangd::config::Params::FreshTime, and Trusted.
Referenced by clang::clangd::clangdMain().
Config clang::clangd::config::Provider::getConfig | ( | const Params & | P, |
DiagnosticCallback | DC | ||
) | const |
Build a config based on this provider.
Definition at line 169 of file ConfigProvider.cpp.
References C, clang::clangd::config::Params::Path, and SPAN_ATTACH.
Referenced by clang::clangd::ClangdServer::createConfiguredContextProvider().