[llvm] [ADT][Test] Fix build errors on windows. (PR #85356)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 20:22:07 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Haonan Yang (haonanya)
<details>
<summary>Changes</summary>
Fix build errors on APIntTest.cpp: error: call to constructor of 'APInt' is ambiguous
APInt ApUMax(32, UINT_MAX, false);
candidate constructor:
APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
APInt(unsigned numBits, uint64_t val, bool isSigned = false);
---
Full diff: https://github.com/llvm/llvm-project/pull/85356.diff
1 Files Affected:
- (modified) llvm/unittests/ADT/APIntTest.cpp (+1-1)
``````````diff
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index 400313a6234677..5d77ef798b3b65 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -2918,7 +2918,7 @@ TEST(APIntTest, Average) {
APInt A100(32, 100);
APInt A101(32, 101);
APInt A200(32, 200, false);
- APInt ApUMax(32, UINT_MAX, false);
+ APInt ApUMax(32, UINT_MAX);
EXPECT_EQ(APInt(32, 150), APIntOps::avgFloorU(A100, A200));
EXPECT_EQ(APIntOps::RoundingUDiv(A100 + A200, A2, APInt::Rounding::DOWN),
``````````
</details>
https://github.com/llvm/llvm-project/pull/85356
More information about the llvm-commits
mailing list