================ @@ -32,12 +32,12 @@ MakeArgv(const llvm::ArrayRef<std::string> &strs) { } static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj, - llvm::StringRef key, lldb::LaunchFlags mask, - bool default_value) { - if (GetBoolean(obj, key).value_or(default_value)) - flags |= mask; - else - flags &= ~mask; + llvm::StringRef key, lldb::LaunchFlags mask) { + if (const auto opt_value = GetBoolean(obj, key)) + if (opt_value.value()) ---------------- JDevlieghere wrote:
Nit: I don't mind using `opt_value.value()` instead of `*opt_value`, but the latter is much more prevalent in llvm & lldb. ```suggestion if (*opt_value) ``` https://github.com/llvm/llvm-project/pull/129753 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits