From fbaf36721783c3bcbd45f81294e6980eaef165e4 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Thu, 16 Sep 2021 16:26:49 -0300 Subject: [lldb] Show fix-it applied even if expression didn't evaluate succesfully If we applied a fix-it before evaluating an expression and that expression didn't evaluate correctly, we should still tell users about the fix-it we applied since that may be the reason why it didn't work correctly. Differential Revision: https://reviews.llvm.org/D109908 --- 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 bf62f3f2..a93cc15b 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -421,9 +421,8 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr, // We only tell you about the FixIt if we applied it. The compiler errors // will suggest the FixIt if it parsed. if (!m_fixed_expression.empty() && target.GetEnableNotifyAboutFixIts()) { - if (success == eExpressionCompleted) - error_stream.Printf(" Fix-it applied, fixed expression was: \n %s\n", - m_fixed_expression.c_str()); + error_stream.Printf(" Fix-it applied, fixed expression was: \n %s\n", + m_fixed_expression.c_str()); } if (result_valobj_sp) { -- cgit v1.1