I noticed that debug_tree wasn't printing the types or code of a TRAIT_EXPR, so this fixes that. I'm not bothering to turn the kind into an enum name at the moment.

Tested x86_64-pc-linux-gnu, applying to trunk.
commit 6baa86e88580ee3e4f5a322fc530427169da2227
Author: Jason Merrill <ja...@redhat.com>
Date:   Fri May 15 15:27:51 2015 -0400

    	* ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.

diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 2d0b584..fd71bb4 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -271,6 +271,13 @@ cxx_print_xnode (FILE *file, tree node, int indent)
       print_node (file, "pattern", DEFERRED_NOEXCEPT_PATTERN (node), indent+4);
       print_node (file, "args", DEFERRED_NOEXCEPT_ARGS (node), indent+4);
       break;
+    case TRAIT_EXPR:
+      indent_to (file, indent+4);
+      fprintf (file, "kind %d", TRAIT_EXPR_KIND (node));
+      print_node (file, "type 1", TRAIT_EXPR_TYPE1 (node), indent+4);
+      if (TRAIT_EXPR_TYPE2 (node))
+	print_node (file, "type 2", TRAIT_EXPR_TYPE2 (node), indent+4);
+      break;
     case LAMBDA_EXPR:
       cxx_print_lambda_node (file, node, indent);
       break;

Reply via email to