[llvm] r303471 - Cosmetic. Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else].
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 17:02:08 PDT 2017
Author: gkistanova
Date: Fri May 19 19:02:08 2017
New Revision: 303471
URL: http://llvm.org/viewvc/llvm-project?rev=303471&view=rev
Log:
Cosmetic. Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else].
Modified:
llvm/trunk/unittests/Support/ScaledNumberTest.cpp
Modified: llvm/trunk/unittests/Support/ScaledNumberTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ScaledNumberTest.cpp?rev=303471&r1=303470&r2=303471&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/ScaledNumberTest.cpp (original)
+++ llvm/trunk/unittests/Support/ScaledNumberTest.cpp Fri May 19 19:02:08 2017
@@ -335,10 +335,12 @@ TEST(ScaledNumberHelpersTest, matchScale
EXPECT_EQ(SOut, matchScales(LDx, LSx, RDx, RSx)); \
EXPECT_EQ(LDy, LDx); \
EXPECT_EQ(RDy, RDx); \
- if (LDy) \
+ if (LDy) { \
EXPECT_EQ(Sy, LSx); \
- if (RDy) \
+ } \
+ if (RDy) { \
EXPECT_EQ(Sy, RSx); \
+ } \
} while (false)
MATCH_SCALES(uint32_t, 0, 0, 0, 0, 0, 0, 0);
More information about the llvm-commits
mailing list