[Lldb-commits] [lldb] [lldb] Propagate ExpressionErrors from ValueObjectPrinter::GetDescriptionForDisplay (PR #152417)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 7 08:10:56 PDT 2025
================
@@ -150,6 +151,11 @@ llvm::Expected<std::string> ValueObjectPrinter::GetDescriptionForDisplay() {
if (maybe_str)
return maybe_str;
+ if (maybe_str.errorIsA<lldb_private::ExpressionError>())
+ // Propagate expression errors to expose diagnostics to the user.
+ // Without this early exit, the summary/value may be shown without errors.
+ return maybe_str;
+
----------------
adrian-prantl wrote:
Would this be testable by running an expression that fails reliably? For example by implementing a [-description] method that crashes?
https://github.com/llvm/llvm-project/pull/152417
More information about the lldb-commits
mailing list