[llvm] 34bbe65 - Fix a -Wsign-compare warning
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 14 12:19:43 PDT 2022
Author: Nico Weber
Date: 2022-10-14T15:19:30-04:00
New Revision: 34bbe6548dd9a932aecbcf417714ba103e0e2ddf
URL: https://github.com/llvm/llvm-project/commit/34bbe6548dd9a932aecbcf417714ba103e0e2ddf
DIFF: https://github.com/llvm/llvm-project/commit/34bbe6548dd9a932aecbcf417714ba103e0e2ddf.diff
LOG: Fix a -Wsign-compare warning
Added:
Modified:
llvm/unittests/ADT/APFixedPointTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/ADT/APFixedPointTest.cpp b/llvm/unittests/ADT/APFixedPointTest.cpp
index 3a197639f2ea0..ecb89fbf76c8b 100644
--- a/llvm/unittests/ADT/APFixedPointTest.cpp
+++ b/llvm/unittests/ADT/APFixedPointTest.cpp
@@ -276,7 +276,8 @@ void CheckIntPartMax(const FixedPointSemantics &Sema, uint64_t Expected) {
APSInt::getUnsigned(Expected)) == 0);
}
-void CheckIntPartRes(const FixedPointSemantics &Sema, int64_t Representation, int64_t Result) {
+void CheckIntPartRes(const FixedPointSemantics &Sema, int64_t Representation,
+ uint64_t Result) {
APFixedPoint Val(Representation, Sema);
ASSERT_EQ(Val.getIntPart().getZExtValue(), Result) ;
}
More information about the llvm-commits
mailing list