aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMatthias Kretz <kretz@kde.org>2021-05-27 17:30:34 +0200
committerJason Merrill <jason@redhat.com>2021-05-27 17:00:38 -0400
commit27e906d5bb2e46e59fe4aa137317f3c8d49ecb44 (patch)
tree5a28fb7e10cd6714def55f7ac102e3ca16d697eb /gcc
parent79e3f7d54bc4e34b096082d3b90042d9f0fbaf1a (diff)
downloadgcc-27e906d5bb2e46e59fe4aa137317f3c8d49ecb44.zip
gcc-27e906d5bb2e46e59fe4aa137317f3c8d49ecb44.tar.gz
gcc-27e906d5bb2e46e59fe4aa137317f3c8d49ecb44.tar.bz2
c++: Add missing scope in typedef diagnostic [PR100763]
dump_type on 'const std::string' should not print 'const string' unless TFF_UNQUALIFIED_NAME is requested. gcc/cp/ChangeLog: PR c++/100763 * error.c: Call dump_scope when printing a typedef.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 3d5eebd..ae78b10 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -501,6 +501,8 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
else
{
pp_cxx_cv_qualifier_seq (pp, t);
+ if (! (flags & TFF_UNQUALIFIED_NAME))
+ dump_scope (pp, CP_DECL_CONTEXT (decl), flags);
pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (t));
return;
}