[PATCH] D111241: [APInt] Fix isAllOnes and extractBits for zero width values.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 11:56:31 PDT 2021


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

This makes me happy!



================
Comment at: llvm/unittests/ADT/APIntTest.cpp:2994
   EXPECT_EQ(0U, APInt(4, 3).trunc(0).getBitWidth());
+  EXPECT_EQ(1U, ZW.isAllOnes());
 
----------------
'true' would be better than '1U', but isn't there an EXPECT_TRUE for this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111241/new/

https://reviews.llvm.org/D111241



More information about the llvm-commits mailing list