[llvm-branch-commits] [libcxx] 1360969 - [libc++] Adjust the version of __cpp_lib_ranges in C++20 mode

2024-10-14 Thread A. Jiang via llvm-branch-commits

Author: Louis Dionne
Date: 2024-10-11T15:30:47+08:00
New Revision: 1360969b8125a633a3a8ad734c8a369bd3cf47c2

URL: 
https://github.com/llvm/llvm-project/commit/1360969b8125a633a3a8ad734c8a369bd3cf47c2
DIFF: 
https://github.com/llvm/llvm-project/commit/1360969b8125a633a3a8ad734c8a369bd3cf47c2.diff

LOG: [libc++] Adjust the version of __cpp_lib_ranges in C++20 mode

This is a (very partial) cherry-pick of #101715 to fix this oversight
in the LLVM 19 release.

Added: 


Modified: 
libcxx/docs/FeatureTestMacroTable.rst
libcxx/include/version

libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py

Removed: 




diff  --git a/libcxx/docs/FeatureTestMacroTable.rst 
b/libcxx/docs/FeatureTestMacroTable.rst
index 7f95f0f4e1c17c..cbed6693f0a5d7 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -266,7 +266,7 @@ Status
 -- 
-
 ``__cpp_lib_polymorphic_allocator````201902L``
 -- 
-
-``__cpp_lib_ranges``   ``202207L``
+``__cpp_lib_ranges``   ``202110L``
 -- 
-
 ``__cpp_lib_remove_cvref`` ``201711L``
 -- 
-

diff  --git a/libcxx/include/version b/libcxx/include/version
index c8a31f77a915e1..76ab6bedafdd0b 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -184,7 +184,7 @@ __cpp_lib_print 
202207L  
 __cpp_lib_ranges202211L  
 
  

-202207L // C++20
+202110L // C++20
 __cpp_lib_ranges_as_const   202207L 
 __cpp_lib_ranges_as_rvalue  202207L 
 __cpp_lib_ranges_chunk  202202L 
@@ -429,7 +429,7 @@ __cpp_lib_void_t
201411L 
 # if _LIBCPP_AVAILABILITY_HAS_PMR
 #   define __cpp_lib_polymorphic_allocator  201902L
 # endif
-# define __cpp_lib_ranges   202207L
+# define __cpp_lib_ranges   202110L
 # define __cpp_lib_remove_cvref 201711L
 # if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
 #   define __cpp_lib_semaphore  201907L

diff  --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
index 6b756535569f6f..65da07ef029253 100644
--- 
a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
@@ -21,7 +21,7 @@
 __cpp_lib_default_template_type_for_algorithm_values202403L [C++26]
 __cpp_lib_freestanding_algorithm202311L [C++26]
 __cpp_lib_parallel_algorithm201603L [C++17]
-__cpp_lib_ranges202207L [C++20]
+__cpp_lib_ranges202110L [C++20]
 202211L [C++23]
 __cpp_lib_ranges_contains   202207L [C++23]
 __cpp_lib_ranges_find_last  202207L [C++23]
@@ -245,8 +245,8 @@
 # ifndef __cpp_lib_ranges
 #   error "__cpp_lib_ranges should be defined in c++20"
 # endif
-# if __cpp_lib_ranges != 202207L
-#   error "__cpp_lib_ranges should have the value 202207L in c++20"
+# if __cpp_lib_ranges != 202110L
+#   error "__cpp_lib_ranges should have the value 202110L in c++20"
 # endif
 
 # ifdef __

[llvm-branch-commits] [libcxx] [release/19.x][libc++] Adjust the version of __cpp_lib_ranges in C++20 mode (PR #109324)

2024-10-11 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja updated 
https://github.com/llvm/llvm-project/pull/109324

>From eb53b498045eca14b64897a329d24b182689fc14 Mon Sep 17 00:00:00 2001
From: Louis Dionne 
Date: Thu, 19 Sep 2024 15:40:47 -0400
Subject: [PATCH] [libc++] Adjust the version of __cpp_lib_ranges in C++20 mode

This is a (very partial) cherry-pick of #101715 to fix this oversight
in the LLVM 19 release.
---
 libcxx/docs/FeatureTestMacroTable.rst   | 2 +-
 libcxx/include/version  | 4 ++--
 .../algorithm.version.compile.pass.cpp  | 6 +++---
 .../functional.version.compile.pass.cpp | 6 +++---
 .../iterator.version.compile.pass.cpp   | 6 +++---
 .../support.limits.general/memory.version.compile.pass.cpp  | 6 +++---
 .../support.limits.general/ranges.version.compile.pass.cpp  | 6 +++---
 .../support.limits.general/version.version.compile.pass.cpp | 6 +++---
 libcxx/utils/generate_feature_test_macro_components.py  | 2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/libcxx/docs/FeatureTestMacroTable.rst 
b/libcxx/docs/FeatureTestMacroTable.rst
index 7f95f0f4e1c17c..cbed6693f0a5d7 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -266,7 +266,7 @@ Status
 -- 
-
 ``__cpp_lib_polymorphic_allocator````201902L``
 -- 
-
-``__cpp_lib_ranges``   ``202207L``
+``__cpp_lib_ranges``   ``202110L``
 -- 
-
 ``__cpp_lib_remove_cvref`` ``201711L``
 -- 
-
diff --git a/libcxx/include/version b/libcxx/include/version
index c8a31f77a915e1..76ab6bedafdd0b 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -184,7 +184,7 @@ __cpp_lib_print 
202207L  
 __cpp_lib_ranges202211L  
 
  

-202207L // C++20
+202110L // C++20
 __cpp_lib_ranges_as_const   202207L 
 __cpp_lib_ranges_as_rvalue  202207L 
 __cpp_lib_ranges_chunk  202202L 
@@ -429,7 +429,7 @@ __cpp_lib_void_t
201411L 
 # if _LIBCPP_AVAILABILITY_HAS_PMR
 #   define __cpp_lib_polymorphic_allocator  201902L
 # endif
-# define __cpp_lib_ranges   202207L
+# define __cpp_lib_ranges   202110L
 # define __cpp_lib_remove_cvref 201711L
 # if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
 #   define __cpp_lib_semaphore  201907L
diff --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
index 6b756535569f6f..65da07ef029253 100644
--- 
a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
@@ -21,7 +21,7 @@
 __cpp_lib_default_template_type_for_algorithm_values202403L [C++26]
 __cpp_lib_freestanding_algorithm202311L [C++26]
 __cpp_lib_parallel_algorithm201603L [C++17]
-__cpp_lib_ranges202207L [C++20]
+__cpp_lib_ranges202110L [C++20]
 202211L [C++23]
 __cpp_lib_ranges_contains   202207L [C++23]
 __cpp_lib_ranges_find_last  202207L [C++23]
@@ -245,8 +245,8 @@
 # ifndef __cpp_lib_ranges
 #   error "__cpp_lib_ranges should be defined in c++20"
 # endif
-# if __cpp_lib_ranges != 202207L
-#   error "__cpp_lib_ranges should have the value 202207L in c++20"
+# if __cpp_lib_ranges != 202110L
+#   error "__cpp_lib_ranges should have the value 202110L in c++20"
 # endif
 
 # ifdef __cpp_lib_ranges_contains
diff --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
index 3c6a23aadc449b..a9e9a

[llvm-branch-commits] [libcxx] [release/19.x][libc++] Adjust the version of __cpp_lib_ranges in C++20 mode (PR #109324)

2024-10-11 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

@ldionne I force-pushed the branch for resolving conflicts with #109291. Please 
double-check the changes.

https://github.com/llvm/llvm-project/pull/109324
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [release/19.x][libc++] Adjust the version of __cpp_lib_ranges in C++20 mode (PR #109324)

2024-10-11 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja updated 
https://github.com/llvm/llvm-project/pull/109324

>From 1360969b8125a633a3a8ad734c8a369bd3cf47c2 Mon Sep 17 00:00:00 2001
From: Louis Dionne 
Date: Thu, 19 Sep 2024 15:40:47 -0400
Subject: [PATCH] [libc++] Adjust the version of __cpp_lib_ranges in C++20 mode

This is a (very partial) cherry-pick of #101715 to fix this oversight
in the LLVM 19 release.
---
 libcxx/docs/FeatureTestMacroTable.rst   | 2 +-
 libcxx/include/version  | 4 ++--
 .../algorithm.version.compile.pass.cpp  | 6 +++---
 .../functional.version.compile.pass.cpp | 6 +++---
 .../iterator.version.compile.pass.cpp   | 6 +++---
 .../support.limits.general/memory.version.compile.pass.cpp  | 6 +++---
 .../support.limits.general/ranges.version.compile.pass.cpp  | 6 +++---
 .../support.limits.general/version.version.compile.pass.cpp | 6 +++---
 libcxx/utils/generate_feature_test_macro_components.py  | 2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/libcxx/docs/FeatureTestMacroTable.rst 
b/libcxx/docs/FeatureTestMacroTable.rst
index 7f95f0f4e1c17c..cbed6693f0a5d7 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -266,7 +266,7 @@ Status
 -- 
-
 ``__cpp_lib_polymorphic_allocator````201902L``
 -- 
-
-``__cpp_lib_ranges``   ``202207L``
+``__cpp_lib_ranges``   ``202110L``
 -- 
-
 ``__cpp_lib_remove_cvref`` ``201711L``
 -- 
-
diff --git a/libcxx/include/version b/libcxx/include/version
index c8a31f77a915e1..76ab6bedafdd0b 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -184,7 +184,7 @@ __cpp_lib_print 
202207L  
 __cpp_lib_ranges202211L  
 
  

-202207L // C++20
+202110L // C++20
 __cpp_lib_ranges_as_const   202207L 
 __cpp_lib_ranges_as_rvalue  202207L 
 __cpp_lib_ranges_chunk  202202L 
@@ -429,7 +429,7 @@ __cpp_lib_void_t
201411L 
 # if _LIBCPP_AVAILABILITY_HAS_PMR
 #   define __cpp_lib_polymorphic_allocator  201902L
 # endif
-# define __cpp_lib_ranges   202207L
+# define __cpp_lib_ranges   202110L
 # define __cpp_lib_remove_cvref 201711L
 # if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
 #   define __cpp_lib_semaphore  201907L
diff --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
index 6b756535569f6f..65da07ef029253 100644
--- 
a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
@@ -21,7 +21,7 @@
 __cpp_lib_default_template_type_for_algorithm_values202403L [C++26]
 __cpp_lib_freestanding_algorithm202311L [C++26]
 __cpp_lib_parallel_algorithm201603L [C++17]
-__cpp_lib_ranges202207L [C++20]
+__cpp_lib_ranges202110L [C++20]
 202211L [C++23]
 __cpp_lib_ranges_contains   202207L [C++23]
 __cpp_lib_ranges_find_last  202207L [C++23]
@@ -245,8 +245,8 @@
 # ifndef __cpp_lib_ranges
 #   error "__cpp_lib_ranges should be defined in c++20"
 # endif
-# if __cpp_lib_ranges != 202207L
-#   error "__cpp_lib_ranges should have the value 202207L in c++20"
+# if __cpp_lib_ranges != 202110L
+#   error "__cpp_lib_ranges should have the value 202110L in c++20"
 # endif
 
 # ifdef __cpp_lib_ranges_contains
diff --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
index 3c6a23aadc449b..a9e9a

[llvm-branch-commits] [libcxx] [release/19.x][libc++] Follow-up to "Poison Pills are Too Toxic" (PR #109291)

2024-10-04 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja approved this pull request.

Looks like that we should merge this now.

https://github.com/llvm/llvm-project/pull/109291
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Adjust the version of __cpp_lib_ranges in C++20 mode (PR #109324)

2024-09-24 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

I guess 6f6422f4a2b8647a59936c131e50a79906d89510 and 
cdd608b8f0ce090b3568238387df368751bdbb5d should also be cherry-picked. @tru 
@ldionne 

https://github.com/llvm/llvm-project/pull/109324
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Follow-up to "Poison Pills are Too Toxic" (PR #109291)

2024-09-20 Thread A. Jiang via llvm-branch-commits


@@ -77,6 +77,7 @@ Implemented Papers
 - P2602R2 - Poison Pills are Too Toxic
 - P1981R0 - Rename ``leap`` to ``leap_second``
 - P1982R0 - Rename ``link`` to ``time_zone_link``
+- P2602R2 - Poison Pills are Too Toxic (as DR against C++20)

frederick-vs-ja wrote:

The line is duplicated.
```suggestion
- P2602R2 - Poison Pills are Too Toxic (as DR against C++20)
- P1981R0 - Rename ``leap`` to ``leap_second``
- P1982R0 - Rename ``link`` to ``time_zone_link``
```

https://github.com/llvm/llvm-project/pull/109291
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Follow-up to "Poison Pills are Too Toxic" (PR #109291)

2024-09-19 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja edited 
https://github.com/llvm/llvm-project/pull/109291
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Follow-up to "Poison Pills are Too Toxic" (PR #109291)

2024-09-19 Thread A. Jiang via llvm-branch-commits


@@ -992,6 +992,7 @@ def add_version_header(tc):
 "name": "__cpp_lib_ranges",
 "values": {
 "c++20": 202207,
+"c++23": 202211,  # P2602R2 Poison Pills are Too Toxic

frederick-vs-ja wrote:

(Not strictly related to this PR) I think the value is fine in C++23 mode, but 
perhaps it should be `202110L` in C++20 mode as explained in #101715.

https://github.com/llvm/llvm-project/pull/109291
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/20.x: [libc++][test] Backport test skipping for Apple Clang 17 (PR #131506)

2025-03-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja milestoned 
https://github.com/llvm/llvm-project/pull/131506
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/20.x: [libc++][test] Backport test skipping for Apple Clang 17 (PR #131506)

2025-03-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja created 
https://github.com/llvm/llvm-project/pull/131506

Cherry-pick of b552e35a06aef4366a933ea85ad3d4bef71e586a and #131438 to 
release/20.x.

It is observed that Apple Clang 17 has started to be used for CI, even for 
backporting to release/20.x. So I think we should backport skipping to 
release/20.x to resolve CI failures.

>From bbb319c0bfa2f5a09532f73a9cd11f86acfc849d Mon Sep 17 00:00:00 2001
From: Louis Dionne 
Date: Thu, 30 Jan 2025 12:46:24 -0500
Subject: [PATCH 1/2] [libc++] Forward-proof some tests for AppleClang 17

---
 .../new.delete/new.delete.array/sized_delete_array.pass.cpp | 1 +
 .../new.delete/new.delete.single/sized_delete.pass.cpp  | 1 +
 libcxx/test/std/numerics/c.math/signbit.pass.cpp| 2 +-
 .../meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp| 2 +-
 .../meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp  | 2 +-
 5 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
index 1d763d6caba6a..01387feed67b6 100644
--- 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
@@ -14,6 +14,7 @@
 // ADDITIONAL_COMPILE_FLAGS(clang-18): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(apple-clang-16): -fsized-deallocation
+// ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): 
-fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
 
diff --git 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
index 462037e53374b..06d3b0e5b3c35 100644
--- 
a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
@@ -14,6 +14,7 @@
 // ADDITIONAL_COMPILE_FLAGS(clang-18): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(apple-clang-16): -fsized-deallocation
+// ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): 
-fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
 
diff --git a/libcxx/test/std/numerics/c.math/signbit.pass.cpp 
b/libcxx/test/std/numerics/c.math/signbit.pass.cpp
index 143baf1fec941..b5e63dedf136e 100644
--- a/libcxx/test/std/numerics/c.math/signbit.pass.cpp
+++ b/libcxx/test/std/numerics/c.math/signbit.pass.cpp
@@ -12,7 +12,7 @@
 // UNSUPPORTED: windows
 
 // These compilers don't support constexpr `__builtin_signbit` yet.
-// UNSUPPORTED: clang-18, clang-19, apple-clang-15, apple-clang-16
+// UNSUPPORTED: clang-18, clang-19, apple-clang-15, apple-clang-16, 
apple-clang-17
 
 // XFAIL: FROZEN-CXX03-HEADERS-FIXME
 
diff --git 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
index 24adec37431e7..681ad13a07dfd 100644
--- 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
+++ 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
 
 // These compilers don't support __builtin_is_implicit_lifetime yet.
-// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16
+// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16, 
apple-clang-17
 
 // 
 
diff --git 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp
 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp
index 4bcb10d0b7579..34462f9bf0ec6 100644
--- 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp
+++ 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
 
 // These compilers don't support __builtin_is_implicit_lifetime yet.
-// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16
+// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16, 
apple-clang-17
 
 // 
 

>From d986fb74a21e735d72931093f27abc098831684f Mon Sep 17 00:00:00 2001
From: "A. Jian

[llvm-branch-commits] [libcxx] release/20.x: [libcxx] Add a missing include for __bit_iterator (#127015) (PR #131382)

2025-03-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja approved this pull request.

LGTM. I opened #131506 for resolving CI failures with Apple Clang 17, perhaps 
that patch should be backported first.

https://github.com/llvm/llvm-project/pull/131382
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2025-03-17 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja edited 
https://github.com/llvm/llvm-project/pull/94670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2025-03-17 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja edited 
https://github.com/llvm/llvm-project/pull/94670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] release/20.x: [clang] Reject constexpr-unknown values as constant expressions more consistently (PR #130658)

2025-03-10 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja approved this pull request.


https://github.com/llvm/llvm-project/pull/130658
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [libc++][ci] Update the Windows toolchains to Clang 19 (#129232) (PR #129303)

2025-03-01 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja approved this pull request.


https://github.com/llvm/llvm-project/pull/129303
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fixes (|multi)_set spaceship operator. (#127326) (PR #127342)

2025-02-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja requested changes to this pull request.

Let's just backport this fix!

https://github.com/llvm/llvm-project/pull/127342
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fixes (|multi)_set spaceship operator. (#127326) (PR #127342)

2025-02-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja approved this pull request.

Let's just backport this fix!

https://github.com/llvm/llvm-project/pull/127342
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fix a typo (PR #2)

2025-02-24 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

Hi @bodqhrohro!

The typo is still present.

https://github.com/llvm/llvm-project/blob/62ec7b8de97a197c2522177a52bdc78205579930/llvm/docs/GettingStarted.rst?plain=1#L548

Would you mind to submit a new PR to fix it?

https://github.com/llvm/llvm-project/pull/2
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Add missing release note for LLVM 20 about zip_view (#134144) (PR #134313)

2025-04-04 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja approved this pull request.


https://github.com/llvm/llvm-project/pull/134313
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/21.x: [libc++][Android] Reenable 2 tests for Android (#149415) (PR #150002)

2025-07-22 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja created 
https://github.com/llvm/llvm-project/pull/150002

Now that the Android clang has been upgraded to clang-r563880 
(llvm.org/pr148998), these two tests pass again.

Manually backport 8aa4fc0a9f80475dc0efb2ce14a860f86147d52d.

>From eee90cf37cafbe4006691073528857027200e21f Mon Sep 17 00:00:00 2001
From: Ryan Prichard 
Date: Thu, 17 Jul 2025 18:08:52 -0700
Subject: [PATCH] [libc++][Android] Reenable 2 tests for Android (#149415)

Now that the Android clang has been upgraded to clang-r563880
(llvm.org/pr148998), these two tests pass again.
---
 .../meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp  | 3 ---
 .../has_unique_object_representations.compile.pass.cpp | 3 ---
 2 files changed, 6 deletions(-)

diff --git 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
index 09086a4c046d6..8e57e8913dcbe 100644
--- 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
+++ 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
@@ -7,9 +7,6 @@
 
//===--===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
-// The Clang version that Android currently uses in the CI is too old.
-// XFAIL: LIBCXX-ANDROID-FIXME
-
 // type_traits
 
 // is_bounded_array
diff --git 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
index 9aac871f2633f..bd7da40daf2bc 100644
--- 
a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
+++ 
b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
@@ -8,9 +8,6 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// The Clang version that Android currently uses in the CI is too old.
-// XFAIL: LIBCXX-ANDROID-FIXME
-
 // type_traits
 
 // has_unique_object_representations

___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/21.x: [libc++] Fix hash_multi{map, set}::insert (#149290) (PR #149435)

2025-07-22 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

I opened #150002 to manually backport #149415.

https://github.com/llvm/llvm-project/pull/149435
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/21.x: [libc++][Android] Reenable 2 tests for Android (#149415) (PR #150002)

2025-07-22 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja milestoned 
https://github.com/llvm/llvm-project/pull/150002
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libc++] Introduce __force_nonstandard_layout base class for pointer field protection (PR #151652)

2025-08-02 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

> That's right. For example, the standard would require that a standard-layout 
> `std::unique_ptr` has the same representation as `int *` (assuming the 
> obvious implementation), and it was not considered practical to change the 
> representation of all pointers for compatibility reasons.

However, even if we make `std::unique_ptr` non-standard-layout, as long as 
the `int*` subobject is at offset 0, it's still well-defined to access the 
`int*` subobject via `*std::launder(reinterpret_cast(&up))`. I'm not sure 
whether merely requiring `launder` would be safe enough.

I think a "safer" way (defending against `reinterpret_cast`) would be making 
the `int*` subobject (and its friends) at some positive offset. But this is 
theoretically orthogonal to the standard-layout property.

https://github.com/llvm/llvm-project/pull/151652
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/21.x: [libc++] Implement comparison operators for `tuple` added in C++23 (#148799) (PR #151808)

2025-08-02 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

> Why do we want to back-port this? This looks to me very much like feature 
> work.

See also 
https://github.com/llvm/llvm-project/pull/148799#pullrequestreview-3079726788. 
I'm inclined to backport this, but I will be also fine if backport is 
eventually rejected.

https://github.com/llvm/llvm-project/pull/151808
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/21.x: [libc++] Implement comparison operators for `tuple` added in C++23 (#148799) (PR #151808)

2025-08-02 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja created 
https://github.com/llvm/llvm-project/pull/151808

And constrain the new `operator==` since C++26.

This patch implements parts of P2165R4, P2944R3, and a possibly improved 
resolution of LWG3882. Currently, libstdc++ and MSVC STL constrain the new 
overloads in the same way.

Also set feature-test macro `__cpp_lib_constrained_equality` and add related 
release note, as P2944R3 will completed with this patch.

Manually backport 4a509f853fa4821ecdb0f6bc3b90ddd48794cc8c.

>From fe866577c7977eaf5bbfe87c4a8336b288018274 Mon Sep 17 00:00:00 2001
From: "A. Jiang" 
Date: Fri, 1 Aug 2025 23:53:33 +0800
Subject: [PATCH] [libc++] Implement comparison operators for `tuple` added in
 C++23 (#148799)

And constrain the new `operator==` since C++26.

This patch implements parts of P2165R4, P2944R3, and a possibly improved
resolution of LWG3882. Currently, libstdc++ and MSVC STL constrain the
new overloads in the same way.

Also set feature-test macro `__cpp_lib_constrained_equality` and add
related release note, as P2944R3 will completed with this patch.

Fixes #136765
Fixes #136770
Fixes #105424
---
 libcxx/docs/FeatureTestMacroTable.rst |   2 +-
 libcxx/docs/ReleaseNotes/21.rst   |   2 +
 libcxx/docs/Status/Cxx23Papers.csv|   2 +-
 libcxx/docs/Status/Cxx2cIssues.csv|   1 +
 libcxx/docs/Status/Cxx2cPapers.csv|   2 +-
 libcxx/include/tuple  | 133 +++--
 libcxx/include/version|   2 +-
 .../expected.version.compile.pass.cpp |  16 +-
 .../optional.version.compile.pass.cpp |  16 +-
 .../tuple.version.compile.pass.cpp|  16 +-
 .../utility.version.compile.pass.cpp  |  16 +-
 .../variant.version.compile.pass.cpp  |  16 +-
 .../version.version.compile.pass.cpp  |  16 +-
 .../tuple/tuple.tuple/tuple.rel/eq.pass.cpp   | 380 +-
 .../tuple/tuple.tuple/tuple.rel/lt.pass.cpp   | 469 +++---
 ...ze_incompatible_three_way.compile.pass.cpp |  19 +-
 .../tuple.tuple/tuple.rel/three_way.pass.cpp  | 167 ++-
 .../generate_feature_test_macro_components.py |   2 -
 18 files changed, 852 insertions(+), 425 deletions(-)

diff --git a/libcxx/docs/FeatureTestMacroTable.rst 
b/libcxx/docs/FeatureTestMacroTable.rst
index 61805726a4ff0..a36848ebd24b4 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -432,7 +432,7 @@ Status
 -- 
-
 ``__cpp_lib_constexpr_queue``  ``202502L``
 -- 
-
-``__cpp_lib_constrained_equality`` *unimplemented*
+``__cpp_lib_constrained_equality`` ``202411L``
 -- 
-
 ``__cpp_lib_copyable_function``*unimplemented*
 -- 
-
diff --git a/libcxx/docs/ReleaseNotes/21.rst b/libcxx/docs/ReleaseNotes/21.rst
index 74bfa97fd21c2..91123ffa3e34b 100644
--- a/libcxx/docs/ReleaseNotes/21.rst
+++ b/libcxx/docs/ReleaseNotes/21.rst
@@ -53,6 +53,8 @@ Implemented Papers
 - P2711R1: Making multi-param constructors of ``views`` ``explicit`` (`Github 
`__)
 - P2770R0: Stashing stashing ``iterators`` for proper flattening (`Github 
`__)
 - P2655R3: ``common_reference_t`` of ``reference_wrapper`` Should Be a 
Reference Type (`Github `__)
+- P2944R3: Comparisons for ``reference_wrapper`` (`Github 
`__)
+- P3379R0: Constrain ``std::expected equality`` operators (`Github 
`__)
 
 Improvements and New Features
 -
diff --git a/libcxx/docs/Status/Cxx23Papers.csv 
b/libcxx/docs/Status/Cxx23Papers.csv
index e4fa07d82289d..f1d8e9a2bd09c 100644
--- a/libcxx/docs/Status/Cxx23Papers.csv
+++ b/libcxx/docs/Status/Cxx23Papers.csv
@@ -60,7 +60,7 @@
 "`P1642R11 `__","Freestanding ``[utilities]``, 
``[ranges]``, and ``[iterators]``","2022-07 (Virtual)","","",""
 "`P1899R3 `__","``stride_view``","2022-07 
(Virtual)","","",""
 "`P2093R14 `__","Formatted output","2022-07 
(Virtual)","|Complete|","18",""
-"`P2165R4 `__","Compatibility between ``tuple``, 
``pair`` and ``tuple-like`` objects","2022-07 (Virtual)","|Partial|","","Only 
the part for ``zip_view`` is implemented."
+"`P2165R4 `__","Compatibility between ``tuple``, 
``pair`` and ``tuple-like`` objects","2022-07 
(Virt

[llvm-branch-commits] [clang] release/20.x: [Clang][AST] Fix HandleLValueBase to deal with references (#140105) (PR #140246)

2025-05-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja created 
https://github.com/llvm/llvm-project/pull/140246

Since P2280R4 Unknown references and pointers was implemented, HandleLValueBase 
now has to deal with referneces:

D.MostDerivedType->getAsCXXRecordDecl()

will return a nullptr if D.MostDerivedType is a ReferenceType. The fix is to 
use getNonReferenceType() to obtain the Pointee Type if we have a reference.

(cherry picked from commit 136f2ba2a7bca015ef831c91fb0db5e5e31b7632)

>From 6ae8c79ed2c7d1deeb686f1d6e1c48b633e86c61 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour 
Date: Thu, 15 May 2025 16:04:37 -0700
Subject: [PATCH] [Clang][AST] Fix HandleLValueBase to deal with references
 (#140105)

Since P2280R4 Unknown references and pointers was implemented,
HandleLValueBase now has to deal with referneces:

D.MostDerivedType->getAsCXXRecordDecl()

will return a nullptr if D.MostDerivedType is a ReferenceType. The fix
is to use getNonReferenceType() to obtain the Pointee Type if we have a
reference.

Fixes: https://github.com/llvm/llvm-project/issues/139452
(cherry picked from commit 136f2ba2a7bca015ef831c91fb0db5e5e31b7632)

# Conflicts:
#   clang/docs/ReleaseNotes.rst
---
 clang/docs/ReleaseNotes.rst   |  2 ++
 clang/lib/AST/ExprConstant.cpp|  6 +-
 .../SemaCXX/constant-expression-p2280r4.cpp   | 21 +++
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 47ef2f80ac3f2..2f43dc4021fd8 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -909,6 +909,8 @@ Bug Fixes in This Version
   being deleted has a potentially throwing destructor (#GH118660).
 - Clang now outputs correct values when #embed data contains bytes with 
negative
   signed char values (#GH102798).
+- Fix crash due to unknown references and pointer implementation and handling 
of
+  base classes. (GH139452)
 
 Bug Fixes to Compiler Builtins
 ^^
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 23602362eaa79..e0746f4532245 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -3311,7 +3311,11 @@ static bool HandleLValueBase(EvalInfo &Info, const Expr 
*E, LValue &Obj,
 return false;
 
   // Extract most-derived object and corresponding type.
-  DerivedDecl = D.MostDerivedType->getAsCXXRecordDecl();
+  // FIXME: After implementing P2280R4 it became possible to get references
+  // here. We do MostDerivedType->getAsCXXRecordDecl() in several other
+  // locations and if we see crashes in those locations in the future
+  // it may make more sense to move this fix into Lvalue::set.
+  DerivedDecl = D.MostDerivedType.getNonReferenceType()->getAsCXXRecordDecl();
   if (!CastToDerivedClass(Info, E, Obj, DerivedDecl, D.MostDerivedPathLength))
 return false;
 
diff --git a/clang/test/SemaCXX/constant-expression-p2280r4.cpp 
b/clang/test/SemaCXX/constant-expression-p2280r4.cpp
index 6c9a87267109c..87beeb4d3dc84 100644
--- a/clang/test/SemaCXX/constant-expression-p2280r4.cpp
+++ b/clang/test/SemaCXX/constant-expression-p2280r4.cpp
@@ -179,3 +179,24 @@ namespace extern_reference_used_as_unknown {
   int y;
   constinit int& g = (x,y); // expected-warning {{left operand of comma 
operator has no effect}}
 }
+
+namespace GH139452 {
+struct Dummy {
+  explicit operator bool() const noexcept { return true; }
+};
+
+struct Base { int error; };
+struct Derived : virtual Base { };
+
+template 
+constexpr R get_value() {
+const auto& derived_val = Derived{};
+if (derived_val.error != 0)
+/* nothing */;
+return R{};
+}
+
+int f() {
+return !get_value(); // contextually convert the function call 
result to bool
+}
+}

___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] release/20.x: [Clang][AST] Fix HandleLValueBase to deal with references (#140105) (PR #140246)

2025-05-16 Thread A. Jiang via llvm-branch-commits

https://github.com/frederick-vs-ja milestoned 
https://github.com/llvm/llvm-project/pull/140246
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++] Implement std::move_only_function (P0288R9) (PR #94670)

2025-05-14 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

FYI [P2548R2](https://wg21.link/p2548r2) added relaxing wording to 
[[func.wrap.general]](https://eel.is/c++draft/func.wrap.general) to allow 
unwrapping in construction. I think we should implement the allowance for 
`move_only_function` in C++23 as a DR.
We can't unwrap in `function` construction though, IIUC, because its target 
object is observable. But we can unwrap `function` when constructing a 
`move_only_function`.

https://github.com/llvm/llvm-project/pull/94670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] release/21.x: [clang] Followup for constexpr-unknown potential constant expressions. (#151053) (PR #157098)

2025-09-07 Thread A. Jiang via llvm-branch-commits

frederick-vs-ja wrote:

> Buildbot is failing. Looks like 
> clang/test/SemaCXX/constant-expression-p2280r4.cpp may need to be adjusted? 
> Not sure.

I guess we should cherry-pick another change first, which reduced warning for 
`-Winvalid-constexpr`.

https://github.com/llvm/llvm-project/pull/157098
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits