diff options
author | Patrick Palka <ppalka@redhat.com> | 2022-02-17 20:20:24 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2022-02-17 20:20:24 -0500 |
commit | 36278f48cbc08c78e4ed588e5a049bd45fd1c55a (patch) | |
tree | 7014331020eb2e0adfd3cc00d2aa3cbe6f96e7b8 /libgo | |
parent | 0bdb049877f405f361a9a3f597267ff5e44733a2 (diff) | |
download | gcc-36278f48cbc08c78e4ed588e5a049bd45fd1c55a.zip gcc-36278f48cbc08c78e4ed588e5a049bd45fd1c55a.tar.gz gcc-36278f48cbc08c78e4ed588e5a049bd45fd1c55a.tar.bz2 |
c++: implicit 'this' in noexcept-spec within class tmpl [PR94944]
Here when instantiating the noexcept-spec we fail to resolve the
implicit object for the member call A<T>::f() ultimately because
maybe_instantiate_noexcept sets current_class_ptr/ref to the dependent
'this' (of type B<T>) rather than the specialized 'this' (of type B<int>).
This patch fixes this by making maybe_instantiate_noexcept set
current_class_ptr/ref to the specialized 'this' instead, consistent
with what tsubst_function_type does when substituting into the trailing
return type of a non-static member function.
PR c++/94944
gcc/cp/ChangeLog:
* pt.cc (maybe_instantiate_noexcept): For non-static member
functions, set current_class_ptr/ref to the specialized 'this'
instead.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/noexcept34.C: Adjusted expected diagnostics.
* g++.dg/cpp0x/noexcept75.C: New test.
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions