[Lldb-commits] [PATCH] D109908: [lldb] Show fix-it applied even if expression didn't evaluate succesfully

Augusto Noronha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 16 12:29:54 PDT 2021


augusto2112 created this revision.
augusto2112 added reviewers: aprantl, labath.
augusto2112 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109908

Files:
  lldb/source/Commands/CommandObjectExpression.cpp


Index: lldb/source/Commands/CommandObjectExpression.cpp
===================================================================
--- lldb/source/Commands/CommandObjectExpression.cpp
+++ lldb/source/Commands/CommandObjectExpression.cpp
@@ -421,9 +421,8 @@
   // 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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109908.373032.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210916/1021c328/attachment.bin>


More information about the lldb-commits mailing list