[PATCH] D153356: [Align] Add isAligned taking an APInt

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 07:00:39 PDT 2023


gchatelet marked 2 inline comments as done.
gchatelet added inline comments.


================
Comment at: llvm/lib/Support/APInt.cpp:168
 
+/// Prefix increment operator. Increments the APInt by one.
+bool APInt::isAligned(Align A) const {
----------------
nikic wrote:
> Copy and paste mistake :) You can just drop the comment as it's already in the header.
Duh! Thx : )


================
Comment at: llvm/unittests/ADT/APIntTest.cpp:1861
+    bool isAligned;
+  } kTests[] = {
+      {1, 0, true},  {1, 1, true},  {1, 5, true},  {2, 0, true},
----------------
nikic wrote:
> What does the `k` here mean?
`k` is for constants but it's not constant here and it's from another style guide... Thx for noticing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153356



More information about the llvm-commits mailing list