diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-06-03 09:26:43 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-06-03 09:26:43 -0400 |
commit | 38af81df6aac11d49f9378d1c628ccc3c815c3ff (patch) | |
tree | 82b9ee008df9e6cb17f93154487bd8d134d711ed /libgcc | |
parent | 23bee8508816297a9b2ab81a96aa0c79ac88ceba (diff) | |
download | gcc-38af81df6aac11d49f9378d1c628ccc3c815c3ff.zip gcc-38af81df6aac11d49f9378d1c628ccc3c815c3ff.tar.gz gcc-38af81df6aac11d49f9378d1c628ccc3c815c3ff.tar.bz2 |
c++: is_specialization_of_friend confusion [PR109923]
The check for a non-template member function of a class template in
is_specialization_of_friend is overbroad, and accidentally holds for a
non-template hidden friend too, which for the testcase below causes the
predicate to bogusly return true for
decl = void non_templ_friend(A<int>, A<void>)
friend_decl = void non_templ_friend(A<void>, A<void>)
This patch refines the check appropriately.
PR c++/109923
gcc/cp/ChangeLog:
* pt.cc (is_specialization_of_friend): Fix overbroad check for
a non-template member function of a class template.
gcc/testsuite/ChangeLog:
* g++.dg/template/friend79.C: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions