clang-tools 22.0.0git
clang::clangd::Diag Struct Reference

A top-level diagnostic that may have Notes and Fixes. More...

#include <Diagnostics.h>

Inheritance diagram for clang::clangd::Diag:
[legend]

Public Types

enum  DiagSource {
  Unknown , Clang , ClangTidy , Clangd ,
  ClangdConfig
}

Public Attributes

std::string Name
enum clang::clangd::Diag::DiagSource Source = Unknown
std::vector< NoteNotes
 Elaborate on the problem, usually pointing to a related piece of code.
std::vector< FixFixes
 Alternative fixes for this diagnostic, one should be chosen.
llvm::SmallVector< DiagnosticTag, 1 > Tags
Public Attributes inherited from clang::clangd::DiagBase
std::string Message
std::string File
std::optional< std::string > AbsFile
clangd::Range Range
DiagnosticsEngine::Level Severity = DiagnosticsEngine::Note
std::string Category
bool InsideMainFile = false
unsigned ID = 0
llvm::json::Object OpaqueData

Detailed Description

A top-level diagnostic that may have Notes and Fixes.

Definition at line 98 of file Diagnostics.h.

Member Enumeration Documentation

◆ DiagSource

Enumerator
Unknown 
Clang 
ClangTidy 
Clangd 
ClangdConfig 

Definition at line 101 of file Diagnostics.h.

Member Data Documentation

◆ Fixes

std::vector<Fix> clang::clangd::Diag::Fixes

Alternative fixes for this diagnostic, one should be chosen.

Definition at line 111 of file Diagnostics.h.

Referenced by clang::clangd::ClangdServer::codeAction(), and clang::clangd::StoreDiags::take().

◆ Name

std::string clang::clangd::Diag::Name

Definition at line 99 of file Diagnostics.h.

Referenced by clang::clangd::StoreDiags::take().

◆ Notes

std::vector<Note> clang::clangd::Diag::Notes

Elaborate on the problem, usually pointing to a related piece of code.

Definition at line 109 of file Diagnostics.h.

Referenced by clang::clangd::StoreDiags::take().

◆ Source

◆ Tags

llvm::SmallVector<DiagnosticTag, 1> clang::clangd::Diag::Tags

Definition at line 112 of file Diagnostics.h.


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