summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 3b5cf0acec1..588cbe8e794 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -896,6 +896,18 @@ dump_decl (tree t, int flags)
if (t == NULL_TREE)
return;
+ /* If doing Objective-C++, give Objective-C a chance to demangle
+ Objective-C method names. */
+ if (c_dialect_objc ())
+ {
+ const char *demangled = objc_maybe_printable_name (t, flags);
+ if (demangled)
+ {
+ pp_string (cxx_pp, demangled);
+ return;
+ }
+ }
+
switch (TREE_CODE (t))
{
case TYPE_DECL: