[Lldb-commits] [lldb] [lldb] Assert that CommandObject::DoExecute sets a return status (PR #196589)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Fri May 8 11:04:16 PDT 2026
================
@@ -190,6 +201,7 @@ class CommandReturnObject {
std::optional<uint16_t> m_diagnostic_indent;
lldb::ReturnStatus m_status = lldb::eReturnStatusStarted;
+ bool m_status_set = false;
----------------
kastiglione wrote:
this looks like an unrolled optional, but you had reason to not to?
looking at the PR, it feels like it could be an optional with a default of nullopt, and then a compatible GetStatus would look like:
```cpp
ReturnStatus GetStatus() { return m_status.value_or(lldb::eReturnStatusStarted); }
```
https://github.com/llvm/llvm-project/pull/196589
More information about the lldb-commits
mailing list