diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-23 13:29:50 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-23 13:29:50 +0000 |
commit | b08c380313684bcfc1c94802bc1a266235a1066d (patch) | |
tree | 89a5ca8d719266689c7a82d65e3492021cebf4ec /gcc/cp/cp-objcp-common.c | |
parent | 64a09ce25d776cf58053505feba68011a59249a6 (diff) | |
download | gcc-b08c380313684bcfc1c94802bc1a266235a1066d.tar.gz |
Fix PR c++/14777
gcc/cp/ChangeLog:
PR c++/14777
* cp-tree.def <TEMPLATE_INFO>: Declare new kind of tree
node.
* cp-tree.h (struct tree_template_info,
struct qualified_typedef_usage_s): New.
(cp_tree_node_structure_enum): add TS_CP_TEMPLATE_INFO.
(union lang_tree_node): Add template_info.
(TI_TEMPLATE, TI_ARGS, TI_TYPEDEFS_NEEDING_ACCESS_CHECKING):
Adjust.
(build_template_info): Declare.
(get_types_needing_access_check): Adjust return type.
(add_typedef_to_current_template_for_access_check): Declare.
* cp-objcp-common.c (cp_tree_size): Handle TEMPLATE_INFO.
* semantics.c (add_typedef_to_current_template_for_access_check):
Split from ...
(check_accessibility_of_qualified_id): ... here.
* decl.c (make_typename_type): Use it.
* pt.c (build_template_info): Define.
(check_explicit_specialization, find_parameter_packs_r,
push_template_decl_real, lookup_template_class,
for_each_template_parm_r, tsubst_decl, tsubst): Use
build_template_info.
(get_types_needing_access_check): Adjust return type.
(append_type_to_template_for_access_check_1): Record the
location of the usage point of the typedef. Adjust to TEMPLATE_INFO.
(append_type_to_template_for_access_check): Add new location
parameter. Pass it to append_type_to_template_for_access_check_1.
Adjust to TEMPLATE_INFO.
(perform_typedefs_access_check): Temporarily set input_location to
the usage point of the typedef we are checking access for. Adjust
to new TEMPLATE_INFO tree node.
* tree.c (bind_template_template_parm): Use build_template_info.
* call.c (add_template_candidate_real): Likewise.
* decl.c (grokfndecl): Likewise.
(cp_tree_node_structure): Handle TEMPLATE_INFO.
gcc/testsuite/ChangeLog:
PR c++/14777
* g++.dg/template/typedef13.C: Adjust.
* g++.dg/template/typedef19.C: Adjust.
* g++.dg/template/typedef20.C: Adjust.
* g++.dg/template/typedef22.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154443 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
-rw-r--r-- | gcc/cp/cp-objcp-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index da6f8291ba4..f06ad5b86c8 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -140,6 +140,8 @@ cp_tree_size (enum tree_code code) case LAMBDA_EXPR: return sizeof (struct tree_lambda_expr); + case TEMPLATE_INFO: return sizeof (struct tree_template_info); + default: gcc_unreachable (); } |