[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional access in sbprogress (PR #128971)
Jacob Lalonde via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 26 16:09:21 PST 2025
================
@@ -40,7 +40,10 @@ SBProgress::~SBProgress() = default;
void SBProgress::Increment(uint64_t amount, const char *description) {
LLDB_INSTRUMENT_VA(amount, description);
- m_opaque_up->Increment(amount, description);
+ std::optional<std::string> description_opt;
+ if (description && description[0])
----------------
Jlalond wrote:
No we only set the value of the description optional if non-null, non-empty description. So `Increment(1, NULL/None in Python)` will bump the count by one but send no message.
https://github.com/llvm/llvm-project/pull/128971
More information about the lldb-commits
mailing list