This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[c++-concepts] small pretty printing fix


This helps improve debug output. When pretty printing template args
including a placeholder, show <placeholder> instead of a dump_expr
error.

2014-06-24  Andrew Sutton  <andrew.n.sutton@gmail.com>
  * gcc/cp/error.C (dump_expr): Pretty print placeholder to improve
  debug output.

Committed as r211942.

Andrew
Index: gcc/cp/error.c
===================================================================
--- gcc/cp/error.c	(revision 211415)
+++ gcc/cp/error.c	(working copy)
@@ -2656,6 +2656,10 @@ dump_expr (cxx_pretty_printer *pp, tree
     case CONSTEXPR_EXPR:
       pp_cxx_constexpr_expr (cxx_pp, t);
 
+    case PLACEHOLDER_EXPR:
+      pp_cxx_ws_string (cxx_pp, "<placeholder>");
+      break;
+
       /*  This list is incomplete, but should suffice for now.
 	  It is very important that `sorry' does not call
 	  `report_error_function'.  That could cause an infinite loop.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]