[libc-commits] [libc] [libc] Implemented mblen functions (PR #150141)

via libc-commits libc-commits at lists.llvm.org
Thu Jul 24 10:14:16 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 h,cpp -- libc/src/wchar/mblen.cpp libc/src/wchar/mblen.h libc/src/wchar/mbrlen.cpp libc/src/wchar/mbrlen.h libc/test/src/wchar/mblen_test.cpp libc/test/src/wchar/mbrlen_test.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/src/wchar/mblen.cpp b/libc/src/wchar/mblen.cpp
index d6694a655..2d15b3e0e 100644
--- a/libc/src/wchar/mblen.cpp
+++ b/libc/src/wchar/mblen.cpp
@@ -17,7 +17,7 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(int, mblen, (const char * s, size_t n)) {
+LLVM_LIBC_FUNCTION(int, mblen, (const char *s, size_t n)) {
   // returns 0 since UTF-8 encoding is not state-dependent
   if (s == nullptr)
     return 0;
diff --git a/libc/src/wchar/mblen.h b/libc/src/wchar/mblen.h
index 03f158711..a315a2f12 100644
--- a/libc/src/wchar/mblen.h
+++ b/libc/src/wchar/mblen.h
@@ -14,7 +14,7 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-int mblen(const char * s, size_t n);
+int mblen(const char *s, size_t n);
 
 } // namespace LIBC_NAMESPACE_DECL
 

``````````

</details>


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


More information about the libc-commits mailing list