clang-tools  11.0.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
clang::clangd::Config Struct Reference

Settings that express user/project preferences and control clangd behavior. More...

#include <Config.h>

Collaboration diagram for clang::clangd::Config:
[legend]

Public Types

enum  BackgroundPolicy { BackgroundPolicy::Build, BackgroundPolicy::Skip }
 

Public Member Functions

 Config ()=default
 
 Config (const Config &)=delete
 
Configoperator= (const Config &)=delete
 
 Config (Config &&)=default
 
Configoperator= (Config &&)=default
 

Static Public Member Functions

static const Configcurrent ()
 Returns the Config of the current Context, or an empty configuration. More...
 

Public Attributes

struct {
   std::vector< llvm::unique_function< void(std::vector< std::string > &) const > >   Edits
 
CompileFlags
 Controls how the compile command for the current file is determined. More...
 
struct {
   BackgroundPolicy   Background = BackgroundPolicy::Build
 Whether this TU should be indexed. More...
 
Index
 Controls background-index behavior. More...
 

Static Public Attributes

static clangd::Key< ConfigKey
 Context key which can be used to set the current Config. More...
 

Detailed Description

Settings that express user/project preferences and control clangd behavior.

Generally, features should consume Config::current() and the caller is responsible for setting it appropriately. In practice these callers are ClangdServer, TUScheduler, and BackgroundQueue.

Definition at line 40 of file Config.h.

Member Enumeration Documentation

◆ BackgroundPolicy

Enumerator
Build 
Skip 

Definition at line 59 of file Config.h.

Constructor & Destructor Documentation

◆ Config() [1/3]

clang::clangd::Config::Config ( )
default

◆ Config() [2/3]

clang::clangd::Config::Config ( const Config )
delete

◆ Config() [3/3]

clang::clangd::Config::Config ( Config &&  )
default

Member Function Documentation

◆ current()

const Config & clang::clangd::Config::current ( )
static

Returns the Config of the current Context, or an empty configuration.

Definition at line 17 of file Config.cpp.

References clang::clangd::Context::current().

Referenced by clang::clangd::CommandMangler::adjust().

◆ operator=() [1/2]

Config& clang::clangd::Config::operator= ( Config &&  )
default

◆ operator=() [2/2]

Config& clang::clangd::Config::operator= ( const Config )
delete

Member Data Documentation

◆ Background

BackgroundPolicy clang::clangd::Config::Background = BackgroundPolicy::Build

Whether this TU should be indexed.

Definition at line 63 of file Config.h.

◆ CompileFlags

struct { ... } clang::clangd::Config::CompileFlags

Controls how the compile command for the current file is determined.

◆ Edits

std::vector<llvm::unique_function<void(std::vector<std::string> &) const> > clang::clangd::Config::Edits

Definition at line 56 of file Config.h.

Referenced by clang::clangd::CommandMangler::adjust().

◆ Index

struct { ... } clang::clangd::Config::Index

Controls background-index behavior.

◆ Key

Key< Config > clang::clangd::Config::Key
static

Context key which can be used to set the current Config.

Definition at line 44 of file Config.h.


The documentation for this struct was generated from the following files: