diff --git a/tests/std/include/test_format_support.hpp b/tests/std/include/test_format_support.hpp index 60ee59410c..8c8b27d002 100644 --- a/tests/std/include/test_format_support.hpp +++ b/tests/std/include/test_format_support.hpp @@ -70,7 +70,7 @@ template struct testing_callbacks { std::_Fmt_align expected_alignment = std::_Fmt_align::_None; std::_Fmt_sign expected_sign = std::_Fmt_sign::_None; - std::basic_string_view expected_fill; + std::basic_string_view expected_fill{}; int expected_width = -1; std::size_t expected_dynamic_width = static_cast(-1); bool expected_auto_dynamic_width = false; diff --git a/tests/std/tests/GH_000431_equal_family/test.cpp b/tests/std/tests/GH_000431_equal_family/test.cpp index 00c835d9ad..21a952bae2 100644 --- a/tests/std/tests/GH_000431_equal_family/test.cpp +++ b/tests/std/tests/GH_000431_equal_family/test.cpp @@ -244,7 +244,11 @@ void test_algorithms(EqualFn equal_fn) { assert(equal_fn(begin(arr2), end(arr2), begin(arr3), end(arr3), equal_to{})); assert(equal_fn(begin(arr2), end(arr2), begin(arr3), end(arr3), equal_to{})); +#if !_HAS_CXX23 + // The return type of equal_to::operator()(T, U) SFINAEs + // when T and U are different enumeration types. assert(equal_fn(begin(arr3), end(arr3), begin(arr4), end(arr4), equal_to<>{})); +#endif // !_HAS_CXX23 assert(equal_fn(begin(arr3), end(arr3), begin(arr4), end(arr4), equal_to{})); assert(equal_fn(begin(arr3), end(arr3), begin(arr4), end(arr4), equal_to{})); } diff --git a/tests/std/tests/GH_000935_complex_numerical_accuracy/test.cpp b/tests/std/tests/GH_000935_complex_numerical_accuracy/test.cpp index 3f3fa66186..8b4ddaedc5 100644 --- a/tests/std/tests/GH_000935_complex_numerical_accuracy/test.cpp +++ b/tests/std/tests/GH_000935_complex_numerical_accuracy/test.cpp @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wnan-infinity-disabled" +#endif // __clang__ + #include #include #include diff --git a/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp b/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp index 6b441e01ab..86734f6e86 100644 --- a/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp +++ b/tests/std/tests/P0355R7_calendars_and_time_zones_formatting/test.cpp @@ -46,7 +46,7 @@ template template struct testing_callbacks { _Fmt_align expected_alignment = _Fmt_align::_None; - basic_string_view expected_fill; + basic_string_view expected_fill{}; int expected_width = -1; size_t expected_dynamic_width = static_cast(-1); bool expected_auto_dynamic_width = false; diff --git a/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp b/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp index f19b3abb29..70f50d2d7f 100644 --- a/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp +++ b/tests/std/tests/P0896R4_ranges_iterator_machinery/test.cpp @@ -1943,15 +1943,15 @@ namespace iter_ops { std::random_access_iterator_tag; struct trace { - unsigned int compares_; - unsigned int differences_; - unsigned int increments_; - unsigned int decrements_; - unsigned int assignments_; - unsigned int seeks_; - unsigned int sizes_; - unsigned int begins_; - unsigned int ends_; + unsigned int compares_ = 0; + unsigned int differences_ = 0; + unsigned int increments_ = 0; + unsigned int decrements_ = 0; + unsigned int assignments_ = 0; + unsigned int seeks_ = 0; + unsigned int sizes_ = 0; + unsigned int begins_ = 0; + unsigned int ends_ = 0; bool operator==(trace const&) const = default; }; diff --git a/tests/std/tests/P2093R14_formatted_output/test.cpp b/tests/std/tests/P2093R14_formatted_output/test.cpp index 92eb088494..43e493c6f5 100644 --- a/tests/std/tests/P2093R14_formatted_output/test.cpp +++ b/tests/std/tests/P2093R14_formatted_output/test.cpp @@ -153,10 +153,10 @@ namespace test { public: // Construct a new semaphore in the parent process. win_semaphore() { - SECURITY_ATTRIBUTES semaphore_attributes{ - .nLength = sizeof(SECURITY_ATTRIBUTES), - .bInheritHandle = TRUE, // The child process will inherit this handle. - }; + SECURITY_ATTRIBUTES semaphore_attributes{}; + semaphore_attributes.nLength = sizeof(SECURITY_ATTRIBUTES); + semaphore_attributes.bInheritHandle = TRUE; // The child process will inherit this handle. + m_handle = CreateSemaphoreW(&semaphore_attributes, 0, 1, nullptr); assert(m_handle != nullptr); } @@ -648,11 +648,10 @@ int main(int argc, char* argv[]) { // The entire purpose of this code is to hide the child process's console window, // to avoid rapid flickering during test runs. - STARTUPINFOW startup_info{ - .cb = sizeof(STARTUPINFOW), - .dwFlags = STARTF_USESHOWWINDOW, - .wShowWindow = SW_HIDE, - }; + STARTUPINFOW startup_info{}; + startup_info.cb = sizeof(STARTUPINFOW); + startup_info.dwFlags = STARTF_USESHOWWINDOW; + startup_info.wShowWindow = SW_HIDE; constexpr BOOL inherit_handles = TRUE; diff --git a/tests/std/tests/floating_point_model_matrix.lst b/tests/std/tests/floating_point_model_matrix.lst index 551ad81e92..cca86c70c4 100644 --- a/tests/std/tests/floating_point_model_matrix.lst +++ b/tests/std/tests/floating_point_model_matrix.lst @@ -29,6 +29,6 @@ ASAN PM_CL="/O2 /MD /permissive- -fsanitize=address /Zi" PM_LINK="/debug" PM_CL="/O2 /MT /GL" ASAN PM_CL="/O2 /MT /GL -fsanitize=address /Zi" PM_LINK="/debug" # TRANSITION, -Wno-unused-command-line-argument is needed for the internal test harness -PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-overriding-t-option /Od /MTd" -PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-overriding-t-option /O2 /MT" -PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-overriding-t-option /O2 /MD /Oi-" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wno-overriding-t-option -Wno-overriding-option /Od /MTd" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wno-overriding-t-option -Wno-overriding-option /O2 /MT" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wno-overriding-t-option -Wno-overriding-option /O2 /MD /Oi-"