[libc-commits] [libc] [libc] Stop duplicating wcschr(). (PR #150661)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 25 11:25:15 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/wchar/wchar_utils.h libc/src/wchar/wcschr.cpp libc/src/wchar/wcspbrk.cpp libc/src/wchar/wcstok.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/wchar/wcstok.cpp b/libc/src/wchar/wcstok.cpp
index bf680dbf8..6698b6fc6 100644
--- a/libc/src/wchar/wcstok.cpp
+++ b/libc/src/wchar/wcstok.cpp
@@ -25,12 +25,12 @@ LLVM_LIBC_FUNCTION(wchar_t *, wcstok,
}
wchar_t *tok_start, *tok_end;
- for (tok_start = str; *tok_start != L'\0' && internal::wcschr(delims, *tok_start);
- ++tok_start)
+ for (tok_start = str;
+ *tok_start != L'\0' && internal::wcschr(delims, *tok_start); ++tok_start)
;
- for (tok_end = tok_start; *tok_end != L'\0' && !internal::wcschr(delims, *tok_end);
- ++tok_end)
+ for (tok_end = tok_start;
+ *tok_end != L'\0' && !internal::wcschr(delims, *tok_end); ++tok_end)
;
if (*tok_end != L'\0') {
``````````
</details>
https://github.com/llvm/llvm-project/pull/150661
More information about the libc-commits
mailing list