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, 29 Apr 2022 13:21:32 +0000 (09:21 -0400)
commita0a2554d7c86c126de85fcbd5bd7e16dbb5a2693
treee747cdf9ead6dfdc7e019bb6f48feb3058850819
parentac5b356d0567992d8863816e203c7d98b25036dc
c++: using in diagnostics [PR102987]

The decl pretty-printing code wasn't looking at the flags parameter, so we
were printing 'using' in the middle of an expression.

PR c++/102987

gcc/cp/ChangeLog:

* error.cc (dump_decl) [USING_DECL]: Respect flags.

gcc/testsuite/ChangeLog:

* g++.dg/diagnostic/using1.C: Check pretty-printing.
gcc/cp/error.cc
gcc/testsuite/g++.dg/diagnostic/using1.C