[libcxx-commits] [libcxx] [llvm] [libc++] Remove the need for `uselocale()` (PR #120158)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 19 08:14:13 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 46bbd2c80eb8673ef54decc6d3d55350e3126f50 a520e434e3718eb87cfee4f4d3964c344104cb45 --extensions h,cpp -- libcxx/include/__locale_dir/locale_base_api.h libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h libcxx/include/__locale_dir/support/bsd_like.h libcxx/include/__locale_dir/support/windows.h libcxx/include/__support/xlocale/__nop_locale_mgmt.h libcxx/src/iostream.cpp libcxx/src/support/win32/locale_win32.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__locale_dir/support/windows.h b/libcxx/include/__locale_dir/support/windows.h
index 81fbd74af9..03d05a410f 100644
--- a/libcxx/include/__locale_dir/support/windows.h
+++ b/libcxx/include/__locale_dir/support/windows.h
@@ -285,8 +285,7 @@ _LIBCPP_DIAGNOSTIC_POP
#undef _LIBCPP_VARIADIC_ATTRIBUTE_FORMAT
struct __locale_guard {
- _LIBCPP_HIDE_FROM_ABI __locale_guard(__locale_t __l)
- : __status(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)) {
+ _LIBCPP_HIDE_FROM_ABI __locale_guard(__locale_t __l) : __status(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)) {
// Setting the locale can be expensive even when the locale given is
// already the current locale, so do an explicit check to see if the
// current locale is already the one we want.
``````````
</details>
https://github.com/llvm/llvm-project/pull/120158
More information about the libcxx-commits
mailing list