-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Debug windows failures for localization changes #114228
Draft
ldionne
wants to merge
15
commits into
llvm:main
Choose a base branch
from
ldionne:wip/debug-windows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+208
−376
Conversation
This file contains 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...7dfae2ca2b99949f374264906923d230306c27e5 libcxx/test/libcxx/clang_modules_include.gen.py libcxx/utils/libcxx/test/format.py View the diff from darker here.--- test/libcxx/clang_modules_include.gen.py 2024-10-30 13:26:24.000000 +0000
+++ test/libcxx/clang_modules_include.gen.py 2024-10-30 16:52:14.401347 +0000
@@ -18,11 +18,12 @@
import sys
sys.path.append(sys.argv[1])
from libcxx.header_information import lit_header_restrictions, public_headers
for header in public_headers:
- print(f"""\
+ print(
+ f"""\
//--- {header}.compile.pass.cpp
// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
// Older macOS SDKs were not properly modularized, which causes issues with localization.
// This feature should instead be based on the SDK version.
@@ -45,11 +46,12 @@
// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME
{lit_header_restrictions.get(header, '')}
#include <{header}>
-""")
+"""
+ )
print(
f"""\
//--- import_std.compile.pass.mm
// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
--- utils/libcxx/test/format.py 2024-10-30 13:56:06.000000 +0000
+++ utils/libcxx/test/format.py 2024-10-30 16:52:14.505545 +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 7dfae2ca2b99949f374264906923d230306c27e5 --extensions h,,cpp -- libcxx/include/__locale_dir/locale_base_api.h libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h libcxx/include/locale libcxx/src/locale.cpp libcxx/src/support/win32/locale_win32.cpp libcxx/test/std/re/re.traits/getloc.pass.cpp View the diff from clang-format here.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 cdef5417b2..ba387e7da8 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>
|
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.