From 566c8a3dc6cdf229a428b42cbf1a18f7f58a86ba Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 1 Jul 2025 10:40:43 -0700 Subject: [PATCH 1/2] Update `source_location` tests for upcoming EDG changes, one more time --- tests/std/tests/P1208R6_source_location/test.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/std/tests/P1208R6_source_location/test.cpp b/tests/std/tests/P1208R6_source_location/test.cpp index 6ed3f67d98b..2ab3c03f3ff 100644 --- a/tests/std/tests/P1208R6_source_location/test.cpp +++ b/tests/std/tests/P1208R6_source_location/test.cpp @@ -196,9 +196,8 @@ constexpr void sub_member_test() { assert(s_i.x.loc.column() == 5); #endif // ^^^ C1XX ^^^ #if _USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION -#ifdef __EDG__ // TRANSITION, EDG is changing to match C1XX's output - assert(s_i.x.loc.function_name() == THISCALL_OR_CDECL " s2::s2(int)"sv - || s_i.x.loc.function_name() == "s2::s2(int)"sv); +#ifdef __EDG__ // TRANSITION, EDG is changing to almost match C1XX's output + assert(s_i.x.loc.function_name() == "__cdecl s2::s2(int)"sv || s_i.x.loc.function_name() == "s2::s2(int)"sv); #else // ^^^ workaround / no workaround vvv assert(s_i.x.loc.function_name() == THISCALL_OR_CDECL " s2::s2(int)"sv); #endif // ^^^ no workaround ^^^ @@ -245,8 +244,8 @@ constexpr void lambda_test() { assert(fun2 == "auto " THISCALL_OR_CDECL " lambda_test()::(anonymous class)::operator()(void) const"sv); #elif defined(__EDG__) // ^^^ detailed Clang / detailed __EDG__ vvv // TRANSITION, EDG is changing to resemble C1XX's output somewhat more closely - assert(fun2 == THISCALL_OR_CDECL " lambda [](void)->auto::operator()(void)->auto"sv - || fun2 == "lambda []()->auto::operator()()->auto"sv); + assert(fun2 == "__cdecl lambda [](void)->auto::operator()(void)->auto"sv + || fun2 == "lambda []()->auto::operator()()->auto"sv); #else // ^^^ detailed __EDG__ / detailed C1XX vvv assert(fun2.starts_with("struct std::source_location " THISCALL_OR_CDECL " lambda_test::(void)"sv - || x1.function_name() == "std::source_location function_template()"sv); + || x1.function_name() == "std::source_location function_template()"sv); #else // ^^^ detailed __EDG__ / detailed C1XX vvv assert(x1.function_name() == "struct std::source_location __cdecl function_template(void)"sv); #endif // ^^^ detailed C1XX ^^^ From fed9ce941caf320e0a571b98b592d4fb1cd05401 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 1 Jul 2025 10:46:01 -0700 Subject: [PATCH 2/2] clang-format. --- tests/std/tests/P1208R6_source_location/test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/std/tests/P1208R6_source_location/test.cpp b/tests/std/tests/P1208R6_source_location/test.cpp index 2ab3c03f3ff..79497062073 100644 --- a/tests/std/tests/P1208R6_source_location/test.cpp +++ b/tests/std/tests/P1208R6_source_location/test.cpp @@ -245,7 +245,7 @@ constexpr void lambda_test() { #elif defined(__EDG__) // ^^^ detailed Clang / detailed __EDG__ vvv // TRANSITION, EDG is changing to resemble C1XX's output somewhat more closely assert(fun2 == "__cdecl lambda [](void)->auto::operator()(void)->auto"sv - || fun2 == "lambda []()->auto::operator()()->auto"sv); + || fun2 == "lambda []()->auto::operator()()->auto"sv); #else // ^^^ detailed __EDG__ / detailed C1XX vvv assert(fun2.starts_with("struct std::source_location " THISCALL_OR_CDECL " lambda_test::(void)"sv - || x1.function_name() == "std::source_location function_template()"sv); + || x1.function_name() == "std::source_location function_template()"sv); #else // ^^^ detailed __EDG__ / detailed C1XX vvv assert(x1.function_name() == "struct std::source_location __cdecl function_template(void)"sv); #endif // ^^^ detailed C1XX ^^^