diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-31 02:50:08 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-31 02:50:08 +0000 |
commit | abcd2504cabc450b2eb467a4918270ed4f97d70a (patch) | |
tree | 424314c23f47f26c9a20d19dc68f81690672bb2e /gcc/cp/decl.c | |
parent | ce61b1b3b9c052593eeb616e4c7caff2f8668dd2 (diff) | |
download | gcc-abcd2504cabc450b2eb467a4918270ed4f97d70a.tar.gz |
* friend.c (make_friend_class): Handle template template parameters.
* parser.c (cp_parser_template_declaration_after_export): Likewise.
* pt.c (tsubst_friend_class): Likewise.
(instantiate_class_template_1): Likewise
* decl.c (check_elaborated_type_specifier): Likewise.
(lookup_and_check_tag): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190828 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 19485fc712c..c909dea1775 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11484,9 +11484,10 @@ check_elaborated_type_specifier (enum tag_types tag_code, type, tag_name (tag_code)); return error_mark_node; } - /* Accept bound template template parameters. */ + /* Accept template template parameters. */ else if (allow_template_p - && TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM) + && (TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM + || TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM)) ; /* [dcl.type.elab] @@ -11574,7 +11575,9 @@ lookup_and_check_tag (enum tag_types tag_code, tree name, else decl = lookup_type_scope (name, scope); - if (decl && DECL_CLASS_TEMPLATE_P (decl)) + if (decl + && (DECL_CLASS_TEMPLATE_P (decl) + || DECL_TEMPLATE_TEMPLATE_PARM_P (decl))) decl = DECL_TEMPLATE_RESULT (decl); if (decl && TREE_CODE (decl) == TYPE_DECL) @@ -11679,6 +11682,9 @@ xref_tag_1 (enum tag_types tag_code, tree name, && template_class_depth (current_class_type) && template_header_p) { + if (TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM) + return t; + /* Since SCOPE is not TS_CURRENT, we are not looking at a definition of this tag. Since, in addition, we are currently processing a (member) template declaration of a template |