c++: Clean up previous change [PR41437]
authorPatrick Palka <ppalka@redhat.com>
Tue, 16 Jun 2020 12:21:36 +0000 (08:21 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 16 Jun 2020 12:21:36 +0000 (08:21 -0400)
commit668ef28fbb44c1e51d9c5a35b421903c98d87b03
tree68056ecbe3d4103612be2d73a92a1442cfaa077c
parent92bed036098928cd4659c8990e14cf7ad040e0c2
c++: Clean up previous change [PR41437]

The previous patch mostly avoided making any changes that had no
functional impact, such as adjusting now-outdated comments and
performing renamings.  Such changes have been consolidated to this
followup patch for easier review.

The main change here is that we now reuse struct deferred_access_check
as the element type of the vector TI_TYPEDEFS_NEEDING_ACCESS_CHECKING
(now renamed to TI_DEFERRED_ACCESS_CHECKS, since it may contain any kind
of access check).

gcc/cp/ChangeLog:

PR c++/41437
PR c++/47346
* cp-tree.h (qualified_typedef_usage_s): Delete.
(qualified_typedef_usage_t): Delete.
(deferred_access_check): Move up in file.
(tree_template_info::typedefs_needing_access_checking): Delete.
(tree_template_info::deferred_access_checks): New field.
(TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): Rename to ...
(TI_DEFERRED_ACCESS_CHECKS): ... this, and adjust accordingly.
* pt.c (perform_typedefs_access_check): Rename to ...
(perform_instantiation_time_access_checks): ... this, and adjust
accordingly.  Remove unnecessary tree tests.
(instantiate_class_template_1): Adjust accordingly.
(instantiate_decl): Likewise.
* semantics.c (enforce_access): Likewise.
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c