]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cp-tree.h (current_tempalte_parms): Improve documentation.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Mar 2007 04:39:08 +0000 (04:39 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Mar 2007 04:39:08 +0000 (04:39 +0000)
* pt.c (current_template_args): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123153 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c

index 523d52b85f074502580e087c8c3c448427d66381..42a57d035ac8db9ac3badd19fddc07ad2ef671c8 100644 (file)
@@ -1,5 +1,8 @@
 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
 
+       * cp-tree.h (current_tempalte_parms): Improve documentation.
+       * pt.c (current_template_args): Likewise.
+
        PR c++/30863
        * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
        not consume tokens when failing.
index b9b35006643ecdec45fccf2c07b9bab480954c31..18f2cfbc639be9c9a5f6f0b8c634072e41b09b90 100644 (file)
@@ -742,8 +742,12 @@ struct saved_scope GTY(())
 #define current_lang_base scope_chain->lang_base
 #define current_lang_name scope_chain->lang_name
 
-/* Parsing a function declarator leaves a list of parameter names
-   or a chain or parameter decls here.  */
+/* When parsing a template declaration, a TREE_LIST representing the
+   active template parametesr.  Each node in the list represents one
+   level of template parameters.  The innermost level is first in the
+   list.  The depth of each level is stored as an INTEGER_CST in the
+   TREE_PURPOSE of each node.  The parameters for that level are
+   stored in the TREE_VALUE.  */
 
 #define current_template_parms scope_chain->template_parms
 
index 575057fd3ef57ced5bfdaba8266fbd4eeb470ec8..69c60b4f5af25c526570ece61655c60f7b54f577 100644 (file)
@@ -2991,8 +2991,10 @@ end_template_decl (void)
   current_template_parms = TREE_CHAIN (current_template_parms);
 }
 
-/* Given a template argument vector containing the template PARMS.
-   The innermost PARMS are given first.  */
+/* Within the declaration of a template, return all levels of template
+   parameters that apply.  The template parameters are represented as
+   a TREE_VEC, in the form documented in cp-tree.h for template
+   arguments.  */
 
 static tree
 current_template_args (void)