[Lldb-commits] [lldb] [lldb] fix unconsumed llvm::Expected's errors (PR #193257)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 28 08:37:16 PDT 2026
================
@@ -1188,14 +1188,12 @@ llvm::Expected<bool> ValueObject::GetValueAsBool() {
CompilerType val_type = GetCompilerType();
if (val_type.IsInteger() || val_type.IsUnscopedEnumerationType() ||
val_type.IsPointerType()) {
- auto value_or_err = GetValueAsAPSInt();
- if (value_or_err)
- return value_or_err->getBoolValue();
+ if (auto maybe_value = llvm::expectedToOptional(GetValueAsAPSInt()))
+ return maybe_value->getBoolValue();
----------------
charles-zablit wrote:
Fixed, thanks.
The latest commits ensures we log the error instead of converting it to an optional on both callsites.
https://github.com/llvm/llvm-project/pull/193257
More information about the lldb-commits
mailing list