|
clang-tools 22.0.0git
|
A chunk of configuration obtained from a config file, LSP, or elsewhere. More...
#include <ConfigFragment.h>
Classes | |
| struct | CompileFlagsBlock |
| Conditions in the CompileFlags block affect how a file is parsed. More... | |
| struct | CompletionBlock |
| Describes code completion preferences. More... | |
| struct | DiagnosticsBlock |
| Controls behavior of diagnostics (errors and warnings). More... | |
| struct | DocumentationBlock |
| Configures documentation style and behaviour. More... | |
| struct | HoverBlock |
| Describes hover preferences. More... | |
| struct | IfBlock |
| Conditions in the If block restrict when a Fragment applies. More... | |
| struct | IndexBlock |
| Controls how clangd understands code outside the current file. More... | |
| struct | InlayHintsBlock |
| Configures labels shown inline with the code. More... | |
| struct | SemanticTokensBlock |
| Configures semantic tokens that are produced by clangd. More... | |
| struct | SourceInfo |
| These fields are not part of the user-specified configuration, but instead are populated by the parser to describe the configuration source. More... | |
| struct | StyleBlock |
Public Member Functions | |
| CompiledFragment | compile (DiagnosticCallback) && |
| Analyzes and consumes this fragment, possibly yielding more diagnostics. | |
Static Public Member Functions | |
| static std::vector< Fragment > | parseYAML (llvm::StringRef YAML, llvm::StringRef BufferName, DiagnosticCallback) |
| Parses fragments from a YAML file (one from each — delimited document). | |
A chunk of configuration obtained from a config file, LSP, or elsewhere.
Definition at line 63 of file ConfigFragment.h.
| CompiledFragment clang::clangd::config::Fragment::compile | ( | DiagnosticCallback | D | ) | && |
Analyzes and consumes this fragment, possibly yielding more diagnostics.
This always produces a usable result (errors are recovered).
Typically, providers will compile a Fragment once when it's first loaded, caching the result for reuse. Like a compiled program, this is good for performance and also encourages errors to be reported early and only once.
The returned function is a cheap-copyable wrapper of refcounted internals.
Definition at line 832 of file ConfigCompile.cpp.
References compile(), ConfigFile(), Source, SPAN_ATTACH, and clang::clangd::vlog().
Referenced by compile().
|
static |
Parses fragments from a YAML file (one from each — delimited document).
Documents that contained fatal errors are omitted from the results. BufferName is used for the SourceMgr and diagnostics.
Definition at line 499 of file ConfigYAML.cpp.
References clang::clangd::config::Fragment::SourceInfo::Location, clang::clangd::log(), clang::clangd::config::Fragment::SourceInfo::Manager, Source, and clang::clangd::YAML.
Referenced by clang::clangd::config::FileConfigCache::get().
| CompileFlagsBlock clang::clangd::config::Fragment::CompileFlags |
Definition at line 182 of file ConfigFragment.h.
| CompletionBlock clang::clangd::config::Fragment::Completion |
Definition at line 358 of file ConfigFragment.h.
| DiagnosticsBlock clang::clangd::config::Fragment::Diagnostics |
Definition at line 303 of file ConfigFragment.h.
Referenced by clang::clangd::check().
| DocumentationBlock clang::clangd::config::Fragment::Documentation |
Definition at line 408 of file ConfigFragment.h.
| HoverBlock clang::clangd::config::Fragment::Hover |
Definition at line 367 of file ConfigFragment.h.
| IfBlock clang::clangd::config::Fragment::If |
Definition at line 123 of file ConfigFragment.h.
| IndexBlock clang::clangd::config::Fragment::Index |
Definition at line 215 of file ConfigFragment.h.
| InlayHintsBlock clang::clangd::config::Fragment::InlayHints |
Definition at line 388 of file ConfigFragment.h.
| SemanticTokensBlock clang::clangd::config::Fragment::SemanticTokens |
Definition at line 397 of file ConfigFragment.h.
| SourceInfo clang::clangd::config::Fragment::Source |
Definition at line 100 of file ConfigFragment.h.
Referenced by compile(), clang::clangd::config::FileConfigCache::get(), and parseYAML().
| StyleBlock clang::clangd::config::Fragment::Style |
Definition at line 330 of file ConfigFragment.h.