File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lldb/source/DataFormatters Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 99#include " lldb/DataFormatters/ValueObjectPrinter.h"
1010
1111#include " lldb/DataFormatters/DataVisualization.h"
12+ #include " lldb/Expression/DiagnosticManager.h"
1213#include " lldb/Interpreter/CommandInterpreter.h"
1314#include " lldb/Target/Language.h"
1415#include " lldb/Target/Target.h"
@@ -150,6 +151,11 @@ llvm::Expected<std::string> ValueObjectPrinter::GetDescriptionForDisplay() {
150151 if (maybe_str)
151152 return maybe_str;
152153
154+ if (maybe_str.errorIsA <lldb_private::ExpressionError>())
155+ // Propagate expression errors to expose diagnostics to the user.
156+ // Without this early exit, the summary/value may be shown without errors.
157+ return maybe_str;
158+
153159 const char *str = nullptr ;
154160 if (!str)
155161 str = valobj.GetSummaryAsCString ();
You can’t perform that action at this time.
0 commit comments