[Lldb-commits] [lldb] [lldb] Fix surprising return values from Log::Enable/DisableChannel (PR #205561)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 24 09:21:11 PDT 2026
felipepiovezan wrote:
Do you think the signatures of these methods (both `GetFlags` and `Log::EnableLogChannel`) would become simpler if we removed the `stream` argument and replaces all return values with `Expected`? And then the caller (wherever it might be), logs the error value into the stream?
APIs returning booleans for success/failure are so easy to misuse... with the expected case we at the very least crash if we don't handle errors properly.
https://github.com/llvm/llvm-project/pull/205561
More information about the lldb-commits
mailing list