[libc-commits] [libc] [libc] Wchar Stringconverter (PR #146388)

via libc-commits libc-commits at lists.llvm.org
Mon Jun 30 09:51:56 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- libc/src/__support/wchar/string_converter.h libc/test/src/__support/wchar/string_converter_test.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/__support/wchar/string_converter.h b/libc/src/__support/wchar/string_converter.h
index 769691e5e..90fff8dc4 100644
--- a/libc/src/__support/wchar/string_converter.h
+++ b/libc/src/__support/wchar/string_converter.h
@@ -64,7 +64,7 @@ public:
     auto out = cr.pop_utf32();
     if (out.has_value() && out.value() == L'\0')
       src_len = src_idx;
-    
+
     return out;
   }
 
@@ -76,7 +76,7 @@ public:
     auto out = cr.pop_utf8();
     if (out.has_value() && out.value() == '\0')
       src_len = src_idx;
-    
+
     return out;
   }
 };
diff --git a/libc/test/src/__support/wchar/string_converter_test.cpp b/libc/test/src/__support/wchar/string_converter_test.cpp
index 54e2d8658..12dfb9468 100644
--- a/libc/test/src/__support/wchar/string_converter_test.cpp
+++ b/libc/test/src/__support/wchar/string_converter_test.cpp
@@ -114,7 +114,7 @@ TEST(LlvmLibcStringConverterTest, UTF8To32PartialRead) {
   LIBC_NAMESPACE::internal::mbstate state;
   LIBC_NAMESPACE::internal::StringConverter<char8_t> sc(
       reinterpret_cast<const char8_t *>(src), 5, &state);
- 
+
   auto res = sc.popUTF32();
   ASSERT_TRUE(res.has_value());
   ASSERT_EQ(static_cast<int>(res.value()), 0x1f921);

``````````

</details>


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


More information about the libc-commits mailing list