[libcxx] [llvm] [libc++] Refactor the configuration macros to being always defined (PR #112094)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 12 05:21:02 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 9f24c145494ee238e65e25205a4dcb4451f009ae...c44ba766fdae9d1269cd6f4661189d0573d9687f libcxx/test/libcxx/feature_test_macro/ftm_metadata.sh.py libcxx/test/libcxx/feature_test_macro/version_header.sh.py libcxx/test/libcxx/feature_test_macro/version_header_implementation.sh.py libcxx/utils/generate_feature_test_macro_components.py libcxx/utils/libcxx/header_information.py libcxx/utils/libcxx/test/dsl.py libcxx/utils/libcxx/test/features.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- utils/libcxx/test/features.py 2024-10-12 12:09:11.000000 +0000
+++ utils/libcxx/test/features.py 2024-10-12 12:20:02.398900 +0000
@@ -229,11 +229,12 @@
),
# Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.20348.0):
# https://developercommunity.visualstudio.com/t/utf-8-locales-break-ctype-functions-for-wchar-type/1653678
Feature(
name="win32-broken-utf8-wchar-ctype",
- when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg) or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
+ when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg)
+ or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
and "_WIN32" in compilerMacros(cfg)
and not programSucceeds(
cfg,
"""
#include <locale.h>
@@ -285,11 +286,12 @@
),
# Check for Glibc < 2.27, where the ru_RU.UTF-8 locale had
# mon_decimal_point == ".", which our tests don't handle.
Feature(
name="glibc-old-ru_RU-decimal-point",
- when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg) or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
+ when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg)
+ or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
and not programSucceeds(
cfg,
"""
#include <locale.h>
#include <string.h>
@@ -400,11 +402,12 @@
}
for macro, feature in inverted_macros.items():
DEFAULT_FEATURES.append(
Feature(
name=feature,
- when=lambda cfg, m=macro: m in compilerMacros(cfg) and not compilerMacros(cfg)[m]
+ when=lambda cfg, m=macro: m in compilerMacros(cfg)
+ and not compilerMacros(cfg)[m],
)
)
# Mapping from canonical locale names (used in the tests) to possible locale
# names on various systems. Each locale is considered supported if any of the
``````````
</details>
https://github.com/llvm/llvm-project/pull/112094
More information about the llvm-commits
mailing list