diff options
author | Jason Merrill <jason@redhat.com> | 2022-03-31 18:15:24 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-04-29 09:21:15 -0400 |
commit | ac5b356d0567992d8863816e203c7d98b25036dc (patch) | |
tree | 0a4091070271bc469c24555a7a8994e5d3a453e0 /gcc/cp | |
parent | a282da2243103d79262ca04f5e3a3cc7b9b06935 (diff) | |
download | gcc-ac5b356d0567992d8863816e203c7d98b25036dc.zip gcc-ac5b356d0567992d8863816e203c7d98b25036dc.tar.gz gcc-ac5b356d0567992d8863816e203c7d98b25036dc.tar.bz2 |
c++: dump alias-declaration scope
An alias can't be declared with a qualified-id in actual code, but in
diagnostics we want to know which scope it belongs to, and I think a
nested-name-specifier is the best way to provide that.
gcc/cp/ChangeLog:
* error.cc (dump_decl): Check TFF_UNQUALIFIED_NAME.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-1.C: Expect qualified name.
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/error.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc index 1e944ca..2b07136 100644 --- a/gcc/cp/error.cc +++ b/gcc/cp/error.cc @@ -1246,6 +1246,8 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags) || flags & TFF_CLASS_KEY_OR_ENUM)) { pp_cxx_ws_string (pp, "using"); + if (! (flags & TFF_UNQUALIFIED_NAME)) + dump_scope (pp, CP_DECL_CONTEXT (t), flags); dump_decl (pp, DECL_NAME (t), flags); pp_cxx_whitespace (pp); pp_cxx_ws_string (pp, "="); |