clang-tools
11.0.0
|
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 | 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 | SourceInfo |
These fields are not part of the user-specified configuration, but instead are populated by the parser to describe the configuration source. More... | |
Public Member Functions | |
CompiledFragment | compile (DiagnosticCallback) && |
Analyzes and consumes this fragment, possibly yielding more diagnostics. More... | |
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). More... | |
Public Attributes | |
SourceInfo | Source |
IfBlock | If |
CompileFlagsBlock | CompileFlags |
IndexBlock | Index |
A chunk of configuration obtained from a config file, LSP, or elsewhere.
Definition at line 64 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 225 of file ConfigCompile.cpp.
|
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 198 of file ConfigYAML.cpp.
CompileFlagsBlock clang::clangd::config::Fragment::CompileFlags |
Definition at line 152 of file ConfigFragment.h.
IfBlock clang::clangd::config::Fragment::If |
Definition at line 118 of file ConfigFragment.h.
IndexBlock clang::clangd::config::Fragment::Index |
Definition at line 163 of file ConfigFragment.h.
SourceInfo clang::clangd::config::Fragment::Source |
Definition at line 95 of file ConfigFragment.h.