c++: dependence of baselink [PR105964]
authorJason Merrill <jason@redhat.com>
Wed, 22 Jun 2022 22:19:11 +0000 (18:19 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 23 Jun 2022 03:46:32 +0000 (23:46 -0400)
commitc85cea9ca165b0b771d9f913016c9dc8db46b5d7
tree21e8a15f9547e965d2fe77bbd16ab5cd2c9cecff
parent4fcf79c8ab835615aea0687195871ac43b84d156
c++: dependence of baselink [PR105964]

helper<token>::c isn't dependent just because we haven't deduced its return
type yet.  type_dependent_expression_p already knows how to deal with that
for bare FUNCTION_DECL, but needs to learn to look through a BASELINK.

PR c++/105964

gcc/cp/ChangeLog:

* pt.cc (type_dependent_expression_p): Look through BASELINK.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/nontype-auto21.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1z/nontype-auto21.C [new file with mode: 0644]