Skip to content

Commit e5c1312

Browse files
committed
[lldb] [lldb-dap] fix dangling-else warning
1 parent 2486994 commit e5c1312

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/tools/lldb-dap/Handler/RequestHandler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ MakeArgv(const llvm::ArrayRef<std::string> &strs) {
3333

3434
static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj,
3535
llvm::StringRef key, lldb::LaunchFlags mask) {
36-
if (const auto opt_value = GetBoolean(obj, key))
37-
if (opt_value.value())
36+
if (const auto opt_value = GetBoolean(obj, key)) {
37+
if (*opt_value)
3838
flags |= mask;
3939
else
4040
flags &= ~mask;
41+
}
4142

4243
return flags;
4344
}

0 commit comments

Comments
 (0)