From 36bb25eebd37ec2bf7593d3d1f4015ce7453bc69 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 16:11:41 -0700 Subject: [PATCH 01/25] Update llvm-project. --- llvm-project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-project b/llvm-project index 2e2b6b53f5f..ded04bf5d32 160000 --- a/llvm-project +++ b/llvm-project @@ -1 +1 @@ -Subproject commit 2e2b6b53f5f63179b52168ee156df7c76b90bc71 +Subproject commit ded04bf5d32a4fd5e0919053a598443f9d773549 From d7742db8b2abc92aa0cc78daf751466b17a16f2d Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 22 May 2024 22:55:40 -0700 Subject: [PATCH 02/25] LLVM-77948 implemented LWG-2381. --- tests/libcxx/expected_results.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 30643221bcc..d098e54b04d 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -140,10 +140,6 @@ std/language.support/support.limits/support.limits.general/ranges.version.compil # libc++ is missing various DRs std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp FAIL -# libc++ doesn't implement LWG-2381 -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp FAIL -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp FAIL - # libc++ doesn't implement LWG-3670 std/ranges/range.factories/range.iota.view/iterator/member_typedefs.compile.pass.cpp FAIL @@ -709,9 +705,6 @@ std/time/time.clock/time.clock.file/to_from_sys.pass.cpp FAIL # libc++'s filesystem::path::iterator models bidirectional_iterator, which is not guaranteed by the Standard std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp FAIL -# libc++ assumes long double is at least 80-bit; also affected by LWG-2381 -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp FAIL - # libc++ speculatively implemented an old proposed resolution for LWG-3645. # This test is bogus according to the wording that was ultimately accepted for C++23. std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp FAIL From b42cae37fd09f225ea13daed71b2c01cf01f5f5a Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 17:45:07 -0700 Subject: [PATCH 03/25] LLVM-79978 implemented P2652R2. --- tests/libcxx/expected_results.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index d098e54b04d..c966fc76fab 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -109,9 +109,6 @@ std/language.support/support.limits/support.limits.general/barrier.version.compi # libc++ doesn't implement P2602R2 "Poison Pills Are Too Toxic" std/ranges/range.access/size.pass.cpp FAIL -# libc++ doesn't implement P2652R2 "Disallowing User Specialization Of allocator_traits" -std/utilities/memory/allocator.traits/allocate_at_least.pass.cpp FAIL - # libc++ has not implemented P2937R0: "Freestanding Library: Remove strtok" std/language.support/support.limits/support.limits.general/cstring.version.compile.pass.cpp FAIL From 20ec99d8ea761618e1ec55fac50133c5512359eb Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 17:49:40 -0700 Subject: [PATCH 04/25] LLVM-79856 fixed LLVM-79783. --- tests/libcxx/expected_results.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index c966fc76fab..d8db63e5299 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -30,9 +30,6 @@ std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp:2 FAIL std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp FAIL std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp FAIL -# LLVM-79783: [libc++][test] array/size_and_alignment.compile.pass.cpp includes non-Standard <__type_traits/datasizeof.h> -std/containers/sequences/array/size_and_alignment.compile.pass.cpp FAIL - # LLVM-83734: [libc++][test] Don't include test_format_context.h in parse.pass.cpp std/containers/sequences/vector.bool/vector.bool.fmt/parse.pass.cpp FAIL std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp FAIL From ef898f4963991788aa1a26dedf7665fce4b62f11 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 17:52:41 -0700 Subject: [PATCH 05/25] LLVM-83734 was merged. --- tests/libcxx/expected_results.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index d8db63e5299..e064a9839dd 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -30,11 +30,6 @@ std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp:2 FAIL std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp FAIL std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp FAIL -# LLVM-83734: [libc++][test] Don't include test_format_context.h in parse.pass.cpp -std/containers/sequences/vector.bool/vector.bool.fmt/parse.pass.cpp FAIL -std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp FAIL -std/utilities/format/format.tuple/parse.pass.cpp FAIL - # Non-Standard regex behavior. # "It seems likely that the test is still non-conforming due to how libc++ handles the 'w' character class." std/re/re.traits/lookup_classname.pass.cpp FAIL From 62e9828ca724ba4b4aaf5f957fe21ee6e4d73b4a Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 17:54:06 -0700 Subject: [PATCH 06/25] LLVM-74534 implemented P2602R2. --- tests/libcxx/expected_results.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index e064a9839dd..8981c173a36 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -98,9 +98,6 @@ std/utilities/function.objects/range.cmp/not_equal_to.pass.cpp FAIL # libc++ doesn't implement P2588R3 barrier's Phase Completion Guarantees std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp FAIL -# libc++ doesn't implement P2602R2 "Poison Pills Are Too Toxic" -std/ranges/range.access/size.pass.cpp FAIL - # libc++ has not implemented P2937R0: "Freestanding Library: Remove strtok" std/language.support/support.limits/support.limits.general/cstring.version.compile.pass.cpp FAIL From 1917e9d1c2b2f2094798f5a46255b22ba5dec30e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 17:59:23 -0700 Subject: [PATCH 07/25] LLVM-88669 fixed many rand.dist tests. --- tests/libcxx/expected_results.txt | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 8981c173a36..a45fdc81643 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -654,15 +654,6 @@ std/numerics/complex.number/cmplx.over/proj.pass.cpp:1 FAIL # libc++ handles those input values differently std/numerics/complex.number/complex.value.ops/polar.pass.cpp FAIL -# Assertion failed: std::abs(skew - x_skew) < 0.01 -# Random number generation test with too strict pass criteria (test8 failure probability ~= 0.04) -std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp FAIL - -# Assertion failed: std::abs(f(u[i], a, m, bk, c) - double(i)/N) < .001 -# Random number generation test with too strict pass criteria (test6 failure probability > 0.2) -std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp FAIL - # Assertion failed: invalid min and max arguments for uniform_real # `param_type p(5);` is a precondition violation. std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp FAIL @@ -879,25 +870,6 @@ std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp SKIPPED # Not analyzed. Maybe Clang over-eagerly instantiating noexcept-specifier? std/utilities/memory/unique.ptr/iterator_concept_conformance.compile.pass.cpp:2 SKIPPED -# Not analyzed. Assertion failed: std::abs((kurtosis - x_kurtosis) / x_kurtosis) < VARIOUS_VALUES -std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.PR44847.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp FAIL - -# Not analyzed. Assertion failed: std::abs((skew - x_skew) / x_skew) < 0.01 -std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp FAIL - # Not analyzed. Runs forever std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp SKIPPED From be8c3ee6c7028ffe067d640032242d51eb6f0330 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 18 May 2024 18:01:54 -0700 Subject: [PATCH 08/25] LLVM-90981 fixed LLVM-74221. --- tests/libcxx/expected_results.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index a45fdc81643..78e7dc6c279 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -22,10 +22,6 @@ std/time/time.syn/formatter.year_month_day_last.pass.cpp:1 FAIL std/time/time.syn/formatter.year_month_weekday.pass.cpp:0 FAIL std/time/time.syn/formatter.year_month_weekday.pass.cpp:1 FAIL -# LLVM-74221: [libc++][test] nasty_char_traits::move is incompatible with constexpr -std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp:2 FAIL -std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp:2 FAIL - # LLVM-74756: [libc++][test] overload_compare_iterator doesn't support its claimed iterator_category std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp FAIL std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp FAIL From 9bdca2ab91e756f21f1a49af744cb780389b1ca1 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 23 May 2024 16:17:11 -0700 Subject: [PATCH 09/25] LLVM-88998 overhauled the pstl.exception_handling.pass.cpp tests. --- tests/libcxx/expected_results.txt | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 78e7dc6c279..eb983948913 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1337,18 +1337,4 @@ std/iterators/iterator.container/ssize.LWG3207.compile.pass.cpp:9 SKIPPED # These tests are marked as "UNSUPPORTED: !has-unix-headers" with comments saying: # "`check_assertion.h` requires Unix headers". -std/algorithms/alg.modifying.operations/alg.fill/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.modifying.operations/alg.move/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.modifying.operations/alg.replace/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.modifying.operations/alg.rotate/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.modifying.operations/alg.transform/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.nonmodifying/alg.all_of/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.nonmodifying/alg.any_of/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.nonmodifying/alg.equal/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.nonmodifying/alg.find/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.nonmodifying/alg.foreach/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.nonmodifying/alg.none_of/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.sorting/alg.merge/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/alg.sorting/alg.sort/stable.sort/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/numeric.ops/reduce/pstl.exception_handling.pass.cpp:9 SKIPPED -std/algorithms/numeric.ops/transform.reduce/pstl.exception_handling.pass.cpp:9 SKIPPED +std/algorithms/pstl.exception_handling.pass.cpp:9 SKIPPED From b6626b9667bb8e2a9de89604022b84a3dd5de8b1 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 19 May 2024 00:21:30 -0700 Subject: [PATCH 10/25] LLVM-75553 and LLVM-83841 replaced old Features with 'has-1024-bit-atomics'. Also, unconditional Features should be defined in features.py. --- tests/utils/stl/test/features.py | 1 + tests/utils/stl/test/tests.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/utils/stl/test/features.py b/tests/utils/stl/test/features.py index 4d286378f3d..d45f7f9198c 100644 --- a/tests/utils/stl/test/features.py +++ b/tests/utils/stl/test/features.py @@ -24,6 +24,7 @@ def hasLocale(loc): def getDefaultFeatures(config, litConfig): DEFAULT_FEATURES = [ Feature(name='has-64-bit-atomics'), + Feature(name='has-1024-bit-atomics'), Feature(name='msvc'), Feature(name='windows'), ] diff --git a/tests/utils/stl/test/tests.py b/tests/utils/stl/test/tests.py index 5ce0ae83457..779cf7b0ea6 100644 --- a/tests/utils/stl/test/tests.py +++ b/tests/utils/stl/test/tests.py @@ -322,9 +322,6 @@ def _parseFlags(self, litConfig): self._addCustomFeature('MT') self._addCustomFeature('static_CRT') - self._addCustomFeature('non-lockfree-atomics') # we always support non-lockfree-atomics - self._addCustomFeature('is-lockfree-runtime-function') # Ditto - # clang doesn't know how to link in the VS version of the asan runtime automatically if 'asan' in self.config.available_features and 'clang' in self.config.available_features: self.linkFlags.append("/INFERASANLIBS") From 37e0168c82ad3b61d389a8a68c3afb760453b13e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 22 May 2024 23:34:17 -0700 Subject: [PATCH 11/25] We 'has-no-zdump' (a unix program). --- tests/utils/stl/test/features.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/utils/stl/test/features.py b/tests/utils/stl/test/features.py index d45f7f9198c..c26e6697fe0 100644 --- a/tests/utils/stl/test/features.py +++ b/tests/utils/stl/test/features.py @@ -25,6 +25,7 @@ def getDefaultFeatures(config, litConfig): DEFAULT_FEATURES = [ Feature(name='has-64-bit-atomics'), Feature(name='has-1024-bit-atomics'), + Feature(name='has-no-zdump'), Feature(name='msvc'), Feature(name='windows'), ] From f6f84dffe13486b482c26850949b1aa3c6279ab1 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 19 May 2024 16:04:33 -0700 Subject: [PATCH 12/25] libcxx now uses 'c++23' instead of 'c++2b'. I believe this was https://github.com/llvm/llvm-project/commit/71400505ca04 with a followup PR LLVM-69035. --- tests/utils/stl/test/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/stl/test/tests.py b/tests/utils/stl/test/tests.py index 779cf7b0ea6..b932c336fc9 100644 --- a/tests/utils/stl/test/tests.py +++ b/tests/utils/stl/test/tests.py @@ -267,7 +267,7 @@ def _parseFlags(self, litConfig): if flag[1:5] == 'std:': foundStd = True if flag[5:] == 'c++latest': - self._addCustomFeature('c++2b') + self._addCustomFeature('c++23') elif flag[5:] == 'c++20': self._addCustomFeature('c++20') elif flag[5:] == 'c++17': From 08714e0ae1c806840b057b23f4406502e670f854 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 19 May 2024 17:30:29 -0700 Subject: [PATCH 13/25] Remove C++26 features from 'MISSING STL FEATURES'. Now that we're identifying ourselves as being a C++23 implementation. --- tests/libcxx/expected_results.txt | 79 ------------------------------- 1 file changed, 79 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index eb983948913..af97cc1eab4 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -202,30 +202,6 @@ std/strings/c.strings/cuchar.compile.pass.cpp FAIL std/language.support/support.limits/support.limits.general/cmath.version.compile.pass.cpp FAIL std/language.support/support.limits/support.limits.general/cstdlib.version.compile.pass.cpp FAIL -# P0543R3 Saturation Arithmetic -std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/add_sat.compile.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/add_sat.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/div_sat.compile.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/div_sat.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/mul_sat.compile.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/mul_sat.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.compile.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/sub_sat.compile.pass.cpp FAIL -std/numerics/numeric.ops/numeric.ops.sat/sub_sat.pass.cpp FAIL - -# P1759R6 Native Handles And File Streams -std/input.output/file.streams/fstreams/filebuf.members/native_handle.pass.cpp FAIL -std/input.output/file.streams/fstreams/filebuf/types.pass.cpp FAIL -std/input.output/file.streams/fstreams/fstream.members/native_handle.pass.cpp FAIL -std/input.output/file.streams/fstreams/fstream/types.pass.cpp FAIL -std/input.output/file.streams/fstreams/ifstream.members/native_handle.pass.cpp FAIL -std/input.output/file.streams/fstreams/ifstream/types.pass.cpp FAIL -std/input.output/file.streams/fstreams/ofstream.members/native_handle.pass.cpp FAIL -std/input.output/file.streams/fstreams/ofstream/types.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/fstream.version.compile.pass.cpp FAIL - # P2255R2 "Type Traits To Detect References Binding To Temporaries" std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp FAIL @@ -261,61 +237,6 @@ std/utilities/format/format.range/format.range.formatter/format.functions.vforma std/utilities/format/format.range/format.range.formatter/format.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/parse.pass.cpp FAIL -# P2363R5 Extending Associative Containers With The Remaining Heterogeneous Overloads -std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp FAIL - -# P2407R5 Freestanding Library: Partial Classes -std/language.support/support.limits/support.limits.general/array.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/optional.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/string_view.version.compile.pass.cpp FAIL - -# P2447R6 Constructing span From initializer_list -std/containers/views/views.span/span.cons/initializer_list.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/span.version.compile.pass.cpp FAIL - -# P2495R3 Interfacing stringstreams With string_view -std/language.support/support.limits/support.limits.general/sstream.version.compile.pass.cpp FAIL - -# P2497R0 Testing For Success Or Failure Of Functions -std/language.support/support.limits/support.limits.general/charconv.version.compile.pass.cpp FAIL -std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp FAIL -std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp FAIL - -# P2587R3 Redefining to_string To Use to_chars -std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp FAIL - -# P2637R3 Member visit -std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp FAIL -std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp FAIL -std/utilities/variant/variant.visit.member/visit.pass.cpp FAIL - -# P2697R1 Interfacing bitset With string_view -std/language.support/support.limits/support.limits.general/bitset.version.compile.pass.cpp FAIL -std/utilities/template.bitset/bitset.cons/string_view_ctor.pass.cpp FAIL - -# P2734R0 Adding The New SI Prefixes -std/language.support/support.limits/support.limits.general/ratio.version.compile.pass.cpp FAIL - -# P2819R2 Add The Tuple Protocol To complex -std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp FAIL - -# P2821R5 span::at() -std/containers/views/views.span/span.elem/at.pass.cpp FAIL - -# P2833R2 Freestanding Library: inout expected span -std/language.support/support.limits/support.limits.general/expected.version.compile.pass.cpp FAIL -std/language.support/support.limits/support.limits.general/mdspan.version.compile.pass.cpp FAIL - -# P2918R2 Runtime Format Strings II -std/utilities/format/format.fmt.string/ctor.runtime-format-string.pass.cpp FAIL -std/utilities/format/format.functions/format.locale.runtime_format.pass.cpp FAIL -std/utilities/format/format.functions/format.runtime_format.pass.cpp FAIL -std/utilities/format/format.syn/runtime_format_string.pass.cpp FAIL - # *** MISSING COMPILER FEATURES *** # P1169R4 static operator() From aaf1a347e5052a7920d402bc6933b9a6930e180c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 19 May 2024 17:48:26 -0700 Subject: [PATCH 14/25] Update magic comments. --- tests/libcxx/magic_comments.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/libcxx/magic_comments.txt b/tests/libcxx/magic_comments.txt index f566ee2315d..09281ca4e76 100644 --- a/tests/libcxx/magic_comments.txt +++ b/tests/libcxx/magic_comments.txt @@ -5,9 +5,11 @@ // REQUIRES: c++11 // REQUIRES: c++11 || c++14 // REQUIRES: c++11 || c++14 || c++17 || c++20 +// REQUIRES: c++17 // REQUIRES: has-unix-headers // REQUIRES: stdlib=libc++ -// UNSUPPORTED: c++14, c++17, c++2a +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23 +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23, c++26 // UNSUPPORTED: msvc -// UNSUPPORTED: msvc, target={{.+}}-windows-gnu +// UNSUPPORTED: no-filesystem, no-localization, no-tzdb, has-no-zdump // UNSUPPORTED: windows From a498e4bc9083b8b6886162b3ab1fbe313a6e9f9f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 22 May 2024 23:26:59 -0700 Subject: [PATCH 15/25] range_adaptor_closure.pass.cpp needs P1169R4 static operator(). --- tests/libcxx/expected_results.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index af97cc1eab4..ae9759d3ac0 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -240,6 +240,8 @@ std/utilities/format/format.range/format.range.formatter/parse.pass.cpp FAIL # *** MISSING COMPILER FEATURES *** # P1169R4 static operator() +std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp:0 FAIL +std/ranges/range.adaptors/range.adaptor.object/range_adaptor_closure.pass.cpp:1 FAIL std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp:0 FAIL std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp:1 FAIL std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp:0 FAIL From 4fa0277a6d4ac33da0f4a899074f8c886c4b8d1b Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 23 May 2024 00:12:13 -0700 Subject: [PATCH 16/25] Add missing newline. --- tests/libcxx/expected_results.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index ae9759d3ac0..6d5662c4dfc 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -780,6 +780,7 @@ std/re/re.alg/re.alg.search/awk.locale.pass.cpp FAIL std/re/re.alg/re.alg.search/basic.locale.pass.cpp FAIL std/re/re.alg/re.alg.search/ecma.locale.pass.cpp FAIL std/re/re.alg/re.alg.search/extended.locale.pass.cpp FAIL + # Not analyzed. Error mentions allocator. std/utilities/memory/specialized.algorithms/specialized.construct/construct_at.pass.cpp FAIL From ae4702c4ad7bc98a3fe3f77ff24a0ece22dc8ce9 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 23 May 2024 00:12:35 -0700 Subject: [PATCH 17/25] Mark a test as failing due to constexpr step limits. --- tests/libcxx/expected_results.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 6d5662c4dfc..8d0994f5091 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -946,6 +946,7 @@ std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp FAIL std/containers/sequences/vector.bool/append_range.pass.cpp FAIL std/containers/sequences/vector.bool/assign_range.pass.cpp FAIL std/containers/sequences/vector.bool/insert_range.pass.cpp FAIL +std/containers/sequences/vector/vector.modifiers/destroy_elements.pass.cpp FAIL std/containers/sequences/vector/vector.modifiers/insert_range.pass.cpp FAIL std/strings/basic.string/string.modifiers/string_replace/replace_with_range.pass.cpp FAIL std/utilities/charconv/charconv.to.chars/integral.pass.cpp FAIL From 9f4f2297a81d9768e7088ef0819a6a8b0a2ca512 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 23 May 2024 00:13:08 -0700 Subject: [PATCH 18/25] Update comment now that LLVM-74630 has been merged. --- tests/libcxx/expected_results.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 8d0994f5091..e2cc871f060 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1018,7 +1018,7 @@ std/time/time.duration/time.duration.nonmember/ostream.pass.cpp FAIL # Not analyzed. Assertion failed: loc.name() == "*" std/localization/locales/locale/locale.cons/name_construction.pass.cpp FAIL -# Not analyzed. After LLVM-74630 fixes LLVM-74214, will be blocked by our ctype_base deriving from locale::facet. +# Not analyzed. Blocked by our ctype_base deriving from locale::facet. std/localization/locale.categories/category.numeric/locale.num.get/user_defined_char_type.pass.cpp FAIL # Not analyzed. Assertion failed: res == cvt.ok From 74b80bf65665bfd21e089a55f40c7591878823f9 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 20 May 2024 13:01:16 -0700 Subject: [PATCH 19/25] Categorize failing tests. --- tests/libcxx/expected_results.txt | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index e2cc871f060..756a9da9793 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1189,6 +1189,57 @@ std/input.output/iostream.format/output.streams/ostream.formatted/ostream.format std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.print/vprint_nonunicode.pass.cpp FAIL std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.print/vprint_unicode.pass.cpp FAIL +# Not analyzed. test_chrono_leap_second.h wants us to provide a vendor-specific version of +# test_leap_second_create(), but it's unclear how to adapt their parameters to our implementation. +std/time/time.zone/time.zone.leap/assign.copy.pass.cpp FAIL +std/time/time.zone/time.zone.leap/cons.copy.pass.cpp FAIL +std/time/time.zone/time.zone.leap/members/date.pass.cpp FAIL +std/time/time.zone/time.zone.leap/members/value.pass.cpp FAIL +std/time/time.zone/time.zone.leap/nonmembers/comparison.pass.cpp FAIL + +# Not analyzed. Assertion failed: tzdb.leap_seconds.size() >= leap_seconds.size() +std/time/time.zone/time.zone.db/leap_seconds.pass.cpp FAIL + +# Not analyzed. Assertion failed: tz->name() == zone +std/time/time.zone/time.zone.db/time.zone.db.access/current_zone.pass.cpp FAIL +std/time/time.zone/time.zone.db/time.zone.db.tzdb/current_zone.pass.cpp FAIL + +# Not analyzed. Assertion failed: buffer.pubsetbuf(b, 10) == &buffer +std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp FAIL + +# Not analyzed. constexpr evaluation fails in assert(it.stride_count() == expected_counts.stride_count). +std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp FAIL + +# Not analyzed. Says "no exception is thrown while an exception of type std::format_error was expected". +std/time/time.syn/formatter.local_info.pass.cpp FAIL + +# Not analyzed. Assertion failed: atomic_ref underlying object is not aligned as required_alignment +# SKIPPED because failures are sporadic and/or architecture-dependent. +std/atomics/atomics.ref/assign.pass.cpp SKIPPED +std/atomics/atomics.ref/bitwise_and_assign.pass.cpp SKIPPED +std/atomics/atomics.ref/bitwise_or_assign.pass.cpp SKIPPED +std/atomics/atomics.ref/bitwise_xor_assign.pass.cpp SKIPPED +std/atomics/atomics.ref/compare_exchange_strong.pass.cpp SKIPPED +std/atomics/atomics.ref/compare_exchange_weak.pass.cpp SKIPPED +std/atomics/atomics.ref/convert.pass.cpp SKIPPED +std/atomics/atomics.ref/ctor.pass.cpp SKIPPED +std/atomics/atomics.ref/deduction.pass.cpp SKIPPED +std/atomics/atomics.ref/exchange.pass.cpp SKIPPED +std/atomics/atomics.ref/fetch_add.pass.cpp SKIPPED +std/atomics/atomics.ref/fetch_and.pass.cpp SKIPPED +std/atomics/atomics.ref/fetch_or.pass.cpp SKIPPED +std/atomics/atomics.ref/fetch_sub.pass.cpp SKIPPED +std/atomics/atomics.ref/fetch_xor.pass.cpp SKIPPED +std/atomics/atomics.ref/increment_decrement.pass.cpp SKIPPED +std/atomics/atomics.ref/is_always_lock_free.pass.cpp SKIPPED +std/atomics/atomics.ref/load.pass.cpp SKIPPED +std/atomics/atomics.ref/notify_all.pass.cpp SKIPPED +std/atomics/atomics.ref/notify_one.pass.cpp SKIPPED +std/atomics/atomics.ref/operator_minus_equals.pass.cpp SKIPPED +std/atomics/atomics.ref/operator_plus_equals.pass.cpp SKIPPED +std/atomics/atomics.ref/store.pass.cpp SKIPPED +std/atomics/atomics.ref/wait.pass.cpp SKIPPED + # *** XFAILs WHICH PASS *** # These tests contain `// XFAIL: msvc` comments, which accurately describe runtime failures for x86 and x64. From 80690c3f55ebe1b679b15cacca82d3625aa6c17d Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 30 May 2024 12:04:54 -0700 Subject: [PATCH 20/25] format.range.formatter/parse.pass.cpp is now passing. --- tests/libcxx/expected_results.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 756a9da9793..210ba1d22b1 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -235,7 +235,6 @@ std/utilities/format/format.range/format.range.fmtstr/parse.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/format.functions.format.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/format.functions.vformat.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/format.pass.cpp FAIL -std/utilities/format/format.range/format.range.formatter/parse.pass.cpp FAIL # *** MISSING COMPILER FEATURES *** From b9298650ef70850a921fbc0182f3711f65af2f8f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 30 May 2024 12:11:17 -0700 Subject: [PATCH 21/25] Recategorize format.range.formatter/format.pass.cpp. --- tests/libcxx/expected_results.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 210ba1d22b1..08518a8e0f9 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -234,7 +234,6 @@ std/utilities/format/format.range/format.range.fmtstr/format.pass.cpp FAIL std/utilities/format/format.range/format.range.fmtstr/parse.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/format.functions.format.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/format.functions.vformat.pass.cpp FAIL -std/utilities/format/format.range/format.range.formatter/format.pass.cpp FAIL # *** MISSING COMPILER FEATURES *** @@ -981,6 +980,7 @@ std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pa std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp FAIL std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp FAIL std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp FAIL +std/utilities/format/format.range/format.range.formatter/format.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/set_brackets.pass.cpp FAIL std/utilities/format/format.range/format.range.formatter/set_separator.pass.cpp FAIL std/utilities/format/format.tuple/format.pass.cpp FAIL From ab58930954a5b4f5c5de47456567454232b70bad Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 30 May 2024 23:01:48 -0700 Subject: [PATCH 22/25] Skip ranges.ends_with.pass.cpp which sporadically fails with "fatal error C1060: compiler is out of heap space". --- tests/libcxx/expected_results.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 08518a8e0f9..bd28176f13d 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1076,6 +1076,8 @@ std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.it std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp:1 SKIPPED std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp:0 SKIPPED std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp:1 SKIPPED +std/algorithms/alg.nonmodifying/alg.ends_with/ranges.ends_with.pass.cpp:0 SKIPPED +std/algorithms/alg.nonmodifying/alg.ends_with/ranges.ends_with.pass.cpp:1 SKIPPED std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp:0 SKIPPED std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp:1 SKIPPED std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp:0 SKIPPED From 75e2b33b759fea7f39df63540af7ddaa7cb8d74c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 31 May 2024 01:47:54 -0700 Subject: [PATCH 23/25] LLVM-79793 was merged, remove comment. --- tests/libcxx/expected_results.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index bd28176f13d..699e522f93b 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -328,7 +328,6 @@ std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_wit std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp:1 FAIL # DevCom-10439137 VSO-1869865: Discarded id-expression causes unnecessary reading -# Also: LLVM-79793 [libc++][test] Fix MSVC warning C4127 in array.cons/initialization.pass.cpp std/containers/sequences/array/array.cons/initialization.pass.cpp:0 FAIL std/containers/sequences/array/array.cons/initialization.pass.cpp:1 FAIL From 4e73121d9322c13663f5d25212c6dcb5a718dfd7 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 31 May 2024 09:34:51 -0700 Subject: [PATCH 24/25] LLVM-84222 removed variant coverage. --- tests/std/tests/P0088R3_variant/test.cpp | 652 ----------------------- 1 file changed, 652 deletions(-) diff --git a/tests/std/tests/P0088R3_variant/test.cpp b/tests/std/tests/P0088R3_variant/test.cpp index 837304f5a14..3bb727d43d2 100644 --- a/tests/std/tests/P0088R3_variant/test.cpp +++ b/tests/std/tests/P0088R3_variant/test.cpp @@ -140,30 +140,6 @@ void test_const_get_if() { static_assert(*std::get_if<1>(&v) == 42, ""); static_assert(std::get_if<0>(&v) == nullptr, ""); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), int *); - assert(std::get_if<0>(&v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), int *); - assert(std::get_if<0>(&v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), const int *); - assert(std::get_if<0>(&v) == &x); - } -#endif } void test_get_if() { @@ -187,37 +163,6 @@ void test_get_if() { assert(*std::get_if<1>(&v) == 42); assert(std::get_if<0>(&v) == nullptr); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), int *); - assert(std::get_if<0>(&v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), const int *); - assert(std::get_if<0>(&v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), int *); - assert(std::get_if<0>(&v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if<0>(&v)), const int *); - assert(std::get_if<0>(&v) == &x); - } -#endif } int run_test() { @@ -274,30 +219,6 @@ void test_const_get_if() { static_assert(*std::get_if(&v) == 42, ""); static_assert(std::get_if(&v) == nullptr, ""); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), int *); - assert(std::get_if(&v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), int *); - assert(std::get_if(&v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), const int *); - assert(std::get_if(&v) == &x); - } -#endif } void test_get_if() { @@ -321,37 +242,6 @@ void test_get_if() { assert(*std::get_if(&v) == 42); assert(std::get_if(&v) == nullptr); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), int *); - assert(std::get_if(&v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), const int *); - assert(std::get_if(&v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), int *); - assert(std::get_if(&v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get_if(&v)), const int *); - assert(std::get_if(&v) == &x); - } -#endif } int run_test() { @@ -436,30 +326,6 @@ void test_const_lvalue_get() { ASSERT_SAME_TYPE(decltype(std::get<1>(v)), const long &); assert(std::get<1>(v) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), int &); - assert(&std::get<0>(v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), int &); - assert(&std::get<0>(v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &); - assert(&std::get<0>(v) == &x); - } -#endif } void test_lvalue_get() { @@ -476,37 +342,6 @@ void test_lvalue_get() { ASSERT_SAME_TYPE(decltype(std::get<1>(v)), const long &); assert(std::get<1>(v) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), int &); - assert(&std::get<0>(v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &); - assert(&std::get<0>(v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), int &); - assert(&std::get<0>(v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(v)), const int &); - assert(&std::get<0>(v) == &x); - } -#endif } void test_rvalue_get() { @@ -523,39 +358,6 @@ void test_rvalue_get() { ASSERT_SAME_TYPE(decltype(std::get<1>(std::move(v))), const long &&); assert(std::get<1>(std::move(v)) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), int &); - assert(&std::get<0>(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), const int &); - assert(&std::get<0>(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), int &&); - int &&xref = std::get<0>(std::move(v)); - assert(&xref == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), const int &&); - const int &&xref = std::get<0>(std::move(v)); - assert(&xref == &x); - } -#endif } void test_const_rvalue_get() { @@ -572,39 +374,6 @@ void test_const_rvalue_get() { ASSERT_SAME_TYPE(decltype(std::get<1>(std::move(v))), const long &&); assert(std::get<1>(std::move(v)) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), int &); - assert(&std::get<0>(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), const int &); - assert(&std::get<0>(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), int &&); - int &&xref = std::get<0>(std::move(v)); - assert(&xref == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get<0>(std::move(v))), const int &&); - const int &&xref = std::get<0>(std::move(v)); - assert(&xref == &x); - } -#endif } template using Idx = std::integral_constant; @@ -728,30 +497,6 @@ void test_const_lvalue_get() { ASSERT_SAME_TYPE(decltype(std::get(v)), const long &); assert(std::get(v) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get(v)), int &); - assert(&std::get(v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(v)), int &); - assert(&std::get(v) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(v)), const int &); - assert(&std::get(v) == &x); - } -#endif } void test_lvalue_get() { @@ -768,37 +513,6 @@ void test_lvalue_get() { ASSERT_SAME_TYPE(decltype(std::get(v)), const long &); assert(std::get(v) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get(v)), int &); - assert(&std::get(v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get(v)), const int &); - assert(&std::get(v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(v)), int &); - assert(&std::get(v) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(v)), const int &); - assert(&std::get(v) == &x); - } -#endif } void test_rvalue_get() { @@ -816,41 +530,6 @@ void test_rvalue_get() { const long &&); assert(std::get(std::move(v)) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), int &); - assert(&std::get(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - V v(x); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), - const int &); - assert(&std::get(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), int &&); - int &&xref = std::get(std::move(v)); - assert(&xref == &x); - } - { - using V = std::variant; - int x = 42; - V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), - const int &&); - const int &&xref = std::get(std::move(v)); - assert(&xref == &x); - } -#endif } void test_const_rvalue_get() { @@ -868,41 +547,6 @@ void test_const_rvalue_get() { const long &&); assert(std::get(std::move(v)) == 42); } -// TODO: Remove these once reference support is reinstated -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), int &); - assert(&std::get(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(x); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), - const int &); - assert(&std::get(std::move(v)) == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), int &&); - int &&xref = std::get(std::move(v)); - assert(&xref == &x); - } - { - using V = std::variant; - int x = 42; - const V v(std::move(x)); - ASSERT_SAME_TYPE(decltype(std::get(std::move(v))), - const int &&); - const int &&xref = std::get(std::move(v)); - assert(&xref == &x); - } -#endif } template struct identity { using type = Tp; }; @@ -1265,16 +909,6 @@ int run_test() { test(); test(); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - test(); - test(); - test(); - test(); - test(); - } -#endif return 0; } @@ -3070,16 +2704,6 @@ void test_T_assignment_sfinae() { static_assert(std::is_assignable::value, "regression on user-defined conversions in operator="); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - static_assert(!std::is_assignable::value, "ambiguous"); - } - { - using V = std::variant; - static_assert(!std::is_assignable::value, "ambiguous"); - } -#endif // TEST_VARIANT_HAS_NO_REFERENCES } void test_T_assignment_basic() { @@ -3135,25 +2759,6 @@ void test_T_assignment_basic() { assert(v.index() == 0); assert(std::get<0>(v)); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - int x = 42; - V v(43l); - v = x; - assert(v.index() == 0); - assert(&std::get<0>(v) == &x); - v = std::move(x); - assert(v.index() == 1); - assert(&std::get<1>(v) == &x); - // 'long' is selected by FUN(const int &) since 'const int &' cannot bind - // to 'int&'. - const int &cx = x; - v = cx; - assert(v.index() == 2); - assert(std::get<2>(v) == 42); - } -#endif // TEST_VARIANT_HAS_NO_REFERENCES } void test_T_assignment_performs_construction() { @@ -3612,12 +3217,6 @@ void test_default_ctor_sfinae() { using V = std::variant; static_assert(!std::is_default_constructible::value, ""); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - static_assert(!std::is_default_constructible::value, ""); - } -#endif } void test_default_ctor_noexcept() { @@ -4599,16 +4198,6 @@ void test_T_ctor_sfinae() { -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - static_assert(!std::is_constructible::value, "ambiguous"); - } - { - using V = std::variant; - static_assert(!std::is_constructible::value, "ambiguous"); - } -#endif } void test_T_ctor_basic() { @@ -4656,24 +4245,6 @@ void test_T_ctor_basic() { std::variant, AnyConstructible> v2 = x; assert(v2.index() == 1); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - static_assert(std::is_convertible::value, "must be implicit"); - int x = 42; - V v(x); - assert(v.index() == 0); - assert(&std::get<0>(v) == &x); - } - { - using V = std::variant; - static_assert(std::is_convertible::value, "must be implicit"); - int x = 42; - V v(std::move(x)); - assert(v.index() == 1); - assert(&std::get<1>(v) == &x); - } -#endif } #if !_HAS_CXX20 // Narrowing check occurs with P0608R3 @@ -4853,29 +4424,6 @@ void test_emplace_sfinae() { static_assert(emplace_exists(), ""); static_assert(!emplace_exists(), "cannot construct"); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), "too many args"); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), "cannot default construct ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), - "not constructible from void*"); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "no ctors"); - } -#endif } void test_basic() { @@ -4911,41 +4459,6 @@ void test_basic() { assert(std::get<4>(v) == "aaa"); assert(&ref3 == &std::get<4>(v)); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - const int x = 100; - int y = 42; - int z = 43; - V v(std::in_place_index<0>, -1); - // default emplace a value - auto& ref1 = v.emplace<1>(); - static_assert(std::is_same_v, ""); - assert(std::get<1>(v) == 0); - assert(&ref1 == &std::get<1>(v)); - // emplace a reference - auto& ref2 = v.emplace<2>(x); - static_assert(std::is_same_v<&, decltype(ref)>, ""); - assert(&std::get<2>(v) == &x); - assert(&ref2 == &std::get<2>(v)); - // emplace an rvalue reference - auto& ref3 = v.emplace<3>(std::move(y)); - static_assert(std::is_same_v<&, decltype(ref)>, ""); - assert(&std::get<3>(v) == &y); - assert(&ref3 == &std::get<3>(v)); - // re-emplace a new reference over the active member - auto& ref4 = v.emplace<3>(std::move(z)); - static_assert(std::is_same_v<&, decltype(ref)>, ""); - assert(&std::get<3>(v) == &z); - assert(&ref4 == &std::get<3>(v)); - // emplace with multiple args - auto& ref5 = v.emplace<5>(3u, 'a'); - static_assert(std::is_same_v, ""); - assert(std::get<5>(v) == "aaa"); - assert(&ref5 == &std::get<5>(v)); - } -#endif } int run_test() { @@ -5113,30 +4626,6 @@ void test_emplace_sfinae() { static_assert(emplace_exists(), ""); static_assert(!emplace_exists(), "cannot construct"); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - using V = std::variant; - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), "too many args"); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), "cannot default construct ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), - "not constructible from void*"); - static_assert(emplace_exists(), ""); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "cannot bind ref"); - static_assert(!emplace_exists(), "ambiguous"); - static_assert(!emplace_exists(), - "cannot construct void"); -#endif } void test_basic() { @@ -5172,41 +4661,6 @@ void test_basic() { assert(std::get<4>(v) == "aaa"); assert(&ref3 == &std::get<4>(v)); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { - using V = std::variant; - const int x = 100; - int y = 42; - int z = 43; - V v(std::in_place_index<0>, -1); - // default emplace a value - auto& ref1 = v.emplace(); - static_assert(std::is_same_v, ""); - assert(std::get(v) == 0); - assert(&ref1 == &std::get(v)); - // emplace a reference - auto& ref2 = v.emplace(x); - static_assert(std::is_same_v, ""); - assert(&std::get(v) == &x); - assert(&ref2 == &std::get(v)); - // emplace an rvalue reference - auto& ref3 = v.emplace(std::move(y)); - static_assert(std::is_same_v, ""); - assert(&std::get(v) == &y); - assert(&ref3 == &std::get(v)); - // re-emplace a new reference over the active member - auto& ref4 = v.emplace(std::move(z)); - static_assert(std::is_same_v, ""); - assert(&std::get(v) == &z); - assert(&ref4 == &std::get(v)); - // emplace with multiple args - auto& ref5 = v.emplace(3u, 'a'); - static_assert(std::is_same_v, ""); - assert(std::get(v) == "aaa"); - assert(&ref5 == &std::get(v)); - } -#endif } int run_test() { @@ -6208,36 +5662,6 @@ void test_argument_forwarding() { std::visit(obj, std::move(cv)); assert(Fn::check_call(Val)); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { // single argument - lvalue reference - using V = std::variant; - int x = 42; - V v(x); - const V &cv = v; - std::visit(obj, v); - assert(Fn::check_call(Val)); - std::visit(obj, cv); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(v)); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(cv)); - assert(Fn::check_call(Val)); - } - { // single argument - rvalue reference - using V = std::variant; - int x = 42; - V v(std::move(x)); - const V &cv = v; - std::visit(obj, v); - assert(Fn::check_call(Val)); - std::visit(obj, cv); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(v)); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(cv)); - assert(Fn::check_call(Val)); - } -#endif { // multi argument - multi variant using V = std::variant; V v1(42), v2("hello"), v3(43l); @@ -6659,36 +6083,6 @@ void test_argument_forwarding() { std::visit(obj, std::move(cv)); assert(Fn::check_call(Val)); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { // single argument - lvalue reference - using V = std::variant; - int x = 42; - V v(x); - const V &cv = v; - std::visit(obj, v); - assert(Fn::check_call(Val)); - std::visit(obj, cv); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(v)); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(cv)); - assert(Fn::check_call(Val)); - } - { // single argument - rvalue reference - using V = std::variant; - int x = 42; - V v(std::move(x)); - const V &cv = v; - std::visit(obj, v); - assert(Fn::check_call(Val)); - std::visit(obj, cv); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(v)); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(cv)); - assert(Fn::check_call(Val)); - } -#endif { // multi argument - multi variant using V = std::variant; V v1(42), v2("hello"), v3(43l); @@ -7446,52 +6840,6 @@ namespace msvc { std::visit(obj, std::move(cv)); assert(Fn::check_call(Val)); } -#if !defined(TEST_VARIANT_HAS_NO_REFERENCES) - { // single argument - lvalue reference - using V = std::variant; - int x = 42; - V v(x); - const V& cv = v; - std::visit(obj, v); - assert(Fn::check_call(Val)); - std::visit(obj, cv); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(v)); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(cv)); - assert(Fn::check_call(Val)); - } - { // single argument - rvalue reference - using V = std::variant; - int x = 42; - V v(std::move(x)); - const V& cv = v; - std::visit(obj, v); - assert(Fn::check_call(Val)); - std::visit(obj, cv); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(v)); - assert(Fn::check_call(Val)); - std::visit(obj, std::move(cv)); - assert(Fn::check_call(Val)); - } - { // multi argument - multi variant - using S = const std::string&; - using V = std::variant; - const std::string str = "hello"; - long l = 43; - V v1(42); - const V& cv1 = v1; - V v2(str); - const V& cv2 = v2; - V v3(std::move(l)); - const V& cv3 = v3; - std::visit(obj, v1, v2, v3); - assert((Fn::check_call(Val))); - std::visit(obj, cv1, cv2, std::move(v3)); - assert((Fn::check_call(Val))); - } -#endif } struct ReturnFirst { From 629fd7c3075428343d29d6102e3303eb9b517fff Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 31 May 2024 09:55:06 -0700 Subject: [PATCH 25/25] LLVM-83928 removed VariantAllowsNarrowingConversions. --- tests/std/tests/P0088R3_variant/test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/std/tests/P0088R3_variant/test.cpp b/tests/std/tests/P0088R3_variant/test.cpp index 3bb727d43d2..a15cad4e143 100644 --- a/tests/std/tests/P0088R3_variant/test.cpp +++ b/tests/std/tests/P0088R3_variant/test.cpp @@ -1394,12 +1394,12 @@ int run_test() static_assert(!std::is_assignable, int>::value, ""); static_assert(!std::is_assignable, int>::value, ""); #if _HAS_CXX20 - static_assert(std::is_assignable, int>::value == VariantAllowsNarrowingConversions, ""); + static_assert(std::is_assignable, int>::value == false, ""); static_assert(std::is_assignable, int>::value - == VariantAllowsNarrowingConversions, ""); + == false, ""); static_assert(std::is_assignable, int>::value - == VariantAllowsNarrowingConversions, ""); + == false, ""); static_assert(!std::is_assignable, int>::value, ""); static_assert(!std::is_assignable, decltype("meow")>::value, ""); @@ -2676,7 +2676,7 @@ void test_T_assignment_sfinae() { #if _HAS_CXX20 { using V = std::variant; - static_assert(std::is_assignable::value == VariantAllowsNarrowingConversions, + static_assert(std::is_assignable::value == false, "no matching operator="); } { @@ -2867,12 +2867,12 @@ int run_test() static_assert(!std::is_constructible, int>::value, ""); static_assert(!std::is_constructible, int>::value, ""); #if _HAS_CXX20 - static_assert(std::is_constructible, int>::value == VariantAllowsNarrowingConversions, ""); + static_assert(std::is_constructible, int>::value == false, ""); static_assert(std::is_constructible, int>::value - == VariantAllowsNarrowingConversions, ""); + == false, ""); static_assert(std::is_constructible, int>::value - == VariantAllowsNarrowingConversions, ""); + == false, ""); static_assert(!std::is_constructible, int>::value, ""); static_assert(!std::is_constructible, decltype("meow")>::value, ""); @@ -4159,7 +4159,7 @@ void test_T_ctor_sfinae() { #if _HAS_CXX20 { using V = std::variant; - static_assert(std::is_constructible::value == VariantAllowsNarrowingConversions, + static_assert(std::is_constructible::value == false, "no matching constructor"); } {