LLDB mainline
Classes | Public Attributes | List of all members
lldb_private::DiagnosticDetail Struct Reference

A compiler-independent representation of an lldb_private::Diagnostic. More...

#include <DiagnosticsRendering.h>

Classes

struct  SourceLocation
 A source location consisting of a file name and position. More...
 

Public Attributes

std::optional< SourceLocationsource_location
 Contains this diagnostic's source location, if applicable.
 
lldb::Severity severity = lldb::eSeverityInfo
 Contains eSeverityError in the example above.
 
std::string message
 Contains "use of undeclared identifier 'foo'" in the example above.
 
std::string rendered
 Contains the fully rendered error message, without "error: ", but including the source context.
 

Detailed Description

A compiler-independent representation of an lldb_private::Diagnostic.

Expression evaluation failures often have more than one diagnostic that a UI layer might want to render differently, for example to colorize it.

Running example: (lldb) expr 1 + foo error: <user expression 0>:1:3: use of undeclared identifier 'foo' 1 + foo ^~~

Definition at line 28 of file DiagnosticsRendering.h.

Member Data Documentation

◆ message

std::string lldb_private::DiagnosticDetail::message

Contains "use of undeclared identifier 'foo'" in the example above.

Definition at line 54 of file DiagnosticsRendering.h.

Referenced by lldb_private::Diagnostic::AppendMessage(), lldb_private::Diagnostic::GetMessage(), and ClangDiagnosticManagerAdapter::HandleDiagnostic().

◆ rendered

std::string lldb_private::DiagnosticDetail::rendered

Contains the fully rendered error message, without "error: ", but including the source context.

Definition at line 57 of file DiagnosticsRendering.h.

Referenced by lldb_private::Diagnostic::AppendMessage(), and ClangDiagnosticManagerAdapter::HandleDiagnostic().

◆ severity

lldb::Severity lldb_private::DiagnosticDetail::severity = lldb::eSeverityInfo

Contains eSeverityError in the example above.

Definition at line 52 of file DiagnosticsRendering.h.

Referenced by lldb_private::Diagnostic::GetSeverity(), and ClangDiagnosticManagerAdapter::HandleDiagnostic().

◆ source_location

std::optional<SourceLocation> lldb_private::DiagnosticDetail::source_location

Contains this diagnostic's source location, if applicable.

Definition at line 50 of file DiagnosticsRendering.h.

Referenced by ClangDiagnosticManagerAdapter::HandleDiagnostic().


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