Skip to content

Commit 2a78c6d

Browse files
committed
[lldb] Fix warning: suggest explicit braces to avoid ambiguous ‘else’
According to the LLVM Style Guide we don't need braces because it's a single-line, but it looks like the macro expands to code that includes a potentially ambiguous "else". Use braces to silence the warning.
1 parent 2d31fc8 commit 2a78c6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/unittests/DAP/TestBase.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ void DAPTestBase::SetUp() {
5858
}
5959

6060
void DAPTestBase::TearDown() {
61-
if (core)
61+
if (core) {
6262
ASSERT_THAT_ERROR(core->discard(), Succeeded());
63-
if (binary)
63+
}
64+
if (binary) {
6465
ASSERT_THAT_ERROR(binary->discard(), Succeeded());
66+
}
6567
}
6668

6769
void DAPTestBase::SetUpTestSuite() {

0 commit comments

Comments
 (0)