-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Debug windows failures for localization changes #114228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can test this locally with the following command:darker --check --diff -r 6563ed3162d16e7f067dda554e96d0c9d476f207...49b6febc8112bc1c46319ea86e616f3a482648d4 libcxx/utils/libcxx/test/format.pyView the diff from darker here.--- format.py 2024-10-30 13:56:06.000000 +0000
+++ format.py 2024-10-30 18:27:11.126029 +0000
@@ -285,12 +285,14 @@
def execute(self, test, litConfig):
supportsVerify = "verify-support" in test.config.available_features
filename = test.path_in_suite[-1]
- if filename != 'getloc.pass.cpp':
- return lit.Test.Result(lit.Test.UNSUPPORTED, "not the test we're looking for")
+ if filename != "getloc.pass.cpp":
+ return lit.Test.Result(
+ lit.Test.UNSUPPORTED, "not the test we're looking for"
+ )
if re.search("[.]sh[.][^.]+$", filename):
steps = [] # The steps are already in the script
return self._executeShTest(test, litConfig, steps)
elif filename.endswith(".compile.pass.cpp") or filename.endswith(
|
You can test this locally with the following command:git-clang-format --diff 6563ed3162d16e7f067dda554e96d0c9d476f207 49b6febc8112bc1c46319ea86e616f3a482648d4 --extensions cpp,h -- libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h libcxx/src/locale.cpp libcxx/src/support/win32/locale_win32.cpp libcxx/test/std/re/re.traits/getloc.pass.cppView the diff from clang-format here.diff --git a/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h b/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h
index e0c0b88d37..42d168b518 100644
--- a/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h
+++ b/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h
@@ -27,9 +27,7 @@
#define __libcpp_mbrtowc_l(pwc, s, n, ps, l) mbrtowc_l(pwc, s, n, ps, l)
#define __libcpp_mbtowc_l(pwc, pmb, max, l) mbtowc_l(pwc, pmb, max, l)
#define __libcpp_mbrlen_l(s, n, ps, l) mbrlen_l(s, n, ps, l)
-inline _LIBCPP_HIDE_FROM_ABI lconv* __libcpp_localeconv_l(locale_t __loc) {
- return localeconv_l(__loc);
-}
+inline _LIBCPP_HIDE_FROM_ABI lconv* __libcpp_localeconv_l(locale_t __loc) { return localeconv_l(__loc); }
#define __libcpp_mbsrtowcs_l(dest, src, len, ps, l) mbsrtowcs_l(dest, src, len, ps, l)
#define __libcpp_snprintf_l(...) snprintf_l(__VA_ARGS__)
#define __libcpp_asprintf_l(...) asprintf_l(__VA_ARGS__)
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 9553027cc0..b6f51779e2 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -233,14 +233,14 @@ locale::__imp::__imp(const string& name, size_t refs) : facet(refs), facets_(N),
if (facets_[i])
facets_[i]->__add_shared();
-#define _DOIT(...) \
- do { \
- std::fprintf(stderr, "Creating " #__VA_ARGS__ "\n"); \
- auto* the_facet = new __VA_ARGS__(name_); \
- \
- std::fprintf(stderr, "Installing " #__VA_ARGS__ "\n"); \
- install(the_facet); \
- } while (false)
+#define _DOIT(...) \
+ do { \
+ std::fprintf(stderr, "Creating " #__VA_ARGS__ "\n"); \
+ auto* the_facet = new __VA_ARGS__(name_); \
+ \
+ std::fprintf(stderr, "Installing " #__VA_ARGS__ "\n"); \
+ install(the_facet); \
+ } while (false)
_DOIT(collate_byname<char>);
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
diff --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp
index 0be7e24172..2a3183649a 100644
--- a/libcxx/src/support/win32/locale_win32.cpp
+++ b/libcxx/src/support/win32/locale_win32.cpp
@@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
#include <cstdarg> // va_start, va_end
+#include <cstdio>
#include <locale>
#include <memory>
#include <type_traits>
-#include <cstdio>
#include <__locale_dir/locale_guard.h>
|
a435dff to
3bca93a
Compare
Member
Author
|
Closing since I found the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.