From 46f65fec840799fa686325e5a57d32d5d24baf58 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 6 Jul 2023 02:28:29 -0700 Subject: [PATCH 01/24] [verified internally] Remove workarounds for VSO-1664463. --- tests/std/tests/P0040R3_parallel_memory_algorithms/test.cpp | 2 -- .../P0645R10_text_formatting_legacy_text_encoding/env.lst | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/std/tests/P0040R3_parallel_memory_algorithms/test.cpp b/tests/std/tests/P0040R3_parallel_memory_algorithms/test.cpp index abeb44503a..e040f95856 100644 --- a/tests/std/tests/P0040R3_parallel_memory_algorithms/test.cpp +++ b/tests/std/tests/P0040R3_parallel_memory_algorithms/test.cpp @@ -399,7 +399,6 @@ struct test_case_uninitialized_fill_n_parallel { }; int main() { -#ifndef _M_CEE // TRANSITION, VSO-1664463 parallel_test_case(test_case_uninitialized_default_construct_parallel{}, par); parallel_test_case(test_case_uninitialized_default_construct_n_parallel{}, par); parallel_test_case(test_case_uninitialized_default_construct_trivial_parallel{}, par); @@ -446,5 +445,4 @@ int main() { parallel_test_case(test_case_uninitialized_fill_parallel{}, unseq); parallel_test_case(test_case_uninitialized_fill_n_parallel{}, unseq); #endif // _HAS_CXX20 -#endif // _M_CEE } diff --git a/tests/std/tests/P0645R10_text_formatting_legacy_text_encoding/env.lst b/tests/std/tests/P0645R10_text_formatting_legacy_text_encoding/env.lst index fee12cbc26..adb6a32616 100644 --- a/tests/std/tests/P0645R10_text_formatting_legacy_text_encoding/env.lst +++ b/tests/std/tests/P0645R10_text_formatting_legacy_text_encoding/env.lst @@ -21,9 +21,8 @@ PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /permissive- /fp:stri PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest /permissive-" PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /permissive" PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /permissive- /analyze:only /analyze:autolog-" -# TRANSITION, VSO-1664463 -# PM_CL="/clr /MD /std:c++20" -# PM_CL="/clr /MDd /std:c++20" +PM_CL="/clr /MD /std:c++20" +PM_CL="/clr /MDd /std:c++20" # PM_CL="/std:c++20 /permissive- /BE /c /EHsc /MD" # PM_CL="/std:c++latest /permissive- /BE /c /EHsc /MTd" # PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call /EHsc /std:c++20 /permissive- /MD" From 50199a26928dc9b6263897cf52b0b0f91c19f02a Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 6 Jul 2023 02:28:30 -0700 Subject: [PATCH 02/24] [verified internally] Remove workarounds for VSO-1152705. --- stl/src/StlCompareStringA.cpp | 1 - stl/src/StlLCMapStringA.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/stl/src/StlCompareStringA.cpp b/stl/src/StlCompareStringA.cpp index 281ccdec63..81eb6e41c5 100644 --- a/stl/src/StlCompareStringA.cpp +++ b/stl/src/StlCompareStringA.cpp @@ -133,7 +133,6 @@ extern "C" int __cdecl __crtCompareStringA(_In_z_ LPCWSTR LocaleName, _In_ DWORD } // allocate enough space for chars -#pragma warning(suppress : 6386) // TRANSITION, VSO-1152705 false buffer overrun report in _malloca_crt_t const __crt_scoped_stack_ptr wbuffer2(_malloca_crt_t(wchar_t, buff_size2)); if (wbuffer2.get() == nullptr) { return 0; diff --git a/stl/src/StlLCMapStringA.cpp b/stl/src/StlLCMapStringA.cpp index d176fcc415..2ddf8258b5 100644 --- a/stl/src/StlLCMapStringA.cpp +++ b/stl/src/StlLCMapStringA.cpp @@ -94,7 +94,6 @@ extern "C" int __cdecl __crtLCMapStringA(_In_opt_z_ LPCWSTR LocaleName, _In_ DWO int outbuff_size = retval; // allocate enough space for wide chars (includes null terminator if any) -#pragma warning(suppress : 6386) // TRANSITION, VSO-1152705 false buffer overrun report in _malloca_crt_t const __crt_scoped_stack_ptr outwbuffer(_malloca_crt_t(wchar_t, outbuff_size)); if (!outwbuffer) { return retval; From 946b0b97cec1ff8fdc5faa200f819caf03700e16 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 6 Jul 2023 02:28:31 -0700 Subject: [PATCH 03/24] [verified internally] Remove workaround for DevCom-10334808. --- stl/inc/memory | 5 ----- 1 file changed, 5 deletions(-) diff --git a/stl/inc/memory b/stl/inc/memory index 5ed5de5528..8cc86b2ccb 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -1879,12 +1879,7 @@ _NODISCARD bool operator==(const shared_ptr<_Ty1>& _Left, const shared_ptr<_Ty2> #if _HAS_CXX20 _EXPORT_STD template _NODISCARD strong_ordering operator<=>(const shared_ptr<_Ty1>& _Left, const shared_ptr<_Ty2>& _Right) noexcept { -#if !defined(__EDG__) && !defined(__clang__) // TRANSITION, DevCom-10334808 - using _Common_ptr_t = decltype(false ? _Left.get() : _Right.get()); - return static_cast<_Common_ptr_t>(_Left.get()) <=> static_cast<_Common_ptr_t>(_Right.get()); -#else // ^^^ workaround / no workaround vvv return _Left.get() <=> _Right.get(); -#endif // ^^^ no workaround ^^^ } #else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv template From d715d88b5031d71cdab5d40834676411a626c61c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 6 Jul 2023 02:28:30 -0700 Subject: [PATCH 04/24] [verified internally] Followup changes after GH 3497. --- tests/std/tests/P0220R1_any/test.cpp | 14 ++++++++++++++ tests/std/tests/prefix.lst | 2 +- tests/tr1/prefix.lst | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/std/tests/P0220R1_any/test.cpp b/tests/std/tests/P0220R1_any/test.cpp index cd69a914de..6d3d25e355 100644 --- a/tests/std/tests/P0220R1_any/test.cpp +++ b/tests/std/tests/P0220R1_any/test.cpp @@ -2604,6 +2604,11 @@ namespace msvc { } // namespace swap_ } // namespace modifiers +#ifdef _M_CEE // TRANSITION, VSO-1846195 +#pragma warning(push) +#pragma warning(disable : 5267) // definition of implicit copy constructor for 'X' is deprecated + // because it has a user-provided destructor +#endif // ^^^ workaround ^^^ namespace overaligned { template void test_one_alignment() { @@ -2612,6 +2617,12 @@ namespace msvc { struct aligned_type { alignas(align) unsigned char space[align]; +#ifndef _M_CEE // TRANSITION, VSO-1846195 + aligned_type() = default; + aligned_type(const aligned_type&) = default; + aligned_type& operator=(const aligned_type&) = default; +#endif // ^^^ no workaround ^^^ + ~aligned_type() noexcept { assert(reinterpret_cast(this) % align == 0); } @@ -2644,6 +2655,9 @@ namespace msvc { test_one_alignment<3>(); } } // namespace overaligned +#ifdef _M_CEE // TRANSITION, VSO-1846195 +#pragma warning(pop) +#endif // ^^^ workaround ^^^ namespace size_and_alignment { void run_test() { diff --git a/tests/std/tests/prefix.lst b/tests/std/tests/prefix.lst index bcecff6486..0489944b71 100644 --- a/tests/std/tests/prefix.lst +++ b/tests/std/tests/prefix.lst @@ -3,4 +3,4 @@ RUNALL_INCLUDE ..\..\universal_prefix.lst RUNALL_CROSSLIST -PM_CL="/FIforce_include.hpp /w14365 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" +PM_CL="/FIforce_include.hpp /w14365 /w15267 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" diff --git a/tests/tr1/prefix.lst b/tests/tr1/prefix.lst index faad49566d..03a2c4e680 100644 --- a/tests/tr1/prefix.lst +++ b/tests/tr1/prefix.lst @@ -3,4 +3,4 @@ RUNALL_INCLUDE ..\universal_prefix.lst RUNALL_CROSSLIST -PM_CL="/FIforce_include.hpp /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_CRT_SECURE_NO_WARNINGS /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" +PM_CL="/FIforce_include.hpp /w15267 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_CRT_SECURE_NO_WARNINGS /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" From 71d262398da568e16a7a612e3f86276803fb6cd3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 10 Jul 2023 09:37:09 -0700 Subject: [PATCH 05/24] Node.js 20.4.0. --- .github/workflows/update-status-chart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-status-chart.yml b/.github/workflows/update-status-chart.yml index 37e7f5db18..ec42d63e72 100644 --- a/.github/workflows/update-status-chart.yml +++ b/.github/workflows/update-status-chart.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: ">=17.8.0" + node-version: ">=20.4.0" - name: Install Packages run: | npm ci From c18821ecb38794b368cfc62eaea8b604f8671046 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 15:10:52 -0700 Subject: [PATCH 06/24] Go back to Standard_D32ds_v5. --- azure-devops/create-1es-hosted-pool.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/create-1es-hosted-pool.ps1 b/azure-devops/create-1es-hosted-pool.ps1 index a8afa4759a..232464f305 100644 --- a/azure-devops/create-1es-hosted-pool.ps1 +++ b/azure-devops/create-1es-hosted-pool.ps1 @@ -14,7 +14,7 @@ $ErrorActionPreference = 'Stop' $CurrentDate = Get-Date $Location = 'eastus' -$VMSize = 'Standard_D32ads_v5' +$VMSize = 'Standard_D32ds_v5' $ProtoVMName = 'PROTOTYPE' $ImagePublisher = 'MicrosoftWindowsServer' $ImageOffer = 'WindowsServer' From a0cabffbf7bf94f42141929dde8bf0bd5f616e6e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 15:11:07 -0700 Subject: [PATCH 07/24] PowerShell 7.3.5. --- azure-devops/provision-image.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index b97754cd95..d87f5b4749 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -91,7 +91,7 @@ if ([string]::IsNullOrEmpty($AdminUserPassword)) { $PsExecPath = Join-Path $ExtractedPsToolsPath 'PsExec64.exe' # https://github.com/PowerShell/PowerShell/releases/latest - $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.zip' + $PowerShellZipUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.5/PowerShell-7.3.5-win-x64.zip' Write-Host "Downloading: $PowerShellZipUrl" $ExtractedPowerShellPath = DownloadAndExtractZip -Url $PowerShellZipUrl $PwshPath = Join-Path $ExtractedPowerShellPath 'pwsh.exe' From 71b12318e5096fbd2ff0a5c867318e9316ba0f8d Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 15:52:44 -0700 Subject: [PATCH 08/24] New pool. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 124da209a6..4c306b0c31 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ variables: benchmarkBuildOutputLocation: 'D:\benchmark' pool: - name: 'StlBuild-2023-06-13T1913-Pool' + name: 'StlBuild-2023-07-11T1513-Pool' demands: EnableSpotVM -equals true pr: From 93f2ddcad7f1c03e2fab2389babeb61f9983c4b4 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 15:54:07 -0700 Subject: [PATCH 09/24] VS 2022 17.7 Preview 3. Contains Clang 16.0.5. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a4f9f45802..4f699bd966 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With The Visual Studio IDE -1. Install Visual Studio 2022 17.7 Preview 2 or later. +1. Install Visual Studio 2022 17.7 Preview 3 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. @@ -157,7 +157,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem # How To Build With A Native Tools Command Prompt -1. Install Visual Studio 2022 17.7 Preview 2 or later. +1. Install Visual Studio 2022 17.7 Preview 3 or later. * Select "Windows 11 SDK (10.0.22000.0)" in the VS Installer. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. From af8fe755bab50ae5595c5198d150dc8f3afef40f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:10:31 -0700 Subject: [PATCH 10/24] VSO-761321 "Failure with local type alias in if constexpr condition" was fixed at some point. --- stl/inc/xtree | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/stl/inc/xtree b/stl/inc/xtree index aec01557a7..767027093f 100644 --- a/stl/inc/xtree +++ b/stl/inc/xtree @@ -907,25 +907,18 @@ public: _Swap_val_excluding_comp(_Right); } -private: - void _Different_allocator_move_construct(_Tree&& _Right) { - // TRANSITION, VSO-761321 (inline into only caller when that is fixed) - auto&& _Alproxy = _GET_PROXY_ALLOCATOR(_Alnode, _Getal()); - const auto _Scary = _Get_scary(); - _Container_proxy_ptr<_Alty> _Proxy(_Alproxy, *_Scary); - _Tree_head_scoped_ptr<_Alnode, _Scary_val> _Sentinel(_Getal(), *_Scary); - _Copy<_Strategy::_Move>(_Right); - _Sentinel._Release(); - _Proxy._Release(); - } - -public: _Tree(_Tree&& _Right, const allocator_type& _Al) : _Mypair(_One_then_variadic_args_t{}, _Right.key_comp(), // intentionally copy comparator, see LWG-2227 _One_then_variadic_args_t{}, _Al) { if constexpr (!_Alnode_traits::is_always_equal::value) { if (_Getal() != _Right._Getal()) { - _Different_allocator_move_construct(_STD move(_Right)); + auto&& _Alproxy = _GET_PROXY_ALLOCATOR(_Alnode, _Getal()); + const auto _Scary = _Get_scary(); + _Container_proxy_ptr<_Alty> _Proxy(_Alproxy, *_Scary); + _Tree_head_scoped_ptr<_Alnode, _Scary_val> _Sentinel(_Getal(), *_Scary); + _Copy<_Strategy::_Move>(_Right); + _Sentinel._Release(); + _Proxy._Release(); return; } } From 0d9b5a43e759086be715cd12b7d778309dbc1371 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:23:51 -0700 Subject: [PATCH 11/24] 17.7p3 fixed GH 3713 affecting `_addcarry_u64`/`_subborrow_u64`. --- stl/inc/__msvc_int128.hpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/stl/inc/__msvc_int128.hpp b/stl/inc/__msvc_int128.hpp index 61ea8e29b1..31be4971b8 100644 --- a/stl/inc/__msvc_int128.hpp +++ b/stl/inc/__msvc_int128.hpp @@ -43,17 +43,14 @@ _STD_BEGIN #if defined(_M_X64) && !defined(_M_ARM64EC) && !defined(_M_CEE_PURE) && !defined(__CUDACC__) \ && !defined(__INTEL_COMPILER) #define _STL_128_INTRINSICS 1 -#ifdef __clang__ -#define _STL_128_ADD_SUB_INTRINSICS 0 // clang doesn't have _addcarry_u64 / _subborrow_u64 -#define _STL_128_DIV_INTRINSICS 0 // clang doesn't have _udiv128 / _div128 -#else // ^^^ Clang / other compilers vvv -#define _STL_128_ADD_SUB_INTRINSICS 1 -#define _STL_128_DIV_INTRINSICS 1 -#endif // ^^^ other compilers ^^^ +#ifdef __clang__ // clang doesn't have _udiv128 / _div128 +#define _STL_128_DIV_INTRINSICS 0 +#else // ^^^ Clang / other vvv +#define _STL_128_DIV_INTRINSICS 1 +#endif // ^^^ detect _udiv128 / _div128 ^^^ #else // ^^^ intrinsics available / intrinsics unavailable vvv -#define _STL_128_INTRINSICS 0 -#define _STL_128_ADD_SUB_INTRINSICS 0 -#define _STL_128_DIV_INTRINSICS 0 +#define _STL_128_INTRINSICS 0 +#define _STL_128_DIV_INTRINSICS 0 #endif // ^^^ intrinsics unavailable ^^^ template @@ -132,11 +129,11 @@ struct static constexpr unsigned char _AddCarry64( unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept { // _STL_INTERNAL_CHECK(_Carry < 2); -#if _STL_128_ADD_SUB_INTRINSICS +#if _STL_128_INTRINSICS if (!_Is_constant_evaluated()) { return _addcarry_u64(_Carry, _Left, _Right, &_Result); } -#endif // _STL_128_ADD_SUB_INTRINSICS +#endif // _STL_128_INTRINSICS const uint64_t _Sum = _Left + _Right + _Carry; _Result = _Sum; @@ -146,11 +143,11 @@ struct static constexpr unsigned char _SubBorrow64( unsigned char _Carry, uint64_t _Left, uint64_t _Right, uint64_t& _Result) noexcept { // _STL_INTERNAL_CHECK(_Carry < 2); -#if _STL_128_ADD_SUB_INTRINSICS +#if _STL_128_INTRINSICS if (!_Is_constant_evaluated()) { return _subborrow_u64(_Carry, _Left, _Right, &_Result); } -#endif // _STL_128_ADD_SUB_INTRINSICS +#endif // _STL_128_INTRINSICS const auto _Difference = _Left - _Right - _Carry; _Result = _Difference; From 81959db5d8ac6ba3cc375599a3cdb172c7fb395d Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:24:02 -0700 Subject: [PATCH 12/24] 17.7p3 fixed GH 3713 affecting `LDBL_DECIMAL_DIG`. --- tests/libcxx/expected_results.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index a815353ffd..e6fe33937f 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -513,8 +513,8 @@ std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cp std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp SKIPPED # OS-29877133 "LDBL_DECIMAL_DIG missing from " -std/depr/depr.c.headers/float_h.pass.cpp FAIL -std/language.support/support.limits/c.limits/cfloat.pass.cpp FAIL +std/depr/depr.c.headers/float_h.pass.cpp:0 FAIL +std/language.support/support.limits/c.limits/cfloat.pass.cpp:0 FAIL # *** LIKELY BOGUS TESTS *** From b57910ba555c83984aaea7d7f8ff1978653ebc83 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:26:13 -0700 Subject: [PATCH 13/24] 17.7p3 fixed GH 3713 affecting `tgmath.h`. --- 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 e6fe33937f..055288aaa6 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -417,7 +417,7 @@ std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type. # *** CLANG COMPILER BUGS *** # LLVM-46207 Clang's tgmath.h interferes with the UCRT's tgmath.h -std/depr/depr.c.headers/tgmath_h.pass.cpp:1 SKIPPED +std/depr/depr.c.headers/tgmath_h.pass.cpp:1 FAIL # *** CLANG ISSUES, NOT YET ANALYZED *** From 3f360a294aba1eb1126f19e11ef63bc667dde7d2 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:26:41 -0700 Subject: [PATCH 14/24] Clang 16.0.3 fixed LLVM-62762 "32-bit-only misoptimization of printf calls on Windows". --- tests/std/tests/P0067R5_charconv/test.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/std/tests/P0067R5_charconv/test.cpp b/tests/std/tests/P0067R5_charconv/test.cpp index b898d1902d..c06b844479 100644 --- a/tests/std/tests/P0067R5_charconv/test.cpp +++ b/tests/std/tests/P0067R5_charconv/test.cpp @@ -1170,9 +1170,6 @@ template pair std::__to_chars( wchar_t* const, wchar_t* const, const __floating_decimal_64, chars_format, const double); template pair std::__d2fixed_buffered_n(wchar_t*, wchar_t* const, const double, const uint32_t); -#if defined(__clang__) && defined(_M_IX86) // TRANSITION, LLVM-62762, fixed in Clang 16.0.3 -int main() {} -#else // ^^^ workaround / no workaround vvv int main(int argc, char** argv) { const auto start = chrono::steady_clock::now(); @@ -1201,4 +1198,3 @@ int main(int argc, char** argv) { puts("That was slow. Consider tuning PrefixesToTest and FractionBits to test fewer cases."); } } -#endif // ^^^ no workaround ^^^ From 9d24d564d452e099a79aea6c2cf6a8c6198e6f6f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:35:20 -0700 Subject: [PATCH 15/24] Style: Attach `// TRANSITION, VSO-1690654` comment. --- stl/inc/type_traits | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stl/inc/type_traits b/stl/inc/type_traits index e36e2e587b..f87d9899ed 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -732,8 +732,7 @@ struct has_unique_object_representations : bool_constant<__has_unique_object_rep _EXPORT_STD template _INLINE_VAR constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Ty); -// TRANSITION, VSO-1690654 -#ifdef __EDG__ +#ifdef __EDG__ // TRANSITION, VSO-1690654 template struct _Is_aggregate_impl : bool_constant<__is_aggregate(_Ty)> {}; From aa35219ab478e2eb4f078a629cca32f58229f319 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 16:38:26 -0700 Subject: [PATCH 16/24] Style: Attempt to improve formatting of `_Can_construct_from_tuple_like`. --- stl/inc/tuple | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/tuple b/stl/inc/tuple index 6a04b92fd5..8059fbaed0 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -191,8 +191,8 @@ inline constexpr bool _Can_construct_values_from_tuple_like_v, template concept _Can_construct_from_tuple_like = _Different_from<_TupleLike, _Tuple> && _Tuple_like<_TupleLike> && !_Is_subrange_v> - && (tuple_size_v<_Tuple> - == tuple_size_v>) &&_Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> + && (tuple_size_v<_Tuple> == tuple_size_v>) // + &&_Can_construct_values_from_tuple_like_v<_Tuple, _TupleLike> && (tuple_size_v<_Tuple> != 1 || (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>> && !is_constructible_v, _TupleLike>) ); From 902b4688d156d81e3f6592a6db6d62fe7c9c79c3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 17:07:15 -0700 Subject: [PATCH 17/24] VSO-1285779 "EDG rejects source_location intrinsics within consteval functions" was fixed on 2021-09-07 in VS 2022 17.0. --- tests/std/tests/P1208R6_source_location/test.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/std/tests/P1208R6_source_location/test.cpp b/tests/std/tests/P1208R6_source_location/test.cpp index d41dc8d319..e71d0cc271 100644 --- a/tests/std/tests/P1208R6_source_location/test.cpp +++ b/tests/std/tests/P1208R6_source_location/test.cpp @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef __EDG__ // TRANSITION, VSO-1285779 #include "header.h" #include #include @@ -237,6 +236,3 @@ int main() { static_assert(test()); return 0; } -#else // ^^^ !defined(__EDG__) / defined(__EDG__) vvv -int main() {} -#endif // ^^^ defined(__EDG__) ^^^ From 2191c12d9c3bab87bf1600f0ef99be8bc4ce32c4 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 17:10:12 -0700 Subject: [PATCH 18/24] VSO-1268984 "New compiler intrinsics for Layout-compatibility and Pointer-interconvertibility Traits need to be understood by EDG" was fixed on 2022-03-07 in VS 2022 17.2. --- stl/inc/type_traits | 2 -- stl/inc/yvals_core.h | 4 ---- .../test.cpp | 2 -- .../VSO_0157762_feature_test_macros/test.compile.pass.cpp | 4 ---- 4 files changed, 12 deletions(-) diff --git a/stl/inc/type_traits b/stl/inc/type_traits index f87d9899ed..529563cccd 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -1933,7 +1933,6 @@ inline constexpr bool is_nothrow_invocable_r_v = #endif // _HAS_CXX17 #if _HAS_CXX20 -#ifndef __EDG__ // TRANSITION, VSO-1268984 #ifndef __clang__ // TRANSITION, LLVM-48860 _EXPORT_STD template struct is_layout_compatible : bool_constant<__is_layout_compatible(_Ty1, _Ty2)> {}; @@ -1957,7 +1956,6 @@ _NODISCARD constexpr bool is_corresponding_member(_MemberTy1 _ClassTy1::*_Pm1, _ return __is_corresponding_member(_ClassTy1, _ClassTy2, _Pm1, _Pm2); } #endif // __clang__ -#endif // __EDG__ #endif // _HAS_CXX20 template diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index ceb2fce5ed..7bae2e830b 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -1665,19 +1665,15 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect #define __cpp_lib_interpolate 201902L #define __cpp_lib_is_constant_evaluated 201811L -#ifndef __EDG__ // TRANSITION, VSO-1268984 #ifndef __clang__ // TRANSITION, LLVM-48860 #define __cpp_lib_is_layout_compatible 201907L #endif // __clang__ -#endif // __EDG__ #define __cpp_lib_is_nothrow_convertible 201806L -#ifndef __EDG__ // TRANSITION, VSO-1268984 #ifndef __clang__ // TRANSITION, LLVM-48860 #define __cpp_lib_is_pointer_interconvertible 201907L #endif // __clang__ -#endif // __EDG__ #define __cpp_lib_jthread 201911L #define __cpp_lib_latch 201907L diff --git a/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp b/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp index 943f022078..f06507cc11 100644 --- a/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp +++ b/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp @@ -14,7 +14,6 @@ struct S { // Must be declared at namespace scope due to static data member }; constexpr bool test() { -#ifndef __EDG__ // TRANSITION, VSO-1268984 #ifndef __clang__ // TRANSITION, LLVM-48860 // is_layout_compatible tests { @@ -246,7 +245,6 @@ constexpr bool test() { ASSERT(!is_pointer_interconvertible_with_class(static_cast(nullptr))); } #endif // __clang__ -#endif // __EDG__ return true; } diff --git a/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp b/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp index 276dd6fdd8..e523756c01 100644 --- a/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp +++ b/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp @@ -1135,7 +1135,6 @@ STATIC_ASSERT(__cpp_lib_is_invocable == 201703L); #endif #if _HAS_CXX20 -#ifndef __EDG__ // TRANSITION, VSO-1268984 #ifndef __clang__ // TRANSITION, LLVM-48860 #ifndef __cpp_lib_is_layout_compatible #error __cpp_lib_is_layout_compatible is not defined @@ -1150,7 +1149,6 @@ STATIC_ASSERT(__cpp_lib_is_layout_compatible == 201907L); #endif #endif #endif -#endif #if _HAS_CXX20 #ifndef __cpp_lib_is_nothrow_convertible @@ -1175,7 +1173,6 @@ STATIC_ASSERT(__cpp_lib_is_null_pointer == 201309L); #endif #if _HAS_CXX20 -#ifndef __EDG__ // TRANSITION, VSO-1268984 #ifndef __clang__ // TRANSITION, LLVM-48860 #ifndef __cpp_lib_is_pointer_interconvertible #error __cpp_lib_is_pointer_interconvertible is not defined @@ -1190,7 +1187,6 @@ STATIC_ASSERT(__cpp_lib_is_pointer_interconvertible == 201907L); #endif #endif #endif -#endif #if _HAS_CXX23 #ifndef __cpp_lib_is_scoped_enum From b545c85051987224d6f64e3aac1621bc974730ba Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 17:11:22 -0700 Subject: [PATCH 19/24] VSO-657455 "EDG: dependent name in nested generic lambda not seen as dependent" was fixed on 2023-01-04 in VS 2022 17.5. --- stl/inc/variant | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/stl/inc/variant b/stl/inc/variant index 3808ea86bc..2dc66b9b87 100644 --- a/stl/inc/variant +++ b/stl/inc/variant @@ -1110,11 +1110,7 @@ public: [this, &_That, _My_ref](auto _That_ref) noexcept( conjunction_v..., is_nothrow_swappable<_Types>...>) { constexpr size_t _That_idx = decltype(_That_ref)::_Idx; -#ifdef __EDG__ // TRANSITION, VSO-657455 - constexpr size_t _My_idx = decltype(_My_ref)::_Idx + 0 * _That_idx; -#else // ^^^ workaround / no workaround vvv - constexpr size_t _My_idx = decltype(_My_ref)::_Idx; -#endif // TRANSITION, VSO-657455 + constexpr size_t _My_idx = decltype(_My_ref)::_Idx; if constexpr (_My_idx == _That_idx) { // Same alternatives... if constexpr (_My_idx != variant_npos) { // ...and not valueless, swap directly using _STD swap; @@ -1127,12 +1123,7 @@ public: _That._Emplace_valueless<_My_idx>(_STD move(_My_ref._Val)); this->template _Reset<_My_idx>(); } else { // different non-valueless alternatives -#ifdef __EDG__ // TRANSITION, VSO-657455 - using _Workaround = enable_if_t<_That_idx != variant_npos, decltype(_My_ref._Val)>; - auto _Tmp = _STD move(static_cast<_Workaround>(_My_ref._Val)); -#else // ^^^ workaround / no workaround vvv auto _Tmp = _STD move(_My_ref._Val); -#endif // TRANSITION, VSO-657455 this->template _Reset<_My_idx>(); this->_Emplace_valueless<_That_idx>(_STD move(_That_ref._Val)); _That.template _Reset<_That_idx>(); From 1700372b3dcf8bae40a04014536cb4321f38902f Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 17:15:10 -0700 Subject: [PATCH 20/24] Rerun clang-format 16.0.5, no manual changes. --- stl/inc/complex | 2 +- stl/inc/stop_token | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stl/inc/complex b/stl/inc/complex index 6420abadce..ce60701b76 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -2037,7 +2037,7 @@ _NODISCARD complex<_Ty> tanh(const complex<_Ty>& _Left) { _Real = _Ty{1}; } - return complex<_Ty>(_Real, _Tv* _Ty{0}); + return complex<_Ty>(_Real, _Tv * _Ty{0}); } return complex<_Ty>((_Ctraits<_Ty>::sqrt(_Ty{1} + _Sv * _Sv)) * _Bv / _Dv, _Tv / _Dv); diff --git a/stl/inc/stop_token b/stl/inc/stop_token index 3d65a48ddc..ee14cc886a 100644 --- a/stl/inc/stop_token +++ b/stl/inc/stop_token @@ -255,7 +255,7 @@ void _Stop_callback_base::_Do_attach( // fast path check if the state is already known auto _Local_sources = _State->_Stop_sources.load(); - if ((_Local_sources& uint32_t{1}) != 0) { + if ((_Local_sources & uint32_t{1}) != 0) { // stop already requested _Fn(this); return; @@ -269,7 +269,7 @@ void _Stop_callback_base::_Do_attach( auto _Head = _State->_Callbacks._Lock_and_load(); // recheck the state in case it changed while we were waiting to acquire the lock _Local_sources = _State->_Stop_sources.load(); - if ((_Local_sources& uint32_t{1}) != 0) { + if ((_Local_sources & uint32_t{1}) != 0) { // stop already requested _State->_Callbacks._Store_and_unlock(_Head); _Fn(this); From 1a0d9d2edd279cb84445d80d3be6cfc746361d13 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 19:06:31 -0700 Subject: [PATCH 21/24] Add workarounds for VSO-1849453 "EDG mishandles is_pointer_interconvertible_base_of_v". --- tests/std/tests/GH_000431_copy_move_family/test.cpp | 2 ++ tests/std/tests/GH_000431_equal_family/test.cpp | 2 ++ .../GH_000431_equal_memcmp_is_safe/test.compile.pass.cpp | 6 ++++++ .../GH_000431_iter_copy_move_cat/test.compile.pass.cpp | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/tests/std/tests/GH_000431_copy_move_family/test.cpp b/tests/std/tests/GH_000431_copy_move_family/test.cpp index 9486d75d7f..9b7cf5ab6e 100644 --- a/tests/std/tests/GH_000431_copy_move_family/test.cpp +++ b/tests/std/tests/GH_000431_copy_move_family/test.cpp @@ -105,7 +105,9 @@ struct StatefulDerived2 : EmptyBase, StatefulBase {}; #ifdef __cpp_lib_is_pointer_interconvertible STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(!is_pointer_interconvertible_base_of_v); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); #endif // __cpp_lib_is_pointer_interconvertible diff --git a/tests/std/tests/GH_000431_equal_family/test.cpp b/tests/std/tests/GH_000431_equal_family/test.cpp index 5461fbc81a..9bd78f6bb3 100644 --- a/tests/std/tests/GH_000431_equal_family/test.cpp +++ b/tests/std/tests/GH_000431_equal_family/test.cpp @@ -133,7 +133,9 @@ struct StatefulDerived2 : EmptyBase, StatefulBase {}; #ifdef __cpp_lib_is_pointer_interconvertible STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(!is_pointer_interconvertible_base_of_v); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); #endif // __cpp_lib_is_pointer_interconvertible diff --git a/tests/std/tests/GH_000431_equal_memcmp_is_safe/test.compile.pass.cpp b/tests/std/tests/GH_000431_equal_memcmp_is_safe/test.compile.pass.cpp index 5159486e50..560f081613 100644 --- a/tests/std/tests/GH_000431_equal_memcmp_is_safe/test.compile.pass.cpp +++ b/tests/std/tests/GH_000431_equal_memcmp_is_safe/test.compile.pass.cpp @@ -141,9 +141,13 @@ struct StatefulPrivatelyDerived2 : private EmptyBase, private StatefulBase {}; STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(!is_pointer_interconvertible_base_of_v); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_pointer_interconvertible_base_of_v); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(!is_pointer_interconvertible_base_of_v); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); @@ -453,8 +457,10 @@ STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); STATIC_ASSERT(test_equal_memcmp_is_safe_for_pointers()); diff --git a/tests/std/tests/GH_000431_iter_copy_move_cat/test.compile.pass.cpp b/tests/std/tests/GH_000431_iter_copy_move_cat/test.compile.pass.cpp index 682d00de98..e82adc5789 100644 --- a/tests/std/tests/GH_000431_iter_copy_move_cat/test.compile.pass.cpp +++ b/tests/std/tests/GH_000431_iter_copy_move_cat/test.compile.pass.cpp @@ -309,9 +309,13 @@ struct StatefulPrivatelyDerived2 : private EmptyBase, private StatefulBase {}; STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(!is_pointer_interconvertible_base_of_v); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_pointer_interconvertible_base_of_v); +#ifndef __EDG__ // TRANSITION, VSO-1849453 STATIC_ASSERT(!is_pointer_interconvertible_base_of_v); +#endif // ^^^ no workaround ^^^ STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); STATIC_ASSERT(is_pointer_interconvertible_base_of_v); From 20594801aa9cbb73cff42e7979c531e5412b1bc2 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 19:10:42 -0700 Subject: [PATCH 22/24] Add workaround for VSO-1849458 "EDG mishandles is_layout_compatible_v". --- .../test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp b/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp index f06507cc11..ac110e8d1e 100644 --- a/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp +++ b/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp @@ -72,9 +72,11 @@ constexpr bool test() { ASSERT(is_layout_compatible_v); ASSERT(is_layout_compatible_v); +#ifndef __EDG__ // TRANSITION, VSO-1849458 ASSERT(is_layout_compatible_v); ASSERT(is_layout_compatible_v); ASSERT(is_layout_compatible_v); +#endif // ^^^ no workaround ^^^ ASSERT(!is_layout_compatible_v); ASSERT(!is_layout_compatible_v); From bf18bba437f549a6b6c42e51ecbd6cb94e00e00c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 19:18:15 -0700 Subject: [PATCH 23/24] Perma-workaround EDG behavioral differences in source_location::column(). --- .../tests/P1208R6_source_location/header.h | 6 +- .../tests/P1208R6_source_location/test.cpp | 56 ++++++++++++++----- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/tests/std/tests/P1208R6_source_location/header.h b/tests/std/tests/P1208R6_source_location/header.h index 2bf8cdf2b3..e9c8b48bbb 100644 --- a/tests/std/tests/P1208R6_source_location/header.h +++ b/tests/std/tests/P1208R6_source_location/header.h @@ -12,9 +12,11 @@ constexpr void header_test() { assert(x.line() == __LINE__ - 1); #ifdef __clang__ assert(x.column() == 20); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + assert(x.column() == 45); +#else // ^^^ EDG / C1XX vvv assert(x.column() == 37); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x.function_name() == "header_test"sv); #else // ^^^ workaround / no workaround vvv diff --git a/tests/std/tests/P1208R6_source_location/test.cpp b/tests/std/tests/P1208R6_source_location/test.cpp index e71d0cc271..5a32e94701 100644 --- a/tests/std/tests/P1208R6_source_location/test.cpp +++ b/tests/std/tests/P1208R6_source_location/test.cpp @@ -20,9 +20,11 @@ constexpr auto g = source_location::current(); static_assert(g.line() == __LINE__ - 1); #ifdef __clang__ static_assert(g.column() == 20); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) +static_assert(g.column() == 45); +#else // ^^^ EDG / C1XX vvv static_assert(g.column() == 37); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ static_assert(g.function_name() == ""sv); static_assert(string_view{g.file_name()}.ends_with(test_cpp)); @@ -54,9 +56,11 @@ constexpr void local_test() { assert(x.line() == __LINE__ - 1); #ifdef __clang__ assert(x.column() == 20); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + assert(x.column() == 45); +#else // ^^^ EDG / C1XX vvv assert(x.column() == 37); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x.function_name() == "local_test"sv); #else // ^^^ workaround / no workaround vvv @@ -80,7 +84,11 @@ constexpr void argument_test( constexpr void sloc_constructor_test() { const s x; assert(x.loc.line() == __LINE__ - 1); +#ifdef __EDG__ + assert(x.loc.column() == 14); +#else // ^^^ defined(__EDG__) / !defined(__EDG__) vvv assert(x.loc.column() == 13); +#endif // ^^^ !defined(__EDG__) ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x.loc.function_name() == "sloc_constructor_test"sv); #else // ^^^ workaround / no workaround vvv @@ -98,9 +106,11 @@ constexpr void different_constructor_test() { assert(x.loc.line() == s_int_line); #ifdef __clang__ assert(x.loc.column() == 15); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + assert(x.loc.column() == 22); +#else // ^^^ EDG / C1XX vvv assert(x.loc.column() == 5); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x.loc.function_name() == "s"sv); #elif defined(_M_IX86) // ^^^ workaround / no workaround vvv @@ -114,7 +124,11 @@ constexpr void different_constructor_test() { constexpr void sub_member_test() { const s2 s; assert(s.x.loc.line() == __LINE__ - 1); +#ifdef __EDG__ + assert(s.x.loc.column() == 15); +#else // ^^^ defined(__EDG__) / !defined(__EDG__) vvv assert(s.x.loc.column() == 14); +#endif // ^^^ !defined(__EDG__) ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(s.x.loc.function_name() == "sub_member_test"sv); #else // ^^^ workaround / no workaround vvv @@ -130,9 +144,11 @@ constexpr void sub_member_test() { assert(s_i.x.loc.line() == s2_int_line); #ifdef __clang__ assert(s_i.x.loc.column() == 15); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + assert(s_i.x.loc.column() == 23); +#else // ^^^ EDG / C1XX vvv assert(s_i.x.loc.column() == 5); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(s_i.x.loc.function_name() == "s2"sv); #elif defined(_M_IX86) // ^^^ workaround / no workaround vvv @@ -153,10 +169,13 @@ constexpr void lambda_test() { #ifdef __clang__ assert(x1.column() == 28); assert(x2.column() == 33); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + assert(x1.column() == 53); + assert(x2.column() == 58); +#else // ^^^ EDG / C1XX vvv assert(x1.column() == 52); assert(x2.column() == 50); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x1.function_name() == "lambda_test"sv); assert(x2.function_name() == "operator()"sv); @@ -184,9 +203,11 @@ constexpr void function_template_test() { assert(x1.line() == __LINE__ - 5); #ifdef __clang__ assert(x1.column() == 12); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + assert(x1.column() == 37); +#else // ^^^ EDG / C1XX vvv assert(x1.column() == 29); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x1.function_name() == "function_template"sv); #else // ^^^ workaround / no workaround vvv @@ -208,14 +229,21 @@ constexpr void function_template_test() { constexpr bool test() { copy_test(); local_test(); +#ifdef __EDG__ + argument_test(__LINE__, 31); +#else // ^^^ defined(__EDG__) / !defined(__EDG__) vvv argument_test(__LINE__, 5); +#endif // ^^^ !defined(__EDG__) ^^^ #ifdef __clang__ const auto loc = source_location::current(); argument_test(__LINE__ - 1, 22, loc); -#else // ^^^ defined(__clang__) / !defined(__clang__) vvv +#elif defined(__EDG__) + const auto loc = source_location::current(); + argument_test(__LINE__ - 1, 47, loc); +#else // ^^^ EDG / C1XX vvv const auto loc = source_location::current(); argument_test(__LINE__ - 1, 39, loc); -#endif // ^^^ !defined(__clang__) ^^^ +#endif // ^^^ C1XX ^^^ sloc_constructor_test(); different_constructor_test(); sub_member_test(); From 14be66a2f215feba37ab3da50d2cda35180a44ce Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 11 Jul 2023 19:43:10 -0700 Subject: [PATCH 24/24] Add workaround for VSO-1849463 "EDG silently rejects source_location::current() as a default argument". --- tests/std/tests/P1208R6_source_location/test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/std/tests/P1208R6_source_location/test.cpp b/tests/std/tests/P1208R6_source_location/test.cpp index 5a32e94701..4640ca5c13 100644 --- a/tests/std/tests/P1208R6_source_location/test.cpp +++ b/tests/std/tests/P1208R6_source_location/test.cpp @@ -253,11 +253,13 @@ constexpr bool test() { return true; } +#ifndef __EDG__ // TRANSITION, VSO-1849463 // Also test GH-2822 Failed to specialize std::invoke on operator() with default argument // std::source_location::current() void test_gh_2822() { // COMPILE-ONLY invoke([](source_location = source_location::current()) {}); } +#endif // ^^^ no workaround ^^^ int main() { test();