c++: non-templated friends [PR105852]
commite8ed26c2ac38ab1f6ed5a627d9089a9243e06a0c
authorJason Merrill <jason@redhat.com>
Tue, 7 Jun 2022 19:52:30 +0000 (7 15:52 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 8 Jun 2022 20:38:25 +0000 (8 16:38 -0400)
tree9dca7d858cc4aac7528d18a71525faf40a9b53b7
parent7d87790a871482e9c5142a8e885b4a5f76d197c8
c++: non-templated friends [PR105852]

The previous patch for 105852 avoids copying DECL_TEMPLATE_INFO from a
non-templated friend, but it really shouldn't have it in the first place.

PR c++/105852

gcc/cp/ChangeLog:

* decl.cc (duplicate_decls): Change non-templated friend
check to an assert.
* pt.cc (tsubst_function_decl): Don't set DECL_TEMPLATE_INFO
on non-templated friends.
(tsubst_friend_function): Adjust.
gcc/cp/decl.cc
gcc/cp/pt.cc