[llvm] add power function to APInt (PR #122788)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 13:38:25 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 87f4240230592a6ea2fc6c5ad2c189c372e1ea84 ee57ffa51f45a0953ee5310bc0ae0f8fa1a32524 --extensions h,cpp -- llvm/include/llvm/ADT/APInt.h llvm/lib/Support/APInt.cpp llvm/unittests/ADT/APIntTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index f1aad25d6e..3abd3fb1e3 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -91,7 +91,7 @@ TEST(APIntTest, PowerSignedMinValueTo1) {
 // Test that MaxValue^3 == MaxValue
 TEST(APIntTest, ZeroToZero) {
   APInt Zero = APInt::getZero(32);
-  APInt One(32,1);
+  APInt One(32, 1);
   APInt ZeroToZero = APIntOps::pow(Zero, 0);
   EXPECT_EQ(ZeroToZero, One);
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/122788


More information about the llvm-commits mailing list