LLVM 22.0.0git
llvm::lsp::Diagnostic Struct Reference

#include "llvm/Support/LSP/Protocol.h"

Public Attributes

Range range
 The source range where the message applies.
DiagnosticSeverity severity = DiagnosticSeverity::Undetermined
 The diagnostic's severity.
std::string source
 A human-readable string describing the source of this diagnostic, e.g.
std::string message
 The diagnostic's message.
std::optional< std::vector< DiagnosticRelatedInformation > > relatedInformation
 An array of related diagnostic information, e.g.
std::vector< DiagnosticTagtags
 Additional metadata about the diagnostic.
std::optional< std::string > category
 The diagnostic's category.

Detailed Description

Definition at line 697 of file Protocol.h.

Member Data Documentation

◆ category

std::optional<std::string> llvm::lsp::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 723 of file Protocol.h.

Referenced by llvm::lsp::toJSON().

◆ message

std::string llvm::lsp::Diagnostic::message

The diagnostic's message.

Definition at line 710 of file Protocol.h.

Referenced by llvm::lsp::toJSON().

◆ range

Range llvm::lsp::Diagnostic::range

The source range where the message applies.

Definition at line 699 of file Protocol.h.

Referenced by llvm::lsp::toJSON().

◆ relatedInformation

std::optional<std::vector<DiagnosticRelatedInformation> > llvm::lsp::Diagnostic::relatedInformation

An array of related diagnostic information, e.g.

when symbol-names within a scope collide all definitions can be marked via this property.

Definition at line 714 of file Protocol.h.

Referenced by llvm::lsp::toJSON().

◆ severity

DiagnosticSeverity llvm::lsp::Diagnostic::severity = DiagnosticSeverity::Undetermined

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 703 of file Protocol.h.

Referenced by llvm::lsp::toJSON().

◆ source

std::string llvm::lsp::Diagnostic::source

A human-readable string describing the source of this diagnostic, e.g.

'typescript' or 'super lint'.

Definition at line 707 of file Protocol.h.

Referenced by llvm::lsp::toJSON().

◆ tags

std::vector<DiagnosticTag> llvm::lsp::Diagnostic::tags

Additional metadata about the diagnostic.

Definition at line 717 of file Protocol.h.

Referenced by llvm::lsp::toJSON().


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