diff options
author | Augusto Noronha <augusto2112@me.com> | 2021-09-16 16:26:49 -0300 |
---|---|---|
committer | Augusto Noronha <augusto2112@me.com> | 2021-09-23 16:45:04 -0300 |
commit | fbaf36721783c3bcbd45f81294e6980eaef165e4 (patch) | |
tree | 3536b44a6d6abaf031a605b1edf82485130d04eb /lldb/source/Commands/CommandObjectExpression.cpp | |
parent | 221856f5cd13a877543ea6c5418330c1ee7fd715 (diff) | |
download | llvm-fbaf36721783c3bcbd45f81294e6980eaef165e4.zip llvm-fbaf36721783c3bcbd45f81294e6980eaef165e4.tar.gz llvm-fbaf36721783c3bcbd45f81294e6980eaef165e4.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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) { |