[libc-commits] [libc] Utf8-32-character-converter (PR #143973)
via libc-commits
libc-commits at lists.llvm.org
Thu Jun 12 14:01:52 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 -- libc/test/src/__support/wchar/utf8_to_32_test.cpp libc/src/__support/wchar/character_converter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/wchar/character_converter.cpp b/libc/src/__support/wchar/character_converter.cpp
index 9c2fde313..952d6e2ee 100644
--- a/libc/src/__support/wchar/character_converter.cpp
+++ b/libc/src/__support/wchar/character_converter.cpp
@@ -58,8 +58,8 @@ int CharacterConverter::push(char8_t utf8_byte) {
}
// Invalid
else {
- state->bytes_processed++;
- return -1;
+ state->bytes_processed++;
+ return -1;
}
}
// Any subsequent push
@@ -74,9 +74,7 @@ int CharacterConverter::push(char8_t utf8_byte) {
return -1;
}
-int CharacterConverter::push(char32_t utf32) {
- return utf32;
-}
+int CharacterConverter::push(char32_t utf32) { return utf32; }
utf_ret<char8_t> CharacterConverter::pop_utf8() {
utf_ret<char8_t> utf8;
``````````
</details>
https://github.com/llvm/llvm-project/pull/143973
More information about the libc-commits
mailing list