[libc-commits] [libc] [libc] Make `stdc_first_trailing_one` spec compliant (PR #116493)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Nov 18 09:45:48 PST 2024


================
@@ -91,7 +91,7 @@ TYPED_TEST(LlvmLibcBitTest, FirstTrailingZero, UnsignedTypesNoBigInt) {
 }
 
 TYPED_TEST(LlvmLibcBitTest, FirstTrailingOne, UnsignedTypesNoBigInt) {
-  EXPECT_EQ(first_trailing_one<T>(cpp::numeric_limits<T>::max()), 0);
----------------
nickdesaulniers wrote:

Thanks for the patch! How about we keep the existing test cases (since they are correct, IIUC), but then add the additional test for zero? Here and below.

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


More information about the libc-commits mailing list