[libc-commits] [libc] [libc] Add C23 binary prefix support to strtointeger (PR #202243)
Shubh Pachchigar via libc-commits
libc-commits at lists.llvm.org
Wed Jun 10 00:48:43 PDT 2026
================
@@ -239,3 +239,109 @@ TEST(LlvmLibcStrToIntegerTest, CombinedTests) {
EXPECT_EQ(result.parsed_len, ptrdiff_t(6));
ASSERT_EQ(result.value, 0);
}
+
+TEST(LlvmLibcStrToIntegerTest, Base2PrefixAutoSelect) {
+ auto result = LIBC_NAMESPACE::internal::strtointeger<int>("0b10101", 0, 10);
----------------
shubhe25p wrote:
Sure I can add that, thanks for the review
https://github.com/llvm/llvm-project/pull/202243
More information about the libc-commits
mailing list