9#ifndef LLDB_UTILITY_DIAGNOSTICSRENDERING_H
10#define LLDB_UTILITY_DIAGNOSTICSRENDERING_H
14#include "llvm/Support/WithColor.h"
63 std::optional<uint16_t> offset_in_command,
65 llvm::ArrayRef<DiagnosticDetail> details);
68 :
public llvm::ErrorInfo<DiagnosticError, CloneableECError> {
73 virtual llvm::ArrayRef<DiagnosticDetail>
GetDetails()
const = 0;
Common base class for all error-code errors.
StructuredData::ObjectSP GetAsStructuredData() const override
DiagnosticError(std::error_code ec)
virtual llvm::ArrayRef< DiagnosticDetail > GetDetails() const =0
lldb::ErrorType GetErrorType() const override
A stream class that can stream formatted output to a file.
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
StructuredData::ObjectSP Serialize(llvm::ArrayRef< DiagnosticDetail > details)
void RenderDiagnosticDetails(Stream &stream, std::optional< uint16_t > offset_in_command, bool show_inline, llvm::ArrayRef< DiagnosticDetail > details)
Severity
Used for expressing severity in logs and diagnostics.
A source location consisting of a file name and position.
unsigned line
1 in the example above.
bool in_user_input
Whether this source location refers to something the user typed as part of the command,...
FileSpec file
"<user expression 0>" in the example above.
uint16_t length
3 in the example above.
uint16_t column
5 in the example above.
bool hidden
Whether this source location should be surfaced to the user.
A compiler-independent representation of an lldb_private::Diagnostic.
std::optional< SourceLocation > source_location
Contains this diagnostic's source location, if applicable.
lldb::Severity severity
Contains eSeverityError in the example above.
std::string rendered
Contains the fully rendered error message, without "error: ", but including the source context.
std::string message
Contains "use of undeclared identifier 'foo'" in the example above.