Skip to content

Commit 4e95a14

Browse files
Update source_location tests for upcoming EDG changes, one more time (#5634)
1 parent e59dc20 commit 4e95a14

File tree

1 file changed

+3
-4
lines changed
  • tests/std/tests/P1208R6_source_location

1 file changed

+3
-4
lines changed

tests/std/tests/P1208R6_source_location/test.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ constexpr void sub_member_test() {
196196
assert(s_i.x.loc.column() == 5);
197197
#endif // ^^^ C1XX ^^^
198198
#if _USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION
199-
#ifdef __EDG__ // TRANSITION, EDG is changing to match C1XX's output
200-
assert(s_i.x.loc.function_name() == THISCALL_OR_CDECL " s2::s2(int)"sv
201-
|| s_i.x.loc.function_name() == "s2::s2(int)"sv);
199+
#ifdef __EDG__ // TRANSITION, EDG is changing to almost match C1XX's output
200+
assert(s_i.x.loc.function_name() == "__cdecl s2::s2(int)"sv || s_i.x.loc.function_name() == "s2::s2(int)"sv);
202201
#else // ^^^ workaround / no workaround vvv
203202
assert(s_i.x.loc.function_name() == THISCALL_OR_CDECL " s2::s2(int)"sv);
204203
#endif // ^^^ no workaround ^^^
@@ -245,7 +244,7 @@ constexpr void lambda_test() {
245244
assert(fun2 == "auto " THISCALL_OR_CDECL " lambda_test()::(anonymous class)::operator()(void) const"sv);
246245
#elif defined(__EDG__) // ^^^ detailed Clang / detailed __EDG__ vvv
247246
// TRANSITION, EDG is changing to resemble C1XX's output somewhat more closely
248-
assert(fun2 == THISCALL_OR_CDECL " lambda [](void)->auto::operator()(void)->auto"sv
247+
assert(fun2 == "__cdecl lambda [](void)->auto::operator()(void)->auto"sv
249248
|| fun2 == "lambda []()->auto::operator()()->auto"sv);
250249
#else // ^^^ detailed __EDG__ / detailed C1XX vvv
251250
assert(fun2.starts_with("struct std::source_location " THISCALL_OR_CDECL " lambda_test::<lambda_"sv));

0 commit comments

Comments
 (0)