[libcxx-commits] [libcxx] [libc++] Cleanup windows macros (PR #207577)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 5 03:10:02 PDT 2026
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 ,cpp,h -- libcxx/include/__config libcxx/include/__filesystem/path.h libcxx/include/__filesystem/u8path.h libcxx/include/__locale libcxx/include/__locale_dir/locale_base_api.h libcxx/include/__locale_dir/support/windows.h libcxx/include/__math/gamma.h libcxx/include/__math/traits.h libcxx/include/__ostream/print.h libcxx/include/fstream libcxx/include/math.h libcxx/include/print libcxx/include/stdlib.h libcxx/include/string.h libcxx/include/text_encoding libcxx/include/wchar.h libcxx/src/chrono.cpp libcxx/src/filesystem/directory_iterator.cpp libcxx/src/filesystem/error.h libcxx/src/filesystem/file_descriptor.h libcxx/src/filesystem/filesystem_clock.cpp libcxx/src/filesystem/format_string.h libcxx/src/filesystem/operations.cpp libcxx/src/filesystem/path.cpp libcxx/src/filesystem/path_parser.h libcxx/src/filesystem/posix_compat.h libcxx/src/filesystem/time_utils.h libcxx/src/fstream.cpp libcxx/src/include/aligned_alloc.h libcxx/src/include/config_elast.h libcxx/src/iostream.cpp libcxx/src/locale.cpp libcxx/src/print.cpp libcxx/src/std_stream.h libcxx/src/string.cpp libcxx/src/support/win32/locale_win32.cpp libcxx/src/system_error.cpp libcxx/src/thread.cpp libcxx/test/support/count_new.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/string.h b/libcxx/include/string.h
index d494b37d7..417a34147 100644
--- a/libcxx/include/string.h
+++ b/libcxx/include/string.h
@@ -69,7 +69,7 @@ size_t strlen(const char* s);
// MSVCRT, GNU libc and its derivates may already have the correct prototype in
// <string.h>. This macro can be defined by users if their C library provides
// the right signature.
-# if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_LIBC_MSVCRT) || \
+# if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_LIBC_MSVCRT) || \
defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_)
# define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS
# endif
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 1067a2f25..22ad9aa8f 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -5514,7 +5514,7 @@ void moneypunct_byname<wchar_t, true>::init(const char* nm) {
# ifdef _WIN32
__init_pat(__pos_format_, __dummy_curr_symbol, true, lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, L' ');
__init_pat(__neg_format_, __curr_symbol_, true, lc->n_cs_precedes, lc->n_sep_by_space, lc->n_sign_posn, L' ');
-# else // _WIN32
+# else // _WIN32
__init_pat(
__pos_format_,
__dummy_curr_symbol,
``````````
</details>
https://github.com/llvm/llvm-project/pull/207577
More information about the libcxx-commits
mailing list