diff options
author | Adrian Prantl <aprantl@apple.com> | 2023-10-10 14:56:00 -0700 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2023-10-10 14:56:00 -0700 |
commit | 2e59b7550e3678a10be1a26f651488fc665a1f09 (patch) | |
tree | b702a9efc9cefecb7f55440cba56fc20b5e5221a /lldb/source | |
parent | 606f89ab7d537ca068fb1be9fd89d96a30de38f8 (diff) | |
download | llvm-2e59b7550e3678a10be1a26f651488fc665a1f09.zip llvm-2e59b7550e3678a10be1a26f651488fc665a1f09.tar.gz llvm-2e59b7550e3678a10be1a26f651488fc665a1f09.tar.bz2 |
Revert "[lldb] Fix `po` alias by printing fix-its to the console. (#68452)"
This reverts commit 606f89ab7d537ca068fb1be9fd89d96a30de38f8 while investigating bot failures.
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectDWIMPrint.cpp | 15 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 8 |
2 files changed, 6 insertions, 17 deletions
diff --git a/lldb/source/Commands/CommandObjectDWIMPrint.cpp b/lldb/source/Commands/CommandObjectDWIMPrint.cpp index bdc17c9..7b168ea 100644 --- a/lldb/source/Commands/CommandObjectDWIMPrint.cpp +++ b/lldb/source/Commands/CommandObjectDWIMPrint.cpp @@ -172,19 +172,8 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, { auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; - std::string fixed_expression; - - ExpressionResults expr_result = target.EvaluateExpression( - expr, exe_scope, valobj_sp, eval_options, &fixed_expression); - - // Only mention Fix-Its if the expression evaluator applied them. - // Compiler errors refer to the final expression after applying Fix-It(s). - if (!fixed_expression.empty() && target.GetEnableNotifyAboutFixIts()) { - Stream &error_stream = result.GetErrorStream(); - error_stream << " Evaluated this expression after applying Fix-It(s):\n"; - error_stream << " " << fixed_expression << "\n"; - } - + ExpressionResults expr_result = + target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_options); if (expr_result == eExpressionCompleted) { if (verbosity != eDWIMPrintVerbosityNone) { StringRef flags; diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 2834be6..e7e6e38 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -439,11 +439,11 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr, ExpressionResults success = target.EvaluateExpression( expr, frame, result_valobj_sp, eval_options, &m_fixed_expression); - // Only mention Fix-Its if the expression evaluator applied them. - // Compiler errors refer to the final expression after applying Fix-It(s). + // 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()) { - error_stream << " Evaluated this expression after applying Fix-It(s):\n"; - error_stream << " " << m_fixed_expression << "\n"; + error_stream.Printf(" Fix-it applied, fixed expression was: \n %s\n", + m_fixed_expression.c_str()); } if (result_valobj_sp) { |