[libcxx-commits] [libcxx] [libc++] Reduce the dependency of the locale base API on the base system from the headers (PR #117764)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 26 10:56:18 PST 2024


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 6f5e5b630559f2d17bdccfab5dff3a97ac0f8c66 fb4d85bfcd9457ce757b8e3ecfccc22e51825431 --extensions h -- libcxx/include/__locale_dir/locale_base_api.h libcxx/include/__locale_dir/support/bsd_like.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__locale_dir/support/bsd_like.h b/libcxx/include/__locale_dir/support/bsd_like.h
index ef9bf8c075..c5001bc54f 100644
--- a/libcxx/include/__locale_dir/support/bsd_like.h
+++ b/libcxx/include/__locale_dir/support/bsd_like.h
@@ -144,23 +144,23 @@ inline _LIBCPP_HIDE_FROM_ABI wint_t __btowc(int __c, __locale_t __loc) { return
 
 inline _LIBCPP_HIDE_FROM_ABI int __wctob(wint_t __c, __locale_t __loc) { return ::wctob_l(__c, __loc); }
 
-#ifdef _LIBCPP_BUILDING_LIBRARY
+#  ifdef _LIBCPP_BUILDING_LIBRARY
 inline _LIBCPP_HIDE_FROM_ABI size_t
 __wcsnrtombs(char* __dest, const wchar_t** __src, size_t __nwc, size_t __len, mbstate_t* __ps, __locale_t __loc) {
   return ::wcsnrtombs_l(__dest, __src, __nwc, __len, __ps, __loc);
 }
-#endif
+#  endif
 
 inline _LIBCPP_HIDE_FROM_ABI size_t __wcrtomb(char* __s, wchar_t __wc, mbstate_t* __ps, __locale_t __loc) {
   return ::wcrtomb_l(__s, __wc, __ps, __loc);
 }
 
-#ifdef _LIBCPP_BUILDING_LIBRARY
+#  ifdef _LIBCPP_BUILDING_LIBRARY
 inline _LIBCPP_HIDE_FROM_ABI size_t
 __mbsnrtowcs(wchar_t* __dest, const char** __src, size_t __nms, size_t __len, mbstate_t* __ps, __locale_t __loc) {
   return ::mbsnrtowcs_l(__dest, __src, __nms, __len, __ps, __loc);
 }
-#endif
+#  endif
 
 inline _LIBCPP_HIDE_FROM_ABI size_t
 __mbrtowc(wchar_t* __pwc, const char* __s, size_t __n, mbstate_t* __ps, __locale_t __loc) {

``````````

</details>


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


More information about the libcxx-commits mailing list