[libcxx-commits] [libcxx] [libc++][test] `concat_macros.h`: Fix `TEST_HAS_NO_WIDE_CHARACTERS` syntax damage (PR #74987)
Stephan T. Lavavej via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Dec 10 01:14:57 PST 2023
https://github.com/StephanTLavavej created https://github.com/llvm/llvm-project/pull/74987
@mordante This was introduced by #73395 a couple of days ago.
This is causing PR checks to fail, [stage3 (generic-no-wide-characters, libcxx-runners-8-set, OFF)](https://github.com/llvm/llvm-project/actions/runs/7154839054/job/19484723909?pr=74254#logs):
```
In file included from /home/runner/_work/llvm-project/llvm-project/libcxx/test/std/utilities/format/format.tuple/format.functions.vformat.pass.cpp:29:
/home/runner/_work/llvm-project/llvm-project/libcxx/test/support/concat_macros.h:86:1: error: expected ')'
86 | OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
| ^
/home/runner/_work/llvm-project/llvm-project/libcxx/test/support/concat_macros.h:80:11: note: to match this '('
80 | requires(std::output_iterator<OutIt, const char&> &&
| ^
/home/runner/_work/llvm-project/llvm-project/libcxx/test/std/utilities/format/format.tuple/format.functions.vformat.pass.cpp:63:2: error: expected unqualified-id
63 | }
| ^
```
>From 7941189071d02d1596207d1fe3aa0d9c894c4c70 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Sun, 10 Dec 2023 01:08:04 -0800
Subject: [PATCH] Fix TEST_HAS_NO_WIDE_CHARACTERS syntax damage in
concat_macros.h.
---
libcxx/test/support/concat_macros.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libcxx/test/support/concat_macros.h b/libcxx/test/support/concat_macros.h
index bc1306fbdb5331..57c5f5e0632e71 100644
--- a/libcxx/test/support/concat_macros.h
+++ b/libcxx/test/support/concat_macros.h
@@ -80,9 +80,9 @@ template <class InIt, class OutIt>
requires(std::output_iterator<OutIt, const char&> &&
(std::same_as<std::iter_value_t<InIt>, char16_t>
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
- || (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 2))
+ || (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 2)
# endif
- )
+ ))
OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
while (first != last) {
char32_t value = *first++;
@@ -118,11 +118,11 @@ OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
template <class InIt, class OutIt>
requires(std::output_iterator<OutIt, const char&> &&
- (std::same_as<std::iter_value_t<InIt>, char32_t> ||
+ (std::same_as<std::iter_value_t<InIt>, char32_t>
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
- (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 4))
+ || (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 4)
# endif
- )
+ ))
OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
while (first != last) {
char32_t value = *first++;
More information about the libcxx-commits
mailing list