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.