[PATCH] D23910: Improve documentation and testing of APIntFromVal

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 03:44:23 PDT 2016


Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: unittests/Isl/IslTest.cpp:68
@@ -67,2 +67,3 @@
     auto APNOne = APIntFromVal(IslNOne);
     // APInt has no sign bit, so never equals to a negative number.
+    // Compare with the two's complement of -1 in a 1-bit integer
----------------
I had replacing the comment " APInt has no sign bit, so never equals to a negative number", but of course it is still a valid statement.

================
Comment at: unittests/Isl/IslTest.cpp:69
@@ -68,4 +68,3 @@
     // APInt has no sign bit, so never equals to a negative number.
-    // FIXME: The canonical representation of a negative APInt is two's
-    // complement.
+    // Compare with the two's complement of -1 in a 1-bit integer
     EXPECT_EQ(APNOne, 1);
----------------
Nitpick: Dot at the end of the sentence.


https://reviews.llvm.org/D23910





More information about the llvm-commits mailing list