diff mbox

[c++-concepts] small pretty printing fix

Message ID CANq5Syvpa2PBPra5Yt=ZnX9zUa5p9_c_W5GZYb2YK=3E-RGsGw@mail.gmail.com
State New
Headers show

Commit Message

Andrew Sutton June 24, 2014, 2:42 p.m. UTC
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
diff mbox

Patch

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.  */