Nick Desaulniers
a3e2075e50
[libc][bit_test] fix -Wimplicit-int-conversion (#126317)
Fixes:
llvm-project/libc/src/__support/CPP/bit.h:235:28: error: implicit
conversion loses integer precision: 'int' to
'cpp::enable_if_t<cpp::is_unsigned_v<unsigned short>, unsigned short>'
(aka
'unsigned short') [-Werror,-Wimplicit-int-conversion]
235 | return (value << rotate) | (value >> (N - rotate));
| ~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
llvm-project/libc/src/__support/CPP/bit.h:247:28: error: implicit
conversion loses integer precision: 'int' to
'cpp::enable_if_t<cpp::is_unsigned_v<unsigned short>, unsigned short>'
(aka
'unsigned short') [-Werror,-Wimplicit-int-conversion]
247 | return (value >> rotate) | (value << (N - rotate));
| ~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
llvm-project/libc/test/src/__support/CPP/bit_test.cpp:45:36: error:
implicit conversion loses integer precision: 'int' to 'unsigned char'
[-Werror,-Wimplicit-int-conversion]
45 | EXPECT_FALSE(has_single_bit<T>(two_bits_value));
| ~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
Via the libc-cpp-utils-tests ninja target.
2025-02-12 08:59:02 -08:00
..
2025-02-12 08:59:02 -08:00
2025-01-23 12:02:54 -06:00
2024-03-01 21:59:41 -05:00
2024-11-12 12:52:08 -08:00
2024-11-18 16:04:41 -05:00
2024-11-05 10:25:25 -08:00
2024-02-13 10:45:43 -06:00
2024-12-05 18:21:03 -05:00
2024-07-04 13:34:15 -03:00
2024-09-11 23:41:32 -04:00
2024-11-12 08:19:47 -08:00
2025-01-17 13:07:46 -08:00
2024-07-22 08:44:02 -05:00
2023-09-26 11:45:04 +02:00
2025-02-07 13:36:06 -08:00
2024-11-13 10:28:07 -08:00
2024-07-25 13:38:06 -07:00
2024-06-25 16:33:36 -07:00
2025-01-16 12:04:44 -08:00
2024-11-22 15:33:18 -08:00
2025-01-17 13:15:53 -08:00
2024-11-22 15:33:18 -08:00
2023-11-28 22:39:00 -05:00
2024-04-06 10:39:55 +02:00
2024-11-05 10:25:25 -08:00
2025-02-04 08:57:41 +00:00
2024-07-12 09:28:41 -07:00
2024-07-12 09:28:41 -07:00
2024-11-05 10:25:25 -08:00
2024-11-01 21:49:57 -07:00
2024-11-05 10:25:25 -08:00
2024-07-12 09:28:41 -07:00
2024-03-06 14:30:05 -08:00
2024-11-12 08:19:47 -08:00