diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-03-05 20:36:36 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-03-05 20:36:36 -0500 |
commit | b0d11bb02a4a4c7d61e9b53411ccdc54610b1429 (patch) | |
tree | 3fa60882824d5d59a8597b9354ecaa8ea3f2cb48 /gcc/system.h | |
parent | 214dadf30a3bab0d02b8c6512a2d0475e2643dc7 (diff) | |
download | gcc-b0d11bb02a4a4c7d61e9b53411ccdc54610b1429.zip gcc-b0d11bb02a4a4c7d61e9b53411ccdc54610b1429.tar.gz gcc-b0d11bb02a4a4c7d61e9b53411ccdc54610b1429.tar.bz2 |
c++/modules: befriending template from current class scope
Here the TEMPLATE_DECL representing the template friend declaration
naming B has class scope since the template B has class scope, but
get_merge_kind assumes all DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P
TEMPLATE_DECL have namespace scope and wrongly returns MK_named instead
of MK_local_friend for the friend.
gcc/cp/ChangeLog:
* module.cc (trees_out::get_merge_kind) <case depset::EK_DECL>:
Accomodate class-scope DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P
TEMPLATE_DECL. Consolidate IDENTIFIER_ANON_P cases.
gcc/testsuite/ChangeLog:
* g++.dg/modules/friend-7.h: New test.
* g++.dg/modules/friend-7_a.H: New test.
* g++.dg/modules/friend-7_b.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions