From 383650c7f19b5b6892c572df06b280eb90afef37 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 3 Aug 2019 00:26:10 +0000 Subject: [PATCH] Add brackets to remove warnings about ambiguous 'else's. llvm-svn: 367740 --- llvm/unittests/Support/AlignmentTest.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/llvm/unittests/Support/AlignmentTest.cpp b/llvm/unittests/Support/AlignmentTest.cpp index 4730ad2..0e251eb 100644 --- a/llvm/unittests/Support/AlignmentTest.cpp +++ b/llvm/unittests/Support/AlignmentTest.cpp @@ -83,8 +83,9 @@ TEST(AlignmentTest, AlignTo) { // Test MaybeAlign EXPECT_EQ(alignTo(T.offset, A), T.rounded); // Test Align - if (A) + if (A) { EXPECT_EQ(alignTo(T.offset, A.getValue()), T.rounded); + } } } @@ -112,12 +113,15 @@ TEST(AlignmentTest, MinAlign) { for (const auto &T : kTests) { EXPECT_EQ(commonAlignment(MaybeAlign(T.A), MaybeAlign(T.B)), T.MinAlign); EXPECT_EQ(MinAlign(T.A, T.B), T.MinAlign); - if (T.A) + if (T.A) { EXPECT_EQ(commonAlignment(Align(T.A), MaybeAlign(T.B)), T.MinAlign); - if (T.B) + } + if (T.B) { EXPECT_EQ(commonAlignment(MaybeAlign(T.A), Align(T.B)), T.MinAlign); - if (T.A && T.B) + } + if (T.A && T.B) { EXPECT_EQ(commonAlignment(Align(T.A), Align(T.B)), T.MinAlign); + } } } @@ -155,8 +159,9 @@ TEST(AlignmentTest, isAligned) { // Test MaybeAlign EXPECT_EQ(isAligned(A, T.offset), T.isAligned); // Test Align - if (A) + if (A) { EXPECT_EQ(isAligned(A.getValue(), T.offset), T.isAligned); + } } } -- 2.7.4