diff --git a/stl/inc/__msvc_formatter.hpp b/stl/inc/__msvc_formatter.hpp index ed9d1071ad..b8ff37b0d2 100644 --- a/stl/inc/__msvc_formatter.hpp +++ b/stl/inc/__msvc_formatter.hpp @@ -129,8 +129,6 @@ class basic_format_parse_context; template concept _Format_supported_charT = _Is_any_of_v<_CharT, char, wchar_t>; -// Generic formatter definition, the deleted default constructor -// makes it "disabled" as per N4950 [format.formatter.spec]/5 _EXPORT_STD template struct formatter { formatter() = delete; diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 849419c527..7cd56d4b1c 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -130,7 +130,7 @@ std/language.support/support.limits/support.limits.general/mdspan.version.compil std/language.support/support.limits/support.limits.general/cstring.version.compile.pass.cpp FAIL # Various bogosity (LLVM-D141004), warning C6011: Dereferencing NULL pointer -# Note: The :1 (ASAN) configuration doesn't run static analysis. +# Note: The :1 (ASan) configuration doesn't run static analysis. std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp:0 FAIL std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_values.pass.cpp:0 FAIL @@ -224,7 +224,7 @@ std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pa std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp:1 SKIPPED std/input.output/syncstream/osyncstream/thread/several_threads.pass.cpp:1 SKIPPED -# VSO-2164191 "[ASAN][STL] Interception breaks strtoll" +# VSO-2164191 "[ASan][STL] Interception breaks strtoll" std/strings/string.conversions/stoll.pass.cpp:1 FAIL @@ -285,7 +285,7 @@ std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp:0 FAIL std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp:1 FAIL # VSO-1271673 "static analyzer doesn't know about short-circuiting" -# Note: The :1 (ASAN) configuration doesn't run static analysis. +# Note: The :1 (ASan) configuration doesn't run static analysis. std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp:0 FAIL std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp:0 FAIL @@ -315,7 +315,7 @@ std/algorithms/robust_re_difference_type.compile.pass.cpp:1 FAIL # DevCom-1638563 VSO-1457836: icky static analysis false positive # Resolved wontfix, need to report again. -# Note: The :1 (ASAN) configuration doesn't run static analysis. +# Note: The :1 (ASan) configuration doesn't run static analysis. std/language.support/support.coroutines/end.to.end/go.pass.cpp:0 FAIL # DevCom-1638496 VSO-1462745: C1XX doesn't properly reject int <=> unsigned @@ -468,7 +468,7 @@ std/input.output/syncstream/syncbuf/syncstream.syncbuf.members/emit.pass.cpp FAI # *** VCRUNTIME BUGS *** # DevCom-10373274 VSO-1824997 "vcruntime nothrow array operator new falls back on the wrong function" -# This passes for the :1 (ASAN) configuration, surprisingly. +# This passes for the :1 (ASan) configuration, surprisingly. std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp:0 FAIL std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp:2 FAIL @@ -576,15 +576,17 @@ std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.c # 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 -# contiguous_iterator requires to_address() which calls operator->(), but this bogus test uses an iterator that lacks operator->(). +# libc++ speculatively implements the proposed resolution for LWG-4058. std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.compile.pass.cpp FAIL - -# Bogus test expects to_address() to SFINAE away for int. std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp FAIL # We disagree about whether various chrono types should be optimized, and the test is clearly wrong about vector::reference. std/utilities/format/format.formatter/format.formatter.locking/enable_nonlocking_formatter_optimization.compile.pass.cpp FAIL +# `increasing_allocator` calls `std::allocator::deallocate` with the wrong size +std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp FAIL +std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp FAIL + # *** LIKELY STL BUGS *** # Not analyzed, likely STL bugs. Various assertions. @@ -967,7 +969,7 @@ std/utilities/format/format.tuple/format.pass.cpp FAIL # Not analyzed. Static analysis thinks that array indexing is out of bounds because it can't prove otherwise. # warning C28020: The expression '_Param_(1)<1' is not true at this call. -# Note: The :1 (ASAN) configuration doesn't run static analysis. +# Note: The :1 (ASan) configuration doesn't run static analysis. std/containers/views/mdspan/extents/ctor_default.pass.cpp:0 FAIL std/containers/views/mdspan/extents/ctor_from_array.pass.cpp:0 FAIL std/containers/views/mdspan/extents/ctor_from_integral.pass.cpp:0 FAIL @@ -980,7 +982,7 @@ std/containers/views/mdspan/mdspan/ctor.dh_span.pass.cpp:0 FAIL # Not analyzed. Apparent false positives from static analysis where it thinks `new (std::nothrow)` could return null, despite an assert(). # warning C28182: Dereferencing NULL pointer. -# Note: The :1 (ASAN) configuration doesn't run static analysis. +# Note: The :1 (ASan) configuration doesn't run static analysis. std/language.support/support.dynamic/new.delete/new.delete.array/new.size_align_nothrow.pass.cpp:0 FAIL std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.pass.cpp:0 FAIL @@ -1221,12 +1223,6 @@ std/time/time.zone/time.zone.zonedtime/time.zone.zonedtime.nonmembers/ostream.pa # Not analyzed. static_assert(testComplexity()) is failing. std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_complexity.pass.cpp FAIL -# Not analyzed. -# MSVC constexpr error: failure was caused by unexpected deallocation count -# Clang assertion: _CrtIsValidHeapPointer(block) -std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp FAIL -std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp FAIL - # Not analyzed. # MSVC truncation warnings. # Clang assertion: std::hermite(n, +inf) == inf @@ -1239,7 +1235,7 @@ std/containers/views/views.span/span.cons/copy.pass.cpp FAIL std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_ctor.compile.pass.cpp FAIL -# *** XFAILs WHICH PASS *** +# *** XFAILS WHICH PASS *** # These tests contain `// XFAIL: msvc` comments, which accurately describe runtime failures for x86 and x64. # However, for ARM and ARM64, they successfully compile, then we don't run them. # Our test harness properly handles the ambiguity of whether a FAIL line in this file means "fails to compile" @@ -1250,7 +1246,7 @@ std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_c # In the meantime, because this is platform-dependent and we don't have a way to express that in this file, # we need to mark these tests as SKIPPED. # Finally, note that only :0 (MSVC) and :2 (Clang) configurations are mentioned here, -# because we don't run :1 (ASAN) for ARM and ARM64. +# because we don't run :1 (ASan) for ARM and ARM64. std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/ostream.pass.cpp:0 SKIPPED std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/ostream.pass.cpp:2 SKIPPED std/time/time.clock/time.clock.system/sys_date.ostream.pass.cpp:0 SKIPPED diff --git a/tests/std/tests/GH_000431_lex_compare_memcmp_classify/env.lst b/tests/std/tests/GH_000431_lex_compare_memcmp_classify/env.lst index 00256420b8..a414ee43bd 100644 --- a/tests/std/tests/GH_000431_lex_compare_memcmp_classify/env.lst +++ b/tests/std/tests/GH_000431_lex_compare_memcmp_classify/env.lst @@ -3,5 +3,7 @@ RUNALL_INCLUDE ..\char8_t_matrix.lst RUNALL_CROSSLIST -* PM_CL="" # Test manual vectorization -* PM_CL="/D_USE_STD_VECTOR_ALGORITHMS=0" # Test memcmp optimization +# Test manual vectorization: +* PM_CL="" +# Test memcmp optimization: +* PM_CL="/D_USE_STD_VECTOR_ALGORITHMS=0" diff --git a/tests/std/tests/GH_003663_cast_contiguous_iterator_difference_type/test.compile.pass.cpp b/tests/std/tests/GH_003663_cast_contiguous_iterator_difference_type/test.compile.pass.cpp index bc6547f0fe..29f60abbac 100644 --- a/tests/std/tests/GH_003663_cast_contiguous_iterator_difference_type/test.compile.pass.cpp +++ b/tests/std/tests/GH_003663_cast_contiguous_iterator_difference_type/test.compile.pass.cpp @@ -8,22 +8,22 @@ class ContiguousIterator { public: using value_type = int; using difference_type = int; - using element_type = int; using iterator_category = std::contiguous_iterator_tag; - int* operator->() const; - int& operator*() const; - int& operator[](int) const; + + value_type* operator->() const; + value_type& operator*() const; + value_type& operator[](difference_type) const; ContiguousIterator& operator++(); ContiguousIterator operator++(int); ContiguousIterator& operator--(); ContiguousIterator operator--(int); - ContiguousIterator& operator+=(int); - ContiguousIterator& operator-=(int); + ContiguousIterator& operator+=(difference_type); + ContiguousIterator& operator-=(difference_type); friend auto operator<=>(ContiguousIterator, ContiguousIterator) = default; - friend int operator-(ContiguousIterator, ContiguousIterator); - friend ContiguousIterator operator+(ContiguousIterator, int); - friend ContiguousIterator operator-(ContiguousIterator, int); - friend ContiguousIterator operator+(int, ContiguousIterator); + friend difference_type operator-(ContiguousIterator, ContiguousIterator); + friend ContiguousIterator operator+(ContiguousIterator, difference_type); + friend ContiguousIterator operator-(ContiguousIterator, difference_type); + friend ContiguousIterator operator+(difference_type, ContiguousIterator); }; static_assert(std::contiguous_iterator); diff --git a/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp b/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp index d57da73328..6fdf75de28 100644 --- a/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp +++ b/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp @@ -162,7 +162,7 @@ struct mappish_instantiator { assert(c6.get_allocator().state == 13); assert(ranges::is_permutation(c6, expected, any_pair_eq)); } -#endif +#endif // ^^^ no workaround ^^^ { std::same_as auto c7 = R{some_pairs} | ranges::to(Alloc{13}); assert(c7.get_allocator().state == 13); diff --git a/tests/std/tests/P1206R7_ranges_to_misc/test.cpp b/tests/std/tests/P1206R7_ranges_to_misc/test.cpp index 25df9eb68f..956dbbdc99 100644 --- a/tests/std/tests/P1206R7_ranges_to_misc/test.cpp +++ b/tests/std/tests/P1206R7_ranges_to_misc/test.cpp @@ -62,7 +62,7 @@ constexpr bool test_reservable() { assert(r.cap_ == ranges::size(some_ints)); assert(r.reserved_ == ranges::size(some_ints)); } -#endif +#endif // ^^^ no workaround ^^^ return true; } @@ -100,7 +100,7 @@ constexpr bool test_common_constructible() { assert(c1.last_ == ranges::end(some_ints)); assert(c1.args_ == 3); } -#endif +#endif // ^^^ no workaround ^^^ // Verify that more than one argument can be passed after the range: { @@ -116,7 +116,7 @@ constexpr bool test_common_constructible() { assert(c3.last_ == ranges::end(some_ints)); assert(c3.args_ == 4); } -#endif +#endif // ^^^ no workaround ^^^ return true; } @@ -315,7 +315,7 @@ constexpr void test_lwg4016_per_kind() { std::same_as auto vec = std::views::empty | ranges::to(std::size_t{42}, std::allocator{}); assert(ranges::equal(vec, std::views::repeat(0, 42))); } -#endif +#endif // ^^^ no workaround ^^^ { std::same_as auto vec = ranges::to(std::views::iota(0, 42), std::initializer_list{-3, -2, -1}); assert(ranges::equal(vec, std::views::iota(-3, 42))); diff --git a/tests/std/tests/P1206R7_ranges_to_sequence/test.cpp b/tests/std/tests/P1206R7_ranges_to_sequence/test.cpp index b4c3810aec..acb190e9c0 100644 --- a/tests/std/tests/P1206R7_ranges_to_sequence/test.cpp +++ b/tests/std/tests/P1206R7_ranges_to_sequence/test.cpp @@ -151,7 +151,7 @@ struct sequence_instantiator { assert(c6.get_allocator().state == 13); assert(ranges::equal(c6, meow)); } -#endif +#endif // ^^^ no workaround ^^^ { std::same_as auto c7 = R{meow} | ranges::to(Alloc{13}); assert(c7.get_allocator().state == 13); diff --git a/tests/std/tests/P1206R7_ranges_to_settish/test.cpp b/tests/std/tests/P1206R7_ranges_to_settish/test.cpp index 678e2981bf..71c733e486 100644 --- a/tests/std/tests/P1206R7_ranges_to_settish/test.cpp +++ b/tests/std/tests/P1206R7_ranges_to_settish/test.cpp @@ -156,7 +156,7 @@ struct settish_instantiator { assert(c6.get_allocator().state == 13); assert(ranges::is_permutation(c6, expected)); } -#endif +#endif // ^^^ no workaround ^^^ { std::same_as auto c7 = R{some_ints} | ranges::to(Alloc{13}); assert(c7.get_allocator().state == 13); diff --git a/tests/std/tests/P2136R3_invoke_r/test.cpp b/tests/std/tests/P2136R3_invoke_r/test.cpp index c08da1afd3..4da180d46a 100644 --- a/tests/std/tests/P2136R3_invoke_r/test.cpp +++ b/tests/std/tests/P2136R3_invoke_r/test.cpp @@ -6,8 +6,6 @@ #include #include -#include - using namespace std; constexpr int square(int n) { diff --git a/tests/std/tests/VSO_0000000_vector_algorithms/env.lst b/tests/std/tests/VSO_0000000_vector_algorithms/env.lst index 7837a2e328..78fbe6b49a 100644 --- a/tests/std/tests/VSO_0000000_vector_algorithms/env.lst +++ b/tests/std/tests/VSO_0000000_vector_algorithms/env.lst @@ -3,5 +3,5 @@ RUNALL_INCLUDE ..\usual_matrix.lst RUNALL_CROSSLIST -* PM_CL="" # Test default setting -* PM_CL="/D_USE_STD_VECTOR_ALGORITHMS=0" # Test escape hatch, see GH-1751 +* PM_CL="" +* PM_CL="/D_USE_STD_VECTOR_ALGORITHMS=0" diff --git a/tests/std/tests/VSO_0000000_vector_algorithms_floats/env.lst b/tests/std/tests/VSO_0000000_vector_algorithms_floats/env.lst index b2af3deb67..089442601d 100644 --- a/tests/std/tests/VSO_0000000_vector_algorithms_floats/env.lst +++ b/tests/std/tests/VSO_0000000_vector_algorithms_floats/env.lst @@ -54,5 +54,5 @@ RUNALL_CROSSLIST * PM_CL="/fp:precise" * PM_CL="/fp:fast" RUNALL_CROSSLIST -* PM_CL="" # Test default setting -* PM_CL="/D_USE_STD_VECTOR_ALGORITHMS=0" # Test escape hatch, see GH-1751 +* PM_CL="" +* PM_CL="/D_USE_STD_VECTOR_ALGORITHMS=0" diff --git a/tools/format/CMakeLists.txt b/tools/format/CMakeLists.txt index 08ba8066af..8bc88ffb45 100644 --- a/tools/format/CMakeLists.txt +++ b/tools/format/CMakeLists.txt @@ -20,11 +20,11 @@ execute_process( if(clang_format_version MATCHES "clang-format version ([0-9]+\.[0-9]+\.[0-9]+)") set(expected_version "17.0.3") if(CMAKE_MATCH_1 VERSION_LESS expected_version) - message(FATAL_ERROR "Found clang-format ${CMAKE_MATCH_1}, older than expected ${expected_version}.") + message(FATAL_ERROR "Found clang-format: ${CLANG_FORMAT} (\"${CMAKE_MATCH_1}\", older than expected version \"${expected_version}\")") elseif(CMAKE_MATCH_1 VERSION_EQUAL expected_version) - message(STATUS "Found clang-format ${CMAKE_MATCH_1}.") + message(STATUS "Found clang-format: ${CLANG_FORMAT} (found expected version \"${CMAKE_MATCH_1}\")") elseif(CMAKE_MATCH_1 VERSION_GREATER expected_version) - message(WARNING "Found clang-format ${CMAKE_MATCH_1}, newer than expected ${expected_version}.") + message(WARNING "Found clang-format: ${CLANG_FORMAT} (\"${CMAKE_MATCH_1}\", newer than expected version \"${expected_version}\")") endif() else() message(FATAL_ERROR "Unexpected `clang-format --version` output: '${clang_format_version}'")