Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Oct 30, 2024

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 30, 2024

⚠️ Python code formatter, darker found issues in your code. ⚠️

You can test this locally with the following command:
darker --check --diff -r 6563ed3162d16e7f067dda554e96d0c9d476f207...49b6febc8112bc1c46319ea86e616f3a482648d4 libcxx/utils/libcxx/test/format.py
View 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(

@github-actions
Copy link

github-actions bot commented Oct 30, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

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.cpp
View 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>
 

@ldionne
Copy link
Member Author

ldionne commented Oct 30, 2024

Closing since I found the issue.

@ldionne ldionne closed this Oct 30, 2024
@ldionne ldionne deleted the wip/debug-windows branch October 31, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant