[lldb][test] Fix GCC warnings in TestGetControlFlowKindX86.cpp

```
<...>/TestGetControlFlowKindx86.cpp:148:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
  148 |     if (kind == eInstructionControlFlowKindReturn)
      |        ^
```

Usually llvm is a "no braces for single line body" project but
for whatever reason gcc objects to it here. Perhaps because it's
within a for loop.

Added the newlines just for readability.
This commit is contained in:
David Spickett 2024-08-19 16:33:46 +01:00
parent 576aa3a509
commit 08201cb424

View File

@ -145,14 +145,19 @@ TEST_F(TestGetControlFlowKindx86, TestX86_64Instruction) {
EXPECT_EQ(kind, result[i]);
// Also, test the DisassemblerLLVMC::MCDisasmInstance methods.
if (kind == eInstructionControlFlowKindReturn)
if (kind == eInstructionControlFlowKindReturn) {
EXPECT_FALSE(inst_sp->IsCall());
if (kind == eInstructionControlFlowKindCall)
}
if (kind == eInstructionControlFlowKindCall) {
EXPECT_TRUE(inst_sp->IsCall());
}
if (kind == eInstructionControlFlowKindCall ||
kind == eInstructionControlFlowKindJump ||
kind == eInstructionControlFlowKindCondJump ||
kind == eInstructionControlFlowKindReturn)
kind == eInstructionControlFlowKindReturn) {
EXPECT_TRUE(inst_sp->DoesBranch());
}
}
}