clang-tools  8.0.0
Public Attributes | Static Public Attributes | List of all members
clang::clangd::ExecuteCommandParams Struct Reference

Exact commands are not specified in the protocol so we define the ones supported by Clangd here. More...

#include <Protocol.h>

Inheritance diagram for clang::clangd::ExecuteCommandParams:
[legend]
Collaboration diagram for clang::clangd::ExecuteCommandParams:
[legend]

Public Attributes

std::string command
 The command identifier, e.g. CLANGD_APPLY_FIX_COMMAND. More...
 
llvm::Optional< WorkspaceEditworkspaceEdit
 

Static Public Attributes

static const llvm::StringLiteral CLANGD_APPLY_FIX_COMMAND
 

Detailed Description

Exact commands are not specified in the protocol so we define the ones supported by Clangd here.

The protocol specifies the command arguments to be "any[]" but to make this safer and more manageable, each command we handle maps to a certain llvm::Optional of some struct to contain its arguments. Different commands could reuse the same llvm::Optional as arguments but a command that needs different arguments would simply add a new llvm::Optional and not use any other ones. In practice this means only one argument type will be parsed and set.

Definition at line 643 of file Protocol.h.

Member Data Documentation

◆ CLANGD_APPLY_FIX_COMMAND

const llvm::StringLiteral clang::clangd::ExecuteCommandParams::CLANGD_APPLY_FIX_COMMAND
static
Initial value:
=
"clangd.applyFix"

Definition at line 645 of file Protocol.h.

Referenced by clang::clangd::fromJSON().

◆ command

std::string clang::clangd::ExecuteCommandParams::command

The command identifier, e.g. CLANGD_APPLY_FIX_COMMAND.

Definition at line 648 of file Protocol.h.

Referenced by clang::clangd::fromJSON().

◆ workspaceEdit

llvm::Optional<WorkspaceEdit> clang::clangd::ExecuteCommandParams::workspaceEdit

Definition at line 651 of file Protocol.h.


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