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

#include <Protocol.h>

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

Public Attributes

Range range
 The range at which the message applies. More...
 
int severity = 0
 The diagnostic's severity. More...
 
std::string message
 The diagnostic's code. More...
 
llvm::Optional< std::string > category
 The diagnostic's category. More...
 
llvm::Optional< std::vector< CodeAction > > codeActions
 Clangd extension: code actions related to this diagnostic. More...
 

Detailed Description

Definition at line 561 of file Protocol.h.

Member Data Documentation

◆ category

llvm::Optional<std::string> clang::clangd::Diagnostic::category

The diagnostic's category.

Can be omitted. An LSP extension that's used to send the name of the category over to the client. The category typically describes the compilation stage during which the issue was produced, e.g. "Semantic Issue" or "Parse Issue".

Definition at line 585 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), and clang::clangd::toJSON().

◆ codeActions

llvm::Optional<std::vector<CodeAction> > clang::clangd::Diagnostic::codeActions

Clangd extension: code actions related to this diagnostic.

Only with capability textDocument.publishDiagnostics.codeActionsInline. (These actions can also be obtained using textDocument/codeAction).

Definition at line 590 of file Protocol.h.

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

◆ message

std::string clang::clangd::Diagnostic::message

The diagnostic's code.

Can be omitted. Note: Not currently used by clangd A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. Note: Not currently used by clangd The diagnostic's message.

Definition at line 579 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), clang::clangd::LSPDiagnosticCompare::operator()(), clang::clangd::operator<<(), and clang::clangd::toJSON().

◆ range

Range clang::clangd::Diagnostic::range

The range at which the message applies.

Definition at line 563 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), clang::clangd::LSPDiagnosticCompare::operator()(), clang::clangd::operator<<(), and clang::clangd::toJSON().

◆ severity

int clang::clangd::Diagnostic::severity = 0

The diagnostic's severity.

Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.

Definition at line 567 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), clang::clangd::operator<<(), and clang::clangd::toJSON().


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