diff mbox

C++ PATCH to debug_tree of TEMPLATE_PARM_INDEX

Message ID CADzB+2mDqXVE3w5HkoeXKmMXHmZw_KMLfZ1TPqhkA6fj5LWX5g@mail.gmail.com
State New
Headers show

Commit Message

Jason Merrill Oct. 21, 2016, 7:44 p.m. UTC
It was bugging me that the default debug_tree of a TEMPLATE_PARM_INDEX
didn't give the name of the template parameter, so I'm adding the
corresponding _DECL to the dump.
commit 56ee7ba41e0a1b6568f157a77775a82230cb8f57
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Oct 21 15:29:04 2016 -0400

            * ptree.c (cxx_print_xnode) [TEMPLATE_PARM_INDEX]: Dump the decl.
diff mbox

Patch

diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 5726f96..e3e5e33 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -236,6 +236,7 @@  cxx_print_xnode (FILE *file, tree node, int indent)
       print_node (file, "chain", TREE_CHAIN (node), indent+4);
       break;
     case TEMPLATE_PARM_INDEX:
+      print_node (file, "decl", TEMPLATE_PARM_DECL (node), indent+4);
       indent_to (file, indent + 3);
       fprintf (file, "index %d level %d orig_level %d",
 	       TEMPLATE_PARM_IDX (node), TEMPLATE_PARM_LEVEL (node),