[libcxx-commits] [libcxx] [libc++] Implement our own is{, x}digit functions for the C locale (PR #165467)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 28 12:40:26 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 origin/main HEAD --extensions h -- libcxx/include/__locale_dir/locale_base_api.h libcxx/include/__locale_dir/num.h libcxx/include/__locale_dir/support/bsd_like.h libcxx/include/__locale_dir/support/linux.h libcxx/include/__locale_dir/support/no_locale/characters.h libcxx/include/__locale_dir/support/windows.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/libcxx/include/__locale_dir/num.h b/libcxx/include/__locale_dir/num.h
index 224d7b9d2..518df2cf9 100644
--- a/libcxx/include/__locale_dir/num.h
+++ b/libcxx/include/__locale_dir/num.h
@@ -748,9 +748,7 @@ void __num_put<_CharT>::__widen_and_group_int(
     __op = __ob + (__np - __nb);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline bool __isdigit(char __c) {
-  return __c >= '0' && __c <= '9';
-}
+_LIBCPP_HIDE_FROM_ABI inline bool __isdigit(char __c) { return __c >= '0' && __c <= '9'; }
 
 _LIBCPP_HIDE_FROM_ABI inline bool __isxdigit(char __c) {
   auto __lower = __c | 0x20;

``````````

</details>


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


More information about the libcxx-commits mailing list