From c8c71e6f7620bf2d4919011f0f1779f1f23040c4 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 10 Oct 2019 13:23:02 +0000 Subject: [PATCH] Fix some dangling else warnings EXPECT_EQ contains an if-else statement. It also contains some magic to suppress the dangling else warnings, but it seems that some new compilers can see through that... llvm-svn: 374341 --- .../Process/minidump/RegisterContextMinidumpTest.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp b/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp index f3cc8d6..265da63 100644 --- a/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp +++ b/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp @@ -157,33 +157,34 @@ static void TestARMRegInfo(const lldb_private::RegisterInfo *info) { EXPECT_NE(info->kinds[lldb::eRegisterKindDWARF], LLDB_INVALID_REGNUM); } // Verify generic register are set correctly - if (name == "r0") + if (name == "r0") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_ARG1); - else if (name == "r1") + } else if (name == "r1") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_ARG2); - else if (name == "r2") + } else if (name == "r2") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_ARG3); - else if (name == "r3") + } else if (name == "r3") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_ARG4); - else if (name == "sp") + } else if (name == "sp") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_SP); - else if (name == "fp") + } else if (name == "fp") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_FP); - else if (name == "lr") + } else if (name == "lr") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_RA); - else if (name == "pc") + } else if (name == "pc") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_PC); - else if (name == "cpsr") + } else if (name == "cpsr") { EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric], (uint32_t)LLDB_REGNUM_GENERIC_FLAGS); + } } TEST(RegisterContextMinidump, CheckRegisterContextMinidump_ARM) { -- 2.7.4