[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 6 15:30:09 PDT 2023
================
@@ -172,8 +172,18 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command,
{
auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope();
ValueObjectSP valobj_sp;
- ExpressionResults expr_result =
- target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_options);
+ ExpressionResults expr_result = target.EvaluateExpression(
+ expr, exe_scope, valobj_sp, eval_options, &m_fixed_expression);
+
+ // Only mention Fix-Its if the command applies them.
+ // The compiler errors can address any parsing issues after applying
+ // Fix-It(s).
+ if (!m_fixed_expression.empty() && target.GetEnableNotifyAboutFixIts()) {
+ Stream &error_stream = result.GetErrorStream();
+ error_stream << " Applying Fix-It to expression, changing it to:\n";
+ error_stream << " " << m_fixed_expression << "\n";
----------------
felipepiovezan wrote:
Oh I see other places in the old code do the same...
https://github.com/llvm/llvm-project/pull/68452
More information about the lldb-commits
mailing list