[clang][ItaniumMangle] Mangle friend function templates with a constr… (#110247)
…aint that depends on a template parameter from an enclosing template as
members of the enclosing class.
Such function templates should be considered member-like constrained
friends per [temp.friend]p9 and
https://github.com/itanium-cxx-abi/cxx-abi/issues/24#issuecomment-934977198).
NOKEYCHECK=True
GitOrigin-RevId: 147558e31c2b8d2986fc13cf6f9e2bf6a120f2e6
diff --git a/test/test_demangle.pass.cpp b/test/test_demangle.pass.cpp
index 17786a3..eb32b46 100644
--- a/test/test_demangle.pass.cpp
+++ b/test/test_demangle.pass.cpp
@@ -30128,11 +30128,15 @@
// C++20 concepts, see https://github.com/itanium-cxx-abi/cxx-abi/issues/24.
{"_Z2f0IiE1SIX1CIT_EEEv", "S<C<int>> f0<int>()"},
{"_ZN5test21AIiEF1fEzQ4TrueIT_E", "test2::A<int>::friend f(...) requires True<T>"},
- {"_ZN5test2F1gIvEEvzQaa4TrueIT_E4TrueITL0__E", "void test2::friend g<void>(...) requires True<T> && True<TL0_>"},
+ {"_ZN5test21AIbEF1fEzQ4TrueIT_E", "test2::A<bool>::friend f(...) requires True<T>"},
+ {"_ZN5test21AIiEF1gIvEEvzQaa4TrueIT_E4TrueITL0__E", "void test2::A<int>::friend g<void>(...) requires True<T> && True<TL0_>"},
+ {"_ZN5test21AIbEF1gIvEEvzQaa4TrueIT_E4TrueITL0__E", "void test2::A<bool>::friend g<void>(...) requires True<T> && True<TL0_>"},
{"_ZN5test21hIvEEvzQ4TrueITL0__E", "void test2::h<void>(...) requires True<TL0_>"},
- {"_ZN5test2F1iIvQaa4TrueIT_E4TrueITL0__EEEvz", "void test2::friend i<void>(...)"},
+ {"_ZN5test21AIiEF1iIvQaa4TrueIT_E4TrueITL0__EEEvz", "void test2::A<int>::friend i<void>(...)"},
+ {"_ZN5test21AIbEF1iIvQaa4TrueIT_E4TrueITL0__EEEvz", "void test2::A<bool>::friend i<void>(...)"},
{"_ZN5test21jIvQ4TrueITL0__EEEvz", "void test2::j<void>(...)"},
- {"_ZN5test2F1kITk4TruevQ4TrueIT_EEEvz", "void test2::friend k<void>(...)"},
+ {"_ZN5test21AIiEF1kITk4TruevQ4TrueIT_EEEvz", "void test2::A<int>::friend k<void>(...)"},
+ {"_ZN5test21AIbEF1kITk4TruevQ4TrueIT_EEEvz", "void test2::A<bool>::friend k<void>(...)"},
{"_ZN5test21lITk4TruevEEvz", "void test2::l<void>(...)"},
{"_ZN5test31dITnDaLi0EEEvv", "void test3::d<0>()"},
{"_ZN5test31eITnDcLi0EEEvv", "void test3::e<0>()"},