MLIR  16.0.0git
Public Attributes | List of all members
mlir::lsp::Diagnostic Struct Reference

#include "Tools/lsp-server-support/Protocol.h"

+ Collaboration diagram for mlir::lsp::Diagnostic:

Public Attributes

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

Detailed Description

Definition at line 650 of file Protocol.h.

Member Data Documentation

◆ category

Optional<std::string> mlir::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 673 of file Protocol.h.

Referenced by mlir::lsp::fromJSON(), getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ message

std::string mlir::lsp::Diagnostic::message

The diagnostic's message.

Definition at line 663 of file Protocol.h.

Referenced by mlir::lsp::fromJSON(), getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ range

Range mlir::lsp::Diagnostic::range

The source range where the message applies.

Definition at line 652 of file Protocol.h.

Referenced by mlir::lsp::fromJSON(), getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ relatedInformation

Optional<std::vector<DiagnosticRelatedInformation> > mlir::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 667 of file Protocol.h.

Referenced by mlir::lsp::fromJSON(), getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ severity

DiagnosticSeverity mlir::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 656 of file Protocol.h.

Referenced by mlir::lsp::fromJSON(), getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ source

std::string mlir::lsp::Diagnostic::source

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

'typescript' or 'super lint'.

Definition at line 660 of file Protocol.h.

Referenced by mlir::lsp::fromJSON(), getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().


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