Go to the documentation of this file.
32 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONFIGFRAGMENT_H
33 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CONFIGFRAGMENT_H
36 #include "llvm/ADT/Optional.h"
37 #include "llvm/ADT/STLExtras.h"
38 #include "llvm/Support/Error.h"
39 #include "llvm/Support/SMLoc.h"
40 #include "llvm/Support/SourceMgr.h"
69 llvm::StringRef BufferName,
132 std::vector<Located<std::string>>
Add;
150 std::vector<Located<std::string>>
Remove;
llvm::SMLoc Location
The start of the original source for this fragment.
static std::vector< Fragment > parseYAML(llvm::StringRef YAML, llvm::StringRef BufferName, DiagnosticCallback)
Parses fragments from a YAML file (one from each — delimited document).
CompileFlagsBlock CompileFlags
Conditions in the CompileFlags block affect how a file is parsed.
Controls how clangd understands code outside the current file.
llvm::Optional< Located< std::string > > Background
Whether files are built in the background to produce a project index.
CompiledFragment compile(DiagnosticCallback) &&
Analyzes and consumes this fragment, possibly yielding more diagnostics.
std::vector< Located< std::string > > PathMatch
The file being processed must fully match a regular expression.
const T & operator*() const
Conditions in the If block restrict when a Fragment applies.
An entity written in config along, with its optional location in the file.
Located(T Value, llvm::SMRange Range={})
const T & operator->() const
std::function< bool(const Params &, Config &)> CompiledFragment
A chunk of configuration that has been fully analyzed and is ready to apply.
std::shared_ptr< llvm::SourceMgr > Manager
Retains a buffer of the original source this fragment was parsed from.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
bool HasUnrecognizedCondition
An unrecognized key was found while parsing the condition.
These fields are not part of the user-specified configuration, but instead are populated by the parse...
std::vector< Located< std::string > > PathExclude
The file being processed must not fully match a regular expression.
A chunk of configuration obtained from a config file, LSP, or elsewhere.
std::vector< Located< std::string > > Remove
List of flags to remove from the compile command.
std::vector< Located< std::string > > Add
List of flags to append to the compile command.
llvm::function_ref< void(const llvm::SMDiagnostic &)> DiagnosticCallback
Used to report problems in parsing or interpreting a config.