clang-tools  11.0.0
Classes | Typedefs | Functions
clang::clangd::config Namespace Reference

Classes

struct  CapturedDiags
 
class  FileConfigCache
 
struct  Fragment
 A chunk of configuration obtained from a config file, LSP, or elsewhere. More...
 
struct  Located
 An entity written in config along, with its optional location in the file. More...
 
struct  Params
 Describes the context used to evaluate configuration fragments. More...
 
class  Provider
 A source of configuration fragments. More...
 

Typedefs

using DiagnosticCallback = llvm::function_ref< void(const llvm::SMDiagnostic &)>
 Used to report problems in parsing or interpreting a config. More...
 
using CompiledFragment = std::function< bool(const Params &, Config &)>
 A chunk of configuration that has been fully analyzed and is ready to apply. More...
 

Functions

 MATCHER_P (DiagMessage, M, "")
 
 MATCHER_P (DiagKind, K, "")
 
 MATCHER_P (DiagPos, P, "")
 
 MATCHER_P (DiagRange, R, "")
 
Position toPosition (llvm::SMLoc L, const llvm::SourceMgr &SM)
 
Range toRange (llvm::SMRange R, const llvm::SourceMgr &SM)
 
template<typename T >
void PrintTo (const Located< T > &V, std::ostream *OS)
 

Typedef Documentation

◆ CompiledFragment

using clang::clangd::config::CompiledFragment = typedef std::function<bool(const Params &, Config &)>

A chunk of configuration that has been fully analyzed and is ready to apply.

Typically this is obtained from a Fragment by calling Fragment::compile().

Calling it updates the configuration to reflect settings from the fragment. Returns true if the condition was met and the settings were used.

Definition at line 54 of file ConfigProvider.h.

◆ DiagnosticCallback

using clang::clangd::config::DiagnosticCallback = typedef llvm::function_ref<void(const llvm::SMDiagnostic &)>

Used to report problems in parsing or interpreting a config.

Errors reflect structurally invalid config that should be user-visible. Warnings reflect e.g. unknown properties that are recoverable.

Definition at line 47 of file ConfigProvider.h.

Function Documentation

◆ MATCHER_P() [1/4]

clang::clangd::config::MATCHER_P ( DiagKind  ,
,
""   
)

Definition at line 57 of file ConfigTesting.h.

◆ MATCHER_P() [2/4]

clang::clangd::config::MATCHER_P ( DiagMessage  ,
,
""   
)

Definition at line 56 of file ConfigTesting.h.

◆ MATCHER_P() [3/4]

clang::clangd::config::MATCHER_P ( DiagPos  ,
,
""   
)

Definition at line 58 of file ConfigTesting.h.

◆ MATCHER_P() [4/4]

clang::clangd::config::MATCHER_P ( DiagRange  ,
,
""   
)

Definition at line 59 of file ConfigTesting.h.

◆ PrintTo()

template<typename T >
void clang::clangd::config::PrintTo ( const Located< T > &  V,
std::ostream *  OS 
)

Definition at line 22 of file ConfigYAMLTests.cpp.

References OS.

◆ toPosition()

Position clang::clangd::config::toPosition ( llvm::SMLoc  L,
const llvm::SourceMgr SM 
)
inline

Definition at line 61 of file ConfigTesting.h.

◆ toRange()

Range clang::clangd::config::toRange ( llvm::SMRange  R,
const llvm::SourceMgr SM 
)
inline

Definition at line 69 of file ConfigTesting.h.