diff options
author | Mark Mitchell <mark@codesourcery.com> | 2007-03-23 04:39:08 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2007-03-23 04:39:08 +0000 |
commit | 03c17ccd922a49ed07c89b5c533e86318d225c78 (patch) | |
tree | 04bb60b12150172cc4f358b92f60fdf971e33c4d | |
parent | 8b84995aa37df18b21abcf161f23da7f957dc17d (diff) | |
download | gcc-03c17ccd922a49ed07c89b5c533e86318d225c78.zip gcc-03c17ccd922a49ed07c89b5c533e86318d225c78.tar.gz gcc-03c17ccd922a49ed07c89b5c533e86318d225c78.tar.bz2 |
cp-tree.h (current_tempalte_parms): Improve documentation.
* cp-tree.h (current_tempalte_parms): Improve documentation.
* pt.c (current_template_args): Likewise.
From-SVN: r123153
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 8 | ||||
-rw-r--r-- | gcc/cp/pt.c | 6 |
3 files changed, 13 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 523d52b..42a57d0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b9b3500..18f2cfb 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 575057f..69c60b4 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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) |