From 089227feaf0efb5e540783a5542655e25669e7d8 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 11 Oct 2024 09:08:52 -0700 Subject: Support inline diagnostics in CommandReturnObject (#110901) and implement them for dwim-print (a.k.a. `p`) as an example. The next step will be to expose them as structured data in SBCommandReturnObject. --- lldb/source/Commands/CommandObjectExpression.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index a72b409..8effb1a 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -7,9 +7,7 @@ //===----------------------------------------------------------------------===// #include "CommandObjectExpression.h" -#include "DiagnosticRendering.h" #include "lldb/Core/Debugger.h" -#include "lldb/Expression/DiagnosticManager.h" #include "lldb/Expression/ExpressionVariable.h" #include "lldb/Expression/REPL.h" #include "lldb/Expression/UserExpression.h" @@ -22,6 +20,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/DiagnosticsRendering.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-private-enumerations.h" @@ -490,7 +489,7 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr, std::vector details; llvm::consumeError(llvm::handleErrors( result_valobj_sp->GetError().ToError(), - [&](ExpressionError &error) { details = error.GetDetails(); })); + [&](DiagnosticError &error) { details = error.GetDetails(); })); // Find the position of the expression in the command. std::optional expr_pos; size_t nchar = m_original_command.find(expr); -- cgit v1.1