[Mlir-commits] [mlir] edd1732 - [MLIR][Presburger] clarify why -0 is used instead of 0 (NFC)

Arjun P llvmlistbot at llvm.org
Thu Sep 15 05:24:01 PDT 2022


Author: Arjun P
Date: 2022-09-15T13:23:48+01:00
New Revision: edd173201c520439739ee45b1cac5aa9e17b6893

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

LOG: [MLIR][Presburger] clarify why -0 is used instead of 0 (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 be8a9e261df2e..1be5a3f04bf59 100644
--- a/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
+++ b/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
@@ -1479,7 +1479,8 @@ TEST(IntegerPolyhedronTest, containsPointNoLocal) {
   IntegerPolyhedron poly3 =
       parseIntegerPolyhedron("(x, y) : (2*x - y >= 0, y - 3*x >= 0)");
 
-  // TODO: Using 0 instead of -0 makes this call ambiguous. Fix this.
+  // -0 instead of 0 to prevent unwanted conversion to pointer types,
+  // which would lead to ambiguity in overload resolution.
   EXPECT_TRUE(poly3.containsPointNoLocal({-0, 0}));
   EXPECT_FALSE(poly3.containsPointNoLocal({1, 0}));
 }


        


More information about the Mlir-commits mailing list