[Mlir-commits] [mlir] 477c2c6 - [MLIR][Presburger] fix warning under g++ (NFC)

Arjun P llvmlistbot at llvm.org
Mon Jul 18 10:02:43 PDT 2022


Author: Arjun P
Date: 2022-07-18T18:02:20+01:00
New Revision: 477c2c6f4a5a99a7d7d21e5171611742320092f2

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

LOG: [MLIR][Presburger] fix warning under g++ (NFC)

Added: 
    

Modified: 
    mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp b/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
index 94c1edcedefc..d0231a9b5af6 100644
--- a/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
+++ b/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
@@ -617,10 +617,13 @@ static void checkDivisionRepresentation(
   // Check that the `dividends` and `expectedDividends` match. If the
   // denominator for a division is zero, we ignore its dividend.
   EXPECT_TRUE(divs.getNumDivs() == expectedDividends.size());
-  for (unsigned i = 0, e = divs.getNumDivs(); i < e; ++i)
-    if (divs.hasRepr(i))
-      for (unsigned j = 0, f = divs.getNumVars() + 1; j < f; ++j)
+  for (unsigned i = 0, e = divs.getNumDivs(); i < e; ++i) {
+    if (divs.hasRepr(i)) {
+      for (unsigned j = 0, f = divs.getNumVars() + 1; j < f; ++j) {
         EXPECT_TRUE(expectedDividends[i][j] == divs.getDividend(i)[j]);
+      }
+    }
+  }
 }
 
 TEST(IntegerPolyhedronTest, computeLocalReprSimple) {


        


More information about the Mlir-commits mailing list