From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19880 invoked by alias); 16 Jul 2010 20:52:38 -0000 Received: (qmail 19870 invoked by uid 22791); 16 Jul 2010 20:52:37 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jul 2010 20:52:32 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6GKqVTX012801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Jul 2010 16:52:31 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6GKqUWb004831 for ; Fri, 16 Jul 2010 16:52:30 -0400 Message-ID: <4C40C68E.7030908@redhat.com> Date: Fri, 16 Jul 2010 20:52:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100712 Lightning/1.0b1 Shredder/3.0.7pre MIME-Version: 1.0 To: gcc-patches List Subject: C++ PATCH to improve print_tree for TEMPLATE_INFO nodes Content-Type: multipart/mixed; boundary="------------020804090504040904040306" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg01388.txt.bz2 This is a multi-part message in MIME format. --------------020804090504040904040306 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 136 I noticed we weren't doing this, and the default behavior didn't print the TREE_CHAIN. Tested x86_64-pc-linux-gnu, applying to trunk. --------------020804090504040904040306 Content-Type: text/x-patch; name="ptree-template-info.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ptree-template-info.patch" Content-length: 824 commit 8a9510b8fe8fb127ed2f8e3f50e5a97d0a9c92ec Author: Jason Merrill Date: Fri Jul 16 12:19:08 2010 -0400 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO. diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index c2493c7..ee3f52f 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -207,6 +207,15 @@ cxx_print_xnode (FILE *file, tree node, int indent) TEMPLATE_PARM_IDX (node), TEMPLATE_PARM_LEVEL (node), TEMPLATE_PARM_ORIG_LEVEL (node)); break; + case TEMPLATE_INFO: + print_node (file, "template", TI_TEMPLATE (node), indent+4); + print_node (file, "args", TI_ARGS (node), indent+4); + if (TI_PENDING_TEMPLATE_FLAG (node)) + { + indent_to (file, indent + 3); + fprintf (file, "pending_template"); + } + break; default: break; } --------------020804090504040904040306--