c++: using in diagnostics [PR102987]
authorJason Merrill <jason@redhat.com>
Thu, 14 Apr 2022 21:35:35 +0000 (17:35 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 15 Apr 2022 01:00:14 +0000 (21:00 -0400)
commit6364a39907bd68624a30df0c8e380c40d2a646c4
treef5f0a476d366921513264d5c4388f9f1c0ccf1e8
parent031bd52e482a53314d3dfac2d375c1033a6b7031
c++: using in diagnostics [PR102987]

The expression pretty-printing code crashed on a location wrapper with no
type, and didn't know what to do with a USING_DECL.

PR c++/102987

gcc/cp/ChangeLog:

* error.cc (dump_expr): Handle USING_DECL.
[VIEW_CONVERT_EXPR]: Just look through location wrapper.

gcc/testsuite/ChangeLog:

* g++.dg/diagnostic/using1.C: New test.
gcc/cp/error.cc
gcc/testsuite/g++.dg/diagnostic/using1.C [new file with mode: 0644]