[llvm] c6e2649 - [llvm-exegesis] Fix -Wdangling-else gcc warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 10:48:38 PDT 2024


Author: Simon Pilgrim
Date: 2024-06-28T18:48:30+01:00
New Revision: c6e264952e94a7705d902ebda4d1a77256ee9926

URL: https://github.com/llvm/llvm-project/commit/c6e264952e94a7705d902ebda4d1a77256ee9926
DIFF: https://github.com/llvm/llvm-project/commit/c6e264952e94a7705d902ebda4d1a77256ee9926.diff

LOG: [llvm-exegesis] Fix -Wdangling-else gcc warning. NFC.

Added: 
    

Modified: 
    llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp b/llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
index b4d5fcaecd2ff..bf110c8ad76bb 100644
--- a/llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
+++ b/llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
@@ -182,8 +182,9 @@ TEST_F(X86SerialSnippetGeneratorTest,
     EXPECT_THAT(IT.getOpcode(), Opcode);
     ASSERT_THAT(IT.getVariableValues(), SizeIs(3));
     for (const auto &Var : IT.getVariableValues()) {
-      if (Var.isReg())
+      if (Var.isReg()) {
         EXPECT_FALSE(ForbiddenRegisters[Var.getReg()]);
+      }
     }
   }
 }


        


More information about the llvm-commits mailing list