llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Kazu Hirata (kazutakahirata) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/151629.diff 1 Files Affected: - (modified) lldb/source/Interpreter/OptionArgParser.cpp (+1-1) ``````````diff diff --git a/lldb/source/Interpreter/OptionArgParser.cpp b/lldb/source/Interpreter/OptionArgParser.cpp index 616f6e3dc8820..170f65ad80a74 100644 --- a/lldb/source/Interpreter/OptionArgParser.cpp +++ b/lldb/source/Interpreter/OptionArgParser.cpp @@ -161,7 +161,7 @@ lldb::addr_t OptionArgParser::ToRawAddress(const ExecutionContext *exe_ctx, lldb::addr_t fail_value, Status *error_ptr) { std::optional<lldb::addr_t> maybe_addr = DoToAddress(exe_ctx, s, error_ptr); - return maybe_addr ? *maybe_addr : fail_value; + return maybe_addr.value_or(fail_value); } lldb::addr_t OptionArgParser::ToAddress(const ExecutionContext *exe_ctx, `````````` </details> https://github.com/llvm/llvm-project/pull/151629 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits