#include "config.h"#include "system.h"#include "obstack.h"#include "tree.h"#include "flags.h"#include "cp-tree.h"#include "tree-inline.h"#include "decl.h"#include "parse.h"#include "lex.h"#include "output.h"#include "except.h"#include "toplev.h"#include "rtl.h"#include "ggc.h"#include "timevar.h"#include "gt-cp-pt.h"

Go to the source code of this file.
Referenced by add_category(), mangle_class_name_for_template(), and objc_comptypes().
| #define ccat | ( | C | ) | obstack_1grow (&scratch_obstack, (C)); |
Referenced by mangle_class_name_for_template().
| #define GTB_IGNORE_TYPE 2 |
Referenced by get_template_base(), and get_template_base_recursive().
| #define GTB_VIA_VIRTUAL 1 |
Referenced by get_template_base_recursive().
| #define UNIFY_ALLOW_DERIVED 4 |
Referenced by type_unification_real(), and unify().
| #define UNIFY_ALLOW_INTEGER 8 |
Referenced by unify().
| #define UNIFY_ALLOW_LESS_CV_QUAL 2 |
Referenced by check_cv_quals_for_unify(), type_unification_real(), and unify().
| #define UNIFY_ALLOW_MAX_CORRECTION 128 |
Referenced by unify().
| #define UNIFY_ALLOW_MORE_CV_QUAL 1 |
Referenced by check_cv_quals_for_unify(), type_unification_real(), and unify().
| #define UNIFY_ALLOW_NONE 0 |
Referenced by get_class_bindings(), more_specialized_fn(), try_class_unification(), type_unification_real(), and unify().
| #define UNIFY_ALLOW_OUTER_LESS_CV_QUAL 64 |
Referenced by check_cv_quals_for_unify(), and unify().
| #define UNIFY_ALLOW_OUTER_LEVEL 16 |
Referenced by type_unification_real(), and unify().
| #define UNIFY_ALLOW_OUTER_MORE_CV_QUAL 32 |
Referenced by check_cv_quals_for_unify(), maybe_adjust_types_for_deduction(), and unify().
Definition at line 596 of file pt.c.
References add_to_template_args(), my_friendly_assert, TMPL_ARGS_DEPTH, and TREE_VEC_LENGTH.
Referenced by coerce_template_parms(), instantiate_template(), lookup_template_class(), more_specialized_class(), push_template_decl_real(), tsubst_friend_function(), and verify_class_unification().
Definition at line 3963 of file pt.c.
References CLASSTYPE_TEMPLATE_INFO, DECL_TEMPLATE_INFO, NULL_TREE, pop_tinst_level(), pt, push_tinst_level(), ti, TI_PENDING_TEMPLATE_FLAG, TINST_DECL, TREE_CHAIN, tree_cons, and TYPE_P.
Referenced by instantiate_decl(), instantiate_template(), and lookup_template_class().
Definition at line 567 of file pt.c.
References i, make_tree_vec, SET_TMPL_ARGS_LEVEL, TMPL_ARGS_DEPTH, and TMPL_ARGS_LEVEL.
Referenced by add_outermost_template_args(), is_specialization_of_friend(), and lookup_template_class().
Definition at line 718 of file pt.c.
Referenced by cp_parser_class_head(), cp_parser_explicit_specialization(), and cp_parser_template_declaration_after_export().
Definition at line 660 of file pt.c.
Referenced by cp_parser_template_declaration_after_export(), cp_parser_template_parameter_list(), and cp_parser_type_parameter().
| static void bt_instantiate_type_proc | ( | binding_entry | entry, | |
| void * | data | |||
| ) | [static] |
Definition at line 9992 of file pt.c.
References CLASSTYPE_TI_ARGS, do_type_instantiation(), IS_AGGR_TYPE, storage, TYPE_MAIN_DECL, and uses_template_parms().
Referenced by do_type_instantiation().
Definition at line 2268 of file pt.c.
References build_lang_decl(), DECL_ASSIGNMENT_OPERATOR_P, DECL_CONSTRUCTOR_P, DECL_CONTEXT, DECL_DESTRUCTOR_P, DECL_LANG_SPECIFIC, DECL_NAME, DECL_NONCONVERTING_P, DECL_OVERLOADED_OPERATOR_P, DECL_STATIC_FUNCTION_P, DECL_TEMPLATE_PARMS, NULL_TREE, and SET_OVERLOADED_OPERATOR_CODE.
Referenced by push_template_decl_real().
| static tree build_template_parm_index | ( | int | index, | |
| int | level, | |||
| int | orig_level, | |||
| tree | decl, | |||
| tree | type | |||
| ) | [static] |
Definition at line 2021 of file pt.c.
References make_node, TEMPLATE_PARM_DECL, TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, TEMPLATE_PARM_ORIG_LEVEL, and TREE_TYPE.
Referenced by process_template_parm(), and reduce_template_parm_level().
| static int can_complete_type_without_circularity | ( | tree | type | ) | [static] |
Definition at line 5186 of file pt.c.
References CLASS_TYPE_P, COMPLETE_TYPE_P, error_mark_node, NULL_TREE, TREE_CODE, TREE_TYPE, TYPE_BEING_DEFINED, TYPE_DOMAIN, and TYPE_MAIN_VARIANT.
Referenced by can_complete_type_without_circularity(), and instantiate_class_template().
Definition at line 8876 of file pt.c.
References cp_type_quals(), POINTER_TYPE_P, TREE_CODE, TYPE_QUAL_CONST, TYPE_QUAL_RESTRICT, TYPE_QUAL_VOLATILE, UNIFY_ALLOW_LESS_CV_QUAL, UNIFY_ALLOW_MORE_CV_QUAL, UNIFY_ALLOW_OUTER_LESS_CV_QUAL, and UNIFY_ALLOW_OUTER_MORE_CV_QUAL.
Referenced by unify().
| static void check_default_tmpl_args | ( | tree | decl, | |
| tree | parms, | |||
| int | is_primary, | |||
| int | is_partial | |||
| ) | [static] |
Definition at line 2530 of file pt.c.
References CP_DECL_CONTEXT, current_class_type, DECL_CONTEXT, DECL_FRIEND_CONTEXT, DECL_FUNCTION_MEMBER_P, DECL_INITIALIZED_IN_CLASS_P, DECL_LANG_SPECIFIC, error(), error_mark_node, i, msg, NULL_TREE, same_type_p, template_class_depth(), TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, and TYPE_BEING_DEFINED.
Referenced by push_template_decl_real().
Definition at line 686 of file pt.c.
References current_scope(), current_template_parms, error(), and TREE_CODE.
Referenced by begin_specialization().
Definition at line 1979 of file pt.c.
Referenced by push_class_level_binding(), pushdecl(), pushdecl_maybe_friend(), and start_method().
Definition at line 3934 of file pt.c.
References CLASSTYPE_TEMPLATE_INFO, CLASSTYPE_TEMPLATE_SPECIALIZATION, CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, DECL_INNERMOST_TEMPLATE_PARMS, DECL_NAME, get_identifier(), IDENTIFIER_POINTER, IDENTIFIER_TEMPLATE, mangle_class_name_for_template(), most_general_template(), PRIMARY_TEMPLATE_P, and TYPE_IDENTIFIER.
Referenced by lookup_template_class(), and push_template_decl_real().
| static tree coerce_template_parms | ( | tree | parms, | |
| tree | args, | |||
| tree | in_decl, | |||
| tsubst_flags_t | complain, | |||
| int | require_all_arguments | |||
| ) | [static] |
Definition at line 3703 of file pt.c.
References add_outermost_template_args(), convert_template_argument(), cp_error_at(), error(), error_mark_node, i, INNERMOST_TEMPLATE_ARGS, make_tree_vec, my_friendly_assert, NULL_TREE, NUM_TMPL_ARGS, tf_error, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, tsubst(), and tsubst_expr().
Referenced by fn_type_unification(), get_bindings(), get_bindings_real(), lookup_template_class(), and unify().
| static int coerce_template_template_parms | ( | tree | parm_parms, | |
| tree | arg_parms, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl, | |||
| tree | outer_args | |||
| ) | [static] |
Definition at line 3406 of file pt.c.
References abort, DECL_INNERMOST_TEMPLATE_PARMS, error_mark_node, i, my_friendly_assert, NULL_TREE, same_type_p, TREE_CODE, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, and tsubst().
Referenced by coerce_template_template_parms(), and convert_template_argument().
Definition at line 3821 of file pt.c.
Referenced by comptypes(), get_class_bindings(), lookup_template_class(), process_partial_specialization(), register_specialization(), retrieve_specialization(), template_args_equal(), and verify_class_unification().
Definition at line 1926 of file pt.c.
Referenced by add_method(), check_classfn(), comptypes(), decls_match(), duplicate_decls(), is_specialization_of_friend(), and make_unbound_class_template().
Definition at line 3050 of file pt.c.
References abort, at_least_as_qualified_p(), build1, build_unary_op(), cxx_mark_addressable(), decay_conversion(), decl_constant_value(), DECL_EXTERNAL_LINKAGE_P, digest_init(), error(), error_mark_node, instantiate_type(), INTEGRAL_TYPE_P, is_overloaded_fn(), make_ptrmem_cst(), my_friendly_assert, NULL_TREE, perform_qualification_conversions(), PTRMEM_CST_MEMBER, real_lvalue_p(), really_overloaded_fn(), same_type_p, STRIP_NOPS, tf_none, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, TREE_TYPE, TYPE_MAIN_VARIANT, TYPE_PTR_P, TYPE_PTRMEM_P, TYPE_PTRMEMFUNC_P, and unknown_type_node.
Referenced by convert_template_argument().
| static tree convert_template_argument | ( | tree | parm, | |
| tree | arg, | |||
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| int | i, | |||
| tree | in_decl | |||
| ) | [static] |
Definition at line 3484 of file pt.c.
References CLASSTYPE_IS_TEMPLATE, CLASSTYPE_TI_TEMPLATE, coerce_template_template_parms(), convert_nontype_argument(), current_class_type, DECL_INNERMOST_TEMPLATE_PARMS, DECL_NAME, DECL_TEMPLATE_RESULT, DECL_TEMPLATE_TEMPLATE_PARM_P, error(), error_mark_node, groktypename(), INNERMOST_TEMPLATE_ARGS, invalid_nontype_parm_type_p(), is_base_of_enclosing_class(), make_typename_type(), maybe_fold_nontype_arg(), no_linkage_check(), NULL_TREE, pedwarn(), processing_template_decl, tf_error, TREE_CODE, TREE_OPERAND, TREE_TYPE, TREE_VALUE, tsubst(), TYPE_ANONYMOUS_P, TYPE_P, TYPE_STUB_DECL, unknown_type_node, uses_template_parms(), val, and variably_modified_type_p().
Referenced by coerce_template_parms().
Definition at line 1374 of file pt.c.
References build_cplus_method_type(), build_exception_variant(), build_function_type(), build_type_attribute_variant(), copy_default_args_to_explicit_spec_1(), DECL_HAS_IN_CHARGE_PARM_P, DECL_HAS_VTT_PARM_P, DECL_NONSTATIC_MEMBER_FUNCTION_P, DECL_TEMPLATE_RESULT, DECL_TI_TEMPLATE, hash_tree_cons(), NULL_TREE, TREE_CHAIN, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, TYPE_ATTRIBUTES, and TYPE_RAISES_EXCEPTIONS.
Referenced by check_explicit_specialization().
Definition at line 1338 of file pt.c.
References hash_tree_cons(), NULL_TREE, TREE_CHAIN, TREE_PURPOSE, TREE_VALUE, and void_list_node.
Referenced by copy_default_args_to_explicit_spec(), and copy_default_args_to_explicit_spec_1().
Definition at line 10847 of file pt.c.
Referenced by maybe_print_instantiation_context(), print_instantiation_context(), and print_instantiation_full_context().
Definition at line 2216 of file pt.c.
Referenced by grokdeclarator(), grokoptypename(), lookup_template_class(), and push_template_decl_real().
| static tree determine_specialization | ( | tree | template_id, | |
| tree | decl, | |||
| tree* | targs_out, | |||
| int | need_member_template | |||
| ) | [static] |
Definition at line 1126 of file pt.c.
References BASELINK_FUNCTIONS, BASELINK_P, chainon(), compparms(), copy_node, cp_error_at(), DECL_ARTIFICIAL, DECL_FUNCTION_MEMBER_P, DECL_NONSTATIC_MEMBER_FUNCTION_P, DECL_STATIC_FUNCTION_P, DECL_TEMPLATE_INFO, DECL_TEMPLATE_RESULT, DECL_TI_ARGS, DECL_TI_TEMPLATE, error(), error_mark_node, get_bindings(), is_overloaded_fn(), list_length(), most_specialized(), NULL_TREE, OVL_CURRENT, OVL_NEXT, print_candidates(), same_type_p, SET_TMPL_ARGS_LEVEL, TMPL_ARGS_DEPTH, TMPL_ARGS_HAVE_MULTIPLE_LEVELS, TREE_CHAIN, TREE_CODE, tree_cons, TREE_OPERAND, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, and TYPE_ARG_TYPES.
Referenced by check_explicit_specialization(), and tsubst_friend_function().
| void do_type_instantiation | ( | tree | t, | |
| tree | storage, | |||
| tsubst_flags_t | complain | |||
| ) |
Definition at line 10007 of file pt.c.
Referenced by bt_instantiate_type_proc(), and cp_parser_explicit_instantiation().
Definition at line 729 of file pt.c.
Referenced by cp_parser_class_head(), cp_parser_explicit_specialization(), and finish_template_decl().
Definition at line 2198 of file pt.c.
Referenced by finish_template_decl(), and finish_template_template_parm().
Definition at line 2172 of file pt.c.
Referenced by cp_parser_template_declaration_after_export(), cp_parser_template_parameter_list(), and cp_parser_type_parameter().
Definition at line 270 of file pt.c.
Referenced by cp_parser_template_declaration_after_export(), and finish_member_class_template().
| int fn_type_unification | ( | tree | fn, | |
| tree | explicit_targs, | |||
| tree | targs, | |||
| tree | args, | |||
| tree | return_type, | |||
| unification_kind_t | strict, | |||
| int | len | |||
| ) |
Definition at line 8108 of file pt.c.
Referenced by add_template_candidate_real(), get_bindings(), get_bindings_real(), and resolve_address_of_overloaded_function().
Definition at line 4719 of file pt.c.
References pair_fn_data::data, pair_fn_data::fn, for_each_template_parm_r(), htab_create(), htab_delete(), htab_eq_pointer, htab_hash_pointer, NULL, NULL_TREE, result, pair_fn_data::visited, and walk_tree().
Referenced by for_each_template_parm_r(), process_partial_specialization(), push_template_decl_real(), uses_template_parms(), and uses_template_parms_level().
Definition at line 4538 of file pt.c.
References BASELINK_FUNCTIONS, pair_fn_data::data, DECL_CONTEXT, DECL_LANG_SPECIFIC, DECL_TEMPLATE_INFO, DECL_TEMPLATE_TEMPLATE_PARM_P, DECL_TI_ARGS, error_mark_node, pair_fn_data::fn, for_each_template_parm(), htab_find_slot(), INSERT, NULL_TREE, TREE_CHAIN, TREE_CODE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, TYPE_CONTEXT, TYPE_METHOD_BASETYPE, TYPE_P, TYPE_PTRMEMFUNC_FN_TYPE, TYPE_PTRMEMFUNC_P, TYPE_TEMPLATE_INFO, TYPE_TI_ARGS, TYPENAME_TYPE_FULLNAME, and pair_fn_data::visited.
Referenced by for_each_template_parm().
Definition at line 9621 of file pt.c.
References DEDUCE_EXACT, and get_bindings_real().
Referenced by determine_specialization(), most_specialized(), most_specialized_instantiation(), and resolve_overloaded_unification().
Definition at line 9631 of file pt.c.
References DEDUCE_EXACT, and get_bindings_real().
Referenced by resolve_overloaded_unification().
| static tree get_bindings_real | ( | tree | fn, | |
| tree | decl, | |||
| tree | explicit_args, | |||
| int | check_rettype, | |||
| int | deduce, | |||
| int | len | |||
| ) | [static] |
Definition at line 9564 of file pt.c.
References coerce_template_parms(), DECL_CONV_FN_P, DECL_INNERMOST_TEMPLATE_PARMS, DECL_NONSTATIC_MEMBER_FUNCTION_P, DECL_NTPARMS, DECL_TEMPLATE_INFO, DECL_TI_TEMPLATE, error_mark_node, fn_type_unification(), i, make_tree_vec, NULL_TREE, tf_none, TREE_CHAIN, TREE_TYPE, tsubst(), TYPE_ARG_TYPES, and uses_template_parms().
Referenced by get_bindings(), get_bindings_overload(), more_specialized(), and most_specialized_instantiation().
Definition at line 9653 of file pt.c.
References i, INNERMOST_TEMPLATE_ARGS, make_tree_vec, NULL_TREE, TREE_VEC_ELT, TREE_VEC_LENGTH, unify(), UNIFY_ALLOW_NONE, vec, and verify_class_unification().
Referenced by instantiate_class_template(), more_specialized_class(), and most_specialized_class().
Definition at line 626 of file pt.c.
Referenced by instantiate_decl(), regenerate_decl_from_template(), and tsubst_decl().
Definition at line 10769 of file pt.c.
Referenced by write_encoding(), and write_unqualified_name().
Definition at line 8826 of file pt.c.
References complete_type(), dfs_unmark(), dfs_walk(), get_template_base_recursive(), GTB_IGNORE_TYPE, IS_AGGR_TYPE_CODE, markedp(), my_friendly_assert, NULL_TREE, TREE_CODE, and TYPE_BINFO.
Referenced by unify().
| static tree get_template_base_recursive | ( | tree | tparms, | |
| tree | targs, | |||
| tree | parm, | |||
| tree | arg_binfo, | |||
| tree | rval, | |||
| int | flags | |||
| ) | [static] |
Definition at line 8750 of file pt.c.
References BINFO_BASETYPES, BINFO_MARKED, BINFO_TYPE, error_mark_node, GTB_IGNORE_TYPE, GTB_VIA_VIRTUAL, i, r, same_type_p, SET_BINFO_MARKED, TREE_VEC_ELT, TREE_VEC_LENGTH, TREE_VIA_VIRTUAL, and try_class_unification().
Referenced by get_template_base(), and get_template_base_recursive().
| static GTY | ( | () | ) | [static] |
| static int inline_needs_template_parms | ( | tree | decl | ) | [static] |
Definition at line 379 of file pt.c.
References DECL_TEMPLATE_INFO, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_SPECIALIZATION, most_general_template(), processing_template_decl, and TMPL_PARMS_DEPTH.
Referenced by maybe_begin_member_template_processing().
Definition at line 5202 of file pt.c.
Referenced by build_new_op(), complete_type(), instantiate_pending_templates(), and prep_operand().
Definition at line 10245 of file pt.c.
References abort, add_pending_template(), at_eof, cp_finish_decl(), DECL_ARGUMENTS, DECL_CLONED_FUNCTION, DECL_CLONED_FUNCTION_P, DECL_EXPLICIT_INSTANTIATION, DECL_EXTERNAL, DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION, DECL_IN_AGGR_P, DECL_INITIAL, DECL_INITIALIZED_IN_CLASS_P, DECL_INLINE, DECL_INTERFACE_KNOWN, DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, DECL_NAMESPACE_SCOPE_P, DECL_NOT_REALLY_EXTERN, DECL_SAVED_TREE, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_TEMPLATE_INFO, DECL_TEMPLATE_INSTANTIATED, DECL_TEMPLATE_INSTANTIATION, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT, DECL_TEMPLATE_SPECIALIZATION, DECL_TI_ARGS, DECL_TI_TEMPLATE, expand_body(), finish_function(), flag_alt_external_templates, flag_external_templates, get_innermost_template_args(), global_bindings_p(), htab_create(), htab_delete(), htab_eq_pointer, htab_hash_pointer, import_export_decl(), input_filename, interface_unknown, lineno, most_general_template(), my_friendly_assert, NULL, NULL_RTX, NULL_TREE, out, pedwarn(), pop_access_scope(), pop_from_top_level(), pop_tinst_level(), push_access_scope(), push_tinst_level(), push_to_top_level(), regenerate_decl_from_template(), repo_template_used(), retrieve_specialization(), SET_DECL_RTL, SF_PRE_PARSED, start_function(), tf_error, tf_warning, TI_PENDING_TEMPLATE_FLAG, timevar_pop, timevar_push, TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, TREE_TYPE, tsubst(), tsubst_expr(), TYPE_RAISES_EXCEPTIONS, and warn_if_unknown_interface().
Referenced by cp_cannot_inline_tree_fn(), do_decl_instantiation(), do_type_instantiation(), instantiate_class_member(), instantiate_decl(), instantiate_decls(), instantiate_decls_1(), instantiate_expr(), instantiate_pending_templates(), and mark_used().
| int instantiate_pending_templates | ( | ) |
Definition at line 10587 of file pt.c.
References CLASSTYPE_TEMPLATE_INSTANTIATION, COMPLETE_TYPE_P, DECL_ARTIFICIAL, DECL_TEMPLATE_INSTANTIATED, DECL_TEMPLATE_SPECIALIZATION, instantiate_class_template(), instantiate_decl(), last, NULL_TREE, reopen_tinst_level(), TREE_CHAIN, TREE_PURPOSE, TREE_VALUE, TYPE_METHODS, and TYPE_P.
Referenced by cp_finish_file(), and finish_file().
Definition at line 7967 of file pt.c.
References abort, add_outermost_template_args(), add_pending_template(), clone_function_decl(), DECL_CLONED_FUNCTION, DECL_CLONED_FUNCTION_P, DECL_CONTEXT, decl_function_context(), DECL_NAME, DECL_NTPARMS, DECL_TEMPLATE_RESULT, DECL_TI_ARGS, DECL_TI_TEMPLATE, error(), error_mark_node, flag_external_templates, i, INNERMOST_TEMPLATE_ARGS, IS_AGGR_TYPE, len, most_general_template(), my_friendly_assert, NULL_TREE, pop_access_scope(), retrieve_specialization(), target_type(), tf_error, TREE_CHAIN, TREE_CODE, TREE_VEC_ELT, tsubst(), TYPE_MAIN_DECL, and TYPE_P.
Referenced by add_template_candidate_real(), check_explicit_specialization(), instantiate_template(), resolve_address_of_overloaded_function(), and tsubst_friend_function().
| static int invalid_nontype_parm_type_p | ( | tree | type, | |
| tsubst_flags_t | complain | |||
| ) | [static] |
Definition at line 10857 of file pt.c.
References error(), INTEGRAL_TYPE_P, POINTER_TYPE_P, tf_error, TREE_CODE, TYPE_PTRMEM_P, and TYPE_PTRMEMFUNC_P.
Referenced by convert_template_argument(), process_template_parm(), and tsubst_template_parms().
| int is_member_template | ( | tree | t | ) |
Definition at line 516 of file pt.c.
References DECL_CONTEXT, decl_function_context(), DECL_FUNCTION_MEMBER_P, DECL_FUNCTION_TEMPLATE_P, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT, template_class_depth(), and TMPL_PARMS_DEPTH.
Referenced by check_classfn(), copy_fn_p(), push_template_decl_real(), and tsubst_copy().
Definition at line 5656 of file pt.c.
References NULL_TREE, TREE_CHAIN, TREE_VALUE, and TYPE_MAIN_VARIANT.
Referenced by list_eq().
| tree lookup_template_class | ( | tree | d1, | |
| tree | arglist, | |||
| tree | in_decl, | |||
| tree | context, | |||
| int | entering_scope, | |||
| tsubst_flags_t | complain | |||
| ) |
Definition at line 4081 of file pt.c.
Referenced by finish_template_type(), lookup_namespace_name(), make_typename_type(), resolve_typename_type(), tsubst(), and tsubst_aggr_type().
Definition at line 4003 of file pt.c.
Referenced by build_expr_from_tree(), check_explicit_specialization(), cp_parser_template_id(), finish_class_member_access_expr(), lookup_namespace_name(), tsubst_copy(), tsubst_copy_and_build(), tsubst_friend_function(), and tsubst_qualified_id().
| static char* mangle_class_name_for_template | ( | char * | name, | |
| tree | parms, | |||
| tree | arglist | |||
| ) | const [static] |
Definition at line 3844 of file pt.c.
References cat, ccat, CLASS_TYPE_P, decl_as_string(), DECL_CONTEXT, DECL_NAME, expr_as_string(), gcc_obstack_init, i, IDENTIFIER_POINTER, INNERMOST_TEMPLATE_ARGS, my_friendly_assert, NULL_TREE, obstack_alloc, obstack_base, obstack_blank_fast, obstack_free, obstack_next_free, offset, TFF_CHASE_TYPEDEF, TFF_PLAIN_IDENTIFIER, TREE_CODE, TREE_PURPOSE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, and type_as_string().
Referenced by classtype_mangled_name().
Definition at line 9974 of file pt.c.
Referenced by do_type_instantiation(), and repo_template_used().
Definition at line 9453 of file pt.c.
Referenced by do_decl_instantiation(), do_type_instantiation(), instantiate_class_member(), and repo_template_used().
Definition at line 2318 of file pt.c.
References template_parm_data::arg_uses_template_parms, template_parm_data::current_arg, idx, template_parm_data::level, template_parm_data::parms, TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, TEMPLATE_TYPE_IDX, TEMPLATE_TYPE_LEVEL, and TREE_CODE.
Referenced by process_partial_specialization().
| static int maybe_adjust_types_for_deduction | ( | unification_kind_t | strict, | |
| tree* | parm, | |||
| tree* | arg | |||
| ) | [static] |
Definition at line 8206 of file pt.c.
References abort, build_pointer_type(), DEDUCE_CALL, DEDUCE_CONV, DEDUCE_EXACT, DEDUCE_ORDER, result, obstack::temp, TREE_CODE, TREE_TYPE, TYPE_MAIN_VARIANT, and UNIFY_ALLOW_OUTER_MORE_CV_QUAL.
Referenced by try_one_overload(), and type_unification_real().
Definition at line 449 of file pt.c.
Referenced by cp_parser_class_specifier(), cp_parser_late_parsing_for_member(), do_pending_defargs(), start_function(), and start_preparsed_function().
Definition at line 1882 of file pt.c.
References error(), template_class_depth_real(), and TYPE_CONTEXT.
Referenced by maybe_process_template_type_declaration().
Definition at line 482 of file pt.c.
Referenced by cp_parser_class_specifier(), cp_parser_late_parsing_for_member(), do_pending_defargs(), and finish_function().
Definition at line 5675 of file pt.c.
References build_expr_from_tree(), fold(), processing_template_decl, TREE_TYPE, TYPE_P, and uses_template_parms().
Referenced by convert_template_argument(), tsubst(), tsubst_copy(), tsubst_template_arg_vector(), and tsubst_template_parms().
Definition at line 4049 of file pt.c.
References CLASS_TYPE_P, CLASSTYPE_TEMPLATE_INFO, CLASSTYPE_TI_TEMPLATE, DECL_ARTIFICIAL, NULL_TREE, TREE_CODE, and TREE_TYPE.
Referenced by cp_parser_template_name(), lookup_template_class(), and tsubst_friend_class().
Definition at line 776 of file pt.c.
Referenced by begin_class_definition(), cp_parser_class_head(), finish_member_class_template(), and shadow_tag().
Definition at line 9507 of file pt.c.
References DECL_TEMPLATE_RESULT, get_bindings_real(), NULL_TREE, and winner.
Referenced by joust(), and most_specialized_instantiation().
Definition at line 9760 of file pt.c.
Referenced by check_explicit_specialization(), classtype_mangled_name(), dump_function_decl(), get_mostly_instantiated_function_type(), inline_needs_template_parms(), instantiate_class_template(), instantiate_decl(), instantiate_template(), lookup_template_class(), maybe_begin_member_template_processing(), maybe_process_partial_specialization(), most_specialized_class(), pp_cxx_template_declaration(), push_template_decl_real(), regenerate_decl_from_template(), try_class_unification(), tsubst_decl(), tsubst_friend_function(), WFE_Expand_Decl(), and WFE_Process_Template_Decl().
Definition at line 9725 of file pt.c.
References get_bindings(), most_specialized_instantiation(), NULL_TREE, TREE_CHAIN, tree_cons, and TREE_VALUE.
Referenced by determine_specialization().
Definition at line 9807 of file pt.c.
References DECL_TEMPLATE_SPECIALIZATIONS, error_mark_node, get_class_bindings(), more_specialized_class(), most_general_template(), NULL_TREE, TREE_CHAIN, tree_cons, TREE_PURPOSE, TREE_TYPE, and TREE_VALUE.
Referenced by instantiate_class_template().
Definition at line 9681 of file pt.c.
Referenced by determine_specialization(), most_specialized(), and resolve_address_of_overloaded_function().
| static void note_template_header | ( | int | specialization | ) | [static] |
Definition at line 749 of file pt.c.
References processing_specialization.
Referenced by begin_specialization(), and begin_template_parm_list().
Definition at line 249 of file pt.c.
References current_function_decl, DECL_CLASS_SCOPE_P, DECL_FUNCTION_TEMPLATE_P, pop_from_top_level(), pop_nested_class(), TREE_CHAIN, TREE_CODE, and TREE_VALUE.
Referenced by get_mostly_instantiated_function_type(), instantiate_decl(), instantiate_template(), regenerate_decl_from_template(), and tsubst_default_argument().
Definition at line 4813 of file pt.c.
Referenced by add_pending_template(), cp_end_inlining(), instantiate_class_template(), instantiate_decl(), and reopen_tinst_level().
Definition at line 1093 of file pt.c.
Referenced by build_method_call(), build_new_1(), cp_parser_class_name(), cp_parser_lookup_name(), cp_parser_nested_name_specifier_opt(), determine_specialization(), finish_id_expression(), hack_identifier(), lookup_member(), qualified_name_lookup_error(), and resolve_address_of_overloaded_function().
| int problematic_instantiation_changed | ( | void | ) |
Definition at line 2351 of file pt.c.
References alloca, template_parm_data::arg_uses_template_parms, CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, comp_template_args(), template_parm_data::current_arg, current_template_parms, DECL_INNERMOST_TEMPLATE_PARMS, DECL_NTPARMS, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_SPECIALIZATIONS, error(), for_each_template_parm(), i, INNERMOST_TEMPLATE_ARGS, INNERMOST_TEMPLATE_PARMS, template_parm_data::level, mark_template_parm(), memset, my_friendly_assert, NULL, template_parm_data::parms, PTR, retrieve_specialization(), TMPL_PARMS_DEPTH, TREE_CODE, tree_cons, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, and TYPE_P.
Referenced by push_template_decl_real().
Definition at line 2079 of file pt.c.
References build_decl, build_template_parm_index(), build_tree_list, chainon(), class_type_node, DECL_ARTIFICIAL, DECL_INITIAL, DECL_NAME, DECL_TEMPLATE_RESULT, grokdeclarator(), idx, invalid_nontype_parm_type_p(), make_aggr_type(), my_friendly_assert, NULL, p, PARM, processing_template_decl, pushdecl(), SET_DECL_TEMPLATE_PARM_P, TEMPLATE_PARM_IDX, TEMPLATE_TYPE_IDX, TEMPLATE_TYPE_PARM_INDEX, TREE_CODE, tree_last(), TREE_PURPOSE, TREE_READONLY, TREE_TYPE, TREE_VALUE, TYPE_MAIN_VARIANT, TYPE_NAME, TYPE_STUB_DECL, and void_type_node.
Referenced by cp_parser_template_parameter_list().
Definition at line 239 of file pt.c.
References NULL_TREE.
Referenced by get_mostly_instantiated_function_type(), instantiate_decl(), instantiate_template(), regenerate_decl_from_template(), and tsubst_default_argument().
Definition at line 395 of file pt.c.
References abort, build_decl, current_template_parms, DECL_ARTIFICIAL, DECL_INITIAL, DECL_NAME, DECL_P, i, my_friendly_assert, processing_template_decl, pushdecl(), pushlevel(), SET_DECL_TEMPLATE_PARM_P, size_int, TEMPLATE_PARMS_FOR_INLINE, TREE_CHAIN, TREE_CODE, tree_cons, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, and TREE_VEC_LENGTH.
Referenced by maybe_begin_member_template_processing(), and push_inline_template_parms_recursive().
Definition at line 2956 of file pt.c.
Referenced by build_self_reference(), cp_parser_class_head(), do_friend(), finish_handler_parms(), grokfield(), handle_class_head(), maybe_process_partial_specialization(), start_decl(), start_function(), start_method(), and start_preparsed_function().
Definition at line 2699 of file pt.c.
Referenced by do_friend(), maybe_process_template_type_declaration(), and push_template_decl().
| int push_tinst_level | ( | tree | d | ) |
Definition at line 4773 of file pt.c.
Referenced by add_pending_template(), cp_start_inlining(), instantiate_class_template(), and instantiate_decl().
Definition at line 2969 of file pt.c.
Referenced by push_template_decl_real(), tsubst_friend_class(), and xref_tag().
Definition at line 2044 of file pt.c.
References build_decl, build_template_parm_index(), DECL_ARTIFICIAL, DECL_NAME, DECL_TEMPLATE_PARMS, NULL_TREE, SET_DECL_TEMPLATE_PARM_P, TEMPLATE_PARM_DECL, TEMPLATE_PARM_DESCENDANTS, TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, TEMPLATE_PARM_ORIG_LEVEL, and TREE_CODE.
Referenced by tsubst().
Definition at line 10168 of file pt.c.
References COPY_DECL_ASSEMBLER_NAME, COPY_DECL_RTL, DECL_CONTEXT, DECL_INITIAL, DECL_INITIALIZED_IN_CLASS_P, DECL_TEMPLATE_RESULT, DECL_TI_ARGS, DECL_TI_TEMPLATE, DECL_USE_TEMPLATE, duplicate_decls(), error_mark_node, most_general_template(), my_friendly_assert, NULL_TREE, pop_access_scope(), register_specialization(), reregister_specialization(), tf_error, TREE_CODE, tsubst(), and tsubst_expr().
Referenced by instantiate_decl().
Definition at line 1080 of file pt.c.
References htab_find_slot(), and INSERT.
Referenced by instantiate_decl(), and tsubst_decl().
Definition at line 949 of file pt.c.
References comp_template_args(), DECL_EXPLICIT_INSTANTIATION, DECL_INITIAL, DECL_TEMPLATE_INSTANTIATION, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_SPECIALIZATION, DECL_TEMPLATE_SPECIALIZATIONS, DECL_TI_ARGS, duplicate_decls(), error(), my_friendly_assert, NULL_TREE, s, TMPL_ARGS_DEPTH, TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, tree_cons, TREE_PURPOSE, TREE_USED, TREE_VALUE, and uses_template_parms().
Referenced by check_explicit_specialization(), push_template_decl_real(), regenerate_decl_from_template(), and tsubst_decl().
Definition at line 4833 of file pt.c.
References pop_tinst_level(), and TREE_CHAIN.
Referenced by instantiate_pending_templates().
Definition at line 1057 of file pt.c.
References DECL_TEMPLATE_SPECIALIZATIONS, NULL_TREE, s, TREE_CHAIN, and TREE_VALUE.
Referenced by duplicate_decls(), regenerate_decl_from_template(), and tsubst_friend_function().
Definition at line 739 of file pt.c.
Referenced by begin_class_definition(), begin_function_definition(), cp_parser_function_definition_from_specifiers_and_declarator(), end_specialization(), and end_template_decl().
| static int resolve_overloaded_unification | ( | tree | tparms, | |
| tree | targs, | |||
| tree | parm, | |||
| tree | arg, | |||
| unification_kind_t | strict, | |||
| int | sub_strict | |||
| ) | [static] |
Definition at line 8487 of file pt.c.
References abort, BASELINK_FUNCTIONS, BASELINK_P, copy_node, DECL_TEMPLATE_RESULT, get_bindings_overload(), i, NULL_TREE, OVL_CURRENT, OVL_NEXT, tf_none, TREE_CODE, TREE_OPERAND, TREE_TYPE, TREE_VEC_ELT, TREE_VEC_LENGTH, try_one_overload(), and tsubst().
Referenced by type_unification_real().
Definition at line 906 of file pt.c.
References htab_find().
Referenced by tsubst_copy(), and tsubst_decl().
Definition at line 880 of file pt.c.
References comp_template_args(), DECL_TEMPLATE_PARMS, DECL_TEMPLATE_SPECIALIZATIONS, my_friendly_assert, NULL_TREE, s, TMPL_ARGS_DEPTH, TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, and TREE_VALUE.
Referenced by instantiate_decl(), instantiate_template(), lookup_template_class(), process_partial_specialization(), register_specialization(), retrieve_specialization(), and tsubst_decl().
Definition at line 10718 of file pt.c.
References access_private_node, access_protected_node, access_public_node, current_access_specifier, TREE_PRIVATE, and TREE_PROTECTED.
Referenced by instantiate_class_template(), lookup_template_class(), and tsubst_enum().
Definition at line 3800 of file pt.c.
References comp_template_args(), cp_tree_equal(), same_type_p, TREE_CODE, and TYPE_P.
Referenced by comp_template_args(), try_one_overload(), and unify().
| int template_class_depth | ( | tree | type | ) |
Definition at line 369 of file pt.c.
Referenced by add_method(), check_classfn(), check_default_tmpl_args(), determine_visibility(), do_friend(), grokdeclarator(), grokfndecl(), handle_class_head(), is_member_template(), is_specialization_of_friend(), make_friend_class(), push_template_decl_real(), start_decl(), and xref_tag().
| static int template_class_depth_real | ( | tree | type, | |
| int | count_specializations | |||
| ) | [static] |
Definition at line 330 of file pt.c.
References CLASSTYPE_TEMPLATE_INFO, CLASSTYPE_TEMPLATE_SPECIALIZATION, CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, CP_DECL_CONTEXT, DECL_TEMPLATE_INFO, DECL_TEMPLATE_SPECIALIZATION, DECL_TI_ARGS, DECL_TI_TEMPLATE, PRIMARY_TEMPLATE_P, TREE_CODE, TYPE_CONTEXT, and uses_template_parms().
Referenced by maybe_check_template_type(), and template_class_depth().
| static int template_decl_level | ( | tree | decl | ) | [static] |
Definition at line 8853 of file pt.c.
References abort, DECL_INITIAL, TEMPLATE_PARM_LEVEL, TEMPLATE_TYPE_LEVEL, TREE_CODE, and TREE_TYPE.
Referenced by unify().
Definition at line 2677 of file pt.c.
References template_parm_data::level, TEMPLATE_PARM_LEVEL, TEMPLATE_TYPE_LEVEL, and TREE_CODE.
Referenced by push_template_decl_real(), and uses_template_parms_level().
| tree tinst_for_decl | ( | ) |
Definition at line 4850 of file pt.c.
References p, and TREE_CHAIN.
Referenced by extract_interface_info(), and warn_if_unknown_interface().
Definition at line 8692 of file pt.c.
References CLASSTYPE_TEMPLATE_INFO, CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, make_tree_vec, most_general_template(), NULL_TREE, TREE_VEC_LENGTH, unify(), and UNIFY_ALLOW_NONE.
Referenced by get_template_base(), get_template_base_recursive(), and unify().
| static int try_one_overload | ( | tree | tparms, | |
| tree | orig_targs, | |||
| tree | targs, | |||
| tree | parm, | |||
| tree | arg, | |||
| unification_kind_t | strict, | |||
| int | sub_strict, | |||
| bool | addr_p | |||
| ) | [static] |
Definition at line 8585 of file pt.c.
References build_pointer_type(), build_ptrmemfunc_type(), i, make_tree_vec, maybe_adjust_types_for_deduction(), NULL_TREE, template_args_equal(), TREE_CODE, TREE_VEC_ELT, TREE_VEC_LENGTH, unify(), and uses_template_parms().
Referenced by resolve_overloaded_unification().
| tree tsubst | ( | tree | t, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl | |||
| ) |
Definition at line 6607 of file pt.c.
References abort, add_exception_specifier(), BINFO_BASETYPES, BINFO_TYPE, BINFO_VIRTUALS, BINFO_VTABLE, build(), build_cplus_array_type(), build_cplus_method_type(), build_exception_variant(), build_min(), build_nt(), build_offset_type(), build_pointer_type(), build_ptrmemfunc_type(), build_reference_type(), CALL_DECLARATOR_EXCEPTION_SPEC, CALL_DECLARATOR_PARMS, CALL_DECLARATOR_QUALS, char_type_node, complete_type(), COMPLETE_TYPE_P, COMPLEX_TYPE, compute_array_index_type(), copy_node, copy_type, cp_build_qualified_type_real(), cp_type_quals(), current_function_decl, cxx_incomplete_type_error, decl_constant_value(), DECL_CONTEXT, DECL_P, error(), error_mark_node, f, fold(), hash_tree_cons(), IDENTIFIER_TYPE_VALUE, idx, input_filename, INT_CST_LT, integer_one_node, integer_type_node, integer_zero_node, integer_zerop(), IS_AGGR_TYPE, layout_type(), lineno, lookup_template_class(), make_call_declarator(), make_node, make_pointer_declarator(), make_reference_declarator(), make_typename_type(), make_unbound_class_template(), max, maybe_fold_nontype_arg(), my_friendly_assert, NULL_TREE, pedantic, pedwarn(), processing_template_decl, r, reduce_template_parm_level(), result, size_zero_node, sizetype, sorry(), TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, template_substituted(), TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO, TEMPLATE_TYPE_DECL, TEMPLATE_TYPE_IDX, TEMPLATE_TYPE_LEVEL, TEMPLATE_TYPE_PARM_INDEX, tf_error, tf_ignore_bad_quals, tf_keep_type_decl, TMPL_ARG, TMPL_ARGS_DEPTH, TREE_CHAIN, TREE_CODE, tree_code_name, tree_cons, TREE_OPERAND, TREE_PARMLIST, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TREE_VEC_LENGTH, tsubst_aggr_type(), tsubst_call_declarator_parms(), tsubst_copy(), tsubst_decl(), tsubst_expr(), tsubst_function_type(), tsubst_template_arg_vector(), TYPE_ARG_TYPES, TYPE_BEING_DEFINED, TYPE_BINFO, TYPE_BINFO_BASETYPES, TYPE_BINFO_VIRTUALS, TYPE_BINFO_VTABLE, TYPE_CONTEXT, TYPE_DOMAIN, TYPE_FIELDS, TYPE_IDENTIFIER, TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_NAME, TYPE_OFFSET_BASETYPE, TYPE_P, TYPE_POINTER_TO, TYPE_QUALS, TYPE_RAISES_EXCEPTIONS, TYPE_REFERENCE_TO, TYPE_STUB_DECL, TYPE_TI_ARGS, TYPE_TI_TEMPLATE, TYPENAME_TYPE_FULLNAME, unknown_type_node, uses_template_parms(), void_list_node, and void_type_node.
Referenced by coerce_template_parms(), coerce_template_template_parms(), convert_template_argument(), fn_type_unification(), get_bindings(), get_bindings_real(), get_class_bindings(), get_mostly_instantiated_function_type(), grokdeclarator(), grokoptypename(), instantiate_class_template(), instantiate_decl(), instantiate_template(), lookup_template_class(), regenerate_decl_from_template(), resolve_overloaded_unification(), tsubst(), tsubst_aggr_type(), tsubst_arg_types(), tsubst_baselink(), tsubst_call_declarator_parms(), tsubst_copy(), tsubst_copy_and_build(), tsubst_decl(), tsubst_exception_specification(), tsubst_expr(), tsubst_friend_class(), tsubst_friend_function(), tsubst_function_type(), tsubst_qualified_id(), tsubst_template_arg(), tsubst_template_parms(), unify(), and verify_class_unification().
| static tree tsubst_aggr_type | ( | tree | t, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl, | |||
| int | entering_scope | |||
| ) | [static] |
Definition at line 5800 of file pt.c.
References cp_build_qualified_type_real(), error_mark_node, lookup_template_class(), NULL_TREE, r, TREE_CODE, tsubst(), tsubst_template_arg_vector(), TYPE_CONTEXT, TYPE_PTRMEMFUNC_FN_TYPE, TYPE_PTRMEMFUNC_P, TYPE_QUALS, TYPE_TEMPLATE_INFO, and TYPE_TI_ARGS.
Referenced by tsubst(), tsubst_aggr_type(), tsubst_copy(), and tsubst_decl().
| static tree tsubst_arg_types | ( | tree | arg_types, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl | |||
| ) | [static] |
Definition at line 6433 of file pt.c.
References cp_error_at(), error(), error_mark_node, hash_tree_cons(), tf_error, TREE_CHAIN, TREE_PURPOSE, TREE_VALUE, tsubst(), type_decays_to(), TYPE_MAIN_VARIANT, void_list_node, and VOID_TYPE_P.
Referenced by tsubst_arg_types(), and tsubst_function_type().
| static tree tsubst_call_declarator_parms | ( | tree | parms, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl | |||
| ) | [static] |
Definition at line 6551 of file pt.c.
References TREE_CHAIN, tree_cons, TREE_PARMLIST, TREE_PURPOSE, TREE_VALUE, tsubst(), tsubst_expr(), and void_list_node.
Referenced by tsubst(), and tsubst_call_declarator_parms().
| tree tsubst_copy | ( | tree | t, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl | |||
| ) |
Definition at line 7265 of file pt.c.
References abort, base, begin_stmt_expr(), build(), build1, build_nt(), build_x_va_arg(), CONSTRUCTOR_ELTS, DECL_CONTEXT, DECL_LANG_SPECIFIC, DECL_NAME, DECL_TEMPLATE_INFO, DELETE_EXPR_USE_GLOBAL, DELETE_EXPR_USE_VEC, do_identifier(), enum_type, error_mark_node, finish_stmt_expr(), get_first_fn(), i, IDENTIFIER_TYPENAME_P, is_member_template(), is_overloaded_fn(), LOOKUP_EXPR_GLOBAL, lookup_field(), lookup_template_function(), mangle_conv_op_name_for_type(), mark_used(), maybe_fold_nontype_arg(), NEW_EXPR_USE_GLOBAL, NULL_TREE, processing_template_decl, r, STMT_EXPR_STMT, TREE_CHAIN, TREE_CODE, tree_cons, TREE_HAS_CONSTRUCTOR, TREE_OPERAND, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, tsubst(), tsubst_aggr_type(), tsubst_expr(), TYPE_VALUES, void_list_node, and void_type_node.
Referenced by tsubst(), tsubst_copy(), tsubst_copy_and_build(), tsubst_decl(), tsubst_expr(), tsubst_initializer_list(), and tsubst_qualified_id().
| static tree tsubst_decl | ( | tree | t, | |
| tree | args, | |||
| tree | type, | |||
| tsubst_flags_t | complain | |||
| ) | [static] |
Definition at line 5933 of file pt.c.
References abort, build_tree_list, c_apply_type_quals_to_decl(), CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, clone_function_decl(), complete_type(), constructor_name(), copy_decl(), copy_node, CP_DECL_CONTEXT, cp_error_at(), cp_type_quals(), DECL_ARG_TYPE, DECL_ARGUMENTS, DECL_BEFRIENDING_CLASSES, DECL_CLASS_SCOPE_P, DECL_CLASS_TEMPLATE_P, DECL_CLONED_FUNCTION, DECL_CONSTRUCTOR_P, DECL_CONTEXT, DECL_CONV_FN_P, DECL_DEAD_FOR_LOCAL, DECL_DEFER_OUTPUT, DECL_DESTRUCTOR_P, DECL_EXTERNAL, DECL_FRIEND_P, DECL_INITIAL, DECL_INITIALIZED_P, DECL_INTERFACE_KNOWN, DECL_LANG_SPECIFIC, DECL_NAME, DECL_NAMESPACE_SCOPE_P, DECL_PENDING_INLINE_INFO, DECL_PENDING_INLINE_P, DECL_PRIMARY_TEMPLATE, DECL_RESULT, DECL_SAVED_TREE, DECL_SELF_REFERENCE_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_TEMPLATE_INFO, DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_PARM_P, DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT, DECL_TEMPLATE_SPECIALIZATION, DECL_TEMPLATE_SPECIALIZATIONS, DECL_TEMPLATE_TEMPLATE_PARM_P, DECL_TI_ARGS, DECL_TI_TEMPLATE, DECL_USE_TEMPLATE, error_mark_node, get_innermost_template_args(), grok_ctor_properties(), grok_op_properties(), IDENTIFIER_OPNAME_P, input_filename, layout_decl(), lineno, mangle_conv_op_name_for_type(), maybe_retrofit_in_chrg(), member(), most_general_template(), my_friendly_assert, NULL_RTX, NULL_TREE, PRIMARY_TEMPLATE_P, r, register_local_specialization(), register_specialization(), retrieve_local_specialization(), retrieve_specialization(), SET_DECL_ASSEMBLER_NAME, SET_DECL_IMPLICIT_INSTANTIATION, SET_DECL_RTL, SET_DECL_SELF_REFERENCE_P, SET_DECL_TEMPLATE_PARM_P, TMPL_ARGS_DEPTH, TMPL_PARMS_DEPTH, TREE_CHAIN, TREE_CODE, tree_cons, TREE_PUBLIC, TREE_STATIC, TREE_TYPE, TREE_USED, TREE_VALUE, tsubst(), tsubst_aggr_type(), tsubst_copy(), tsubst_default_arguments(), tsubst_expr(), tsubst_template_arg_vector(), tsubst_template_parms(), TYPE_MAIN_DECL, TYPE_NAME, TYPE_P, type_passed_as(), uses_template_parms(), and VOID_TYPE_P.
Referenced by tsubst().
Definition at line 5866 of file pt.c.
Referenced by convert_default_arg(), and tsubst_default_arguments().
Definition at line 5905 of file pt.c.
References DECL_TI_ARGS, TREE_CHAIN, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, tsubst_default_argument(), TYPE_ARG_TYPES, and uses_template_parms().
Referenced by instantiate_class_template(), and tsubst_decl().
Definition at line 10734 of file pt.c.
References build_enumerator(), DECL_INITIAL, DECL_SOURCE_LOCATION, finish_enum(), NULL_TREE, set_current_access_from_decl(), tf_error, tf_warning, TREE_CHAIN, TREE_PURPOSE, TREE_VALUE, tsubst_expr(), TYPE_NAME, and TYPE_VALUES.
Referenced by lookup_template_class().
| tree tsubst_expr | ( | tree | t, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl | |||
| ) |
Definition at line 7623 of file pt.c.
References abort, add_stmt(), ANON_AGGR_TYPE_P, ASM_CLOBBERS, ASM_CV_QUAL, ASM_INPUT_P, ASM_INPUTS, ASM_OUTPUTS, ASM_STRING, begin_compound_stmt(), begin_do_stmt(), begin_else_clause(), begin_for_stmt(), begin_function_body(), begin_function_try_block(), begin_handler(), begin_if_stmt(), begin_switch_stmt(), begin_try_block(), begin_while_stmt(), build_expr_from_tree(), build_nt(), CASE_HIGH, CASE_LABEL, CASE_LOW, CLEANUP_P, COMPOUND_BODY, COMPOUND_STMT_BODY_BLOCK, COMPOUND_STMT_NO_SCOPE, cp_finish_decl(), cp_fname_init(), current_function_decl, cxx_printable_name(), DECL_INITIAL, DECL_NAME, DECL_PRETTY_FUNCTION_P, DECL_STMT_DECL, DECL_TEMPLATE_INSTANTIATED, DO_BODY, DO_COND, do_local_using_decl(), do_using_directive(), ELSE_CLAUSE, error_mark_node, EXPR_STMT_EXPR, FILE_STMT_FILENAME, FILE_STMT_FILENAME_NODE, finish_anon_union(), finish_asm_stmt(), finish_break_stmt(), finish_case_label(), finish_cleanup(), finish_cleanup_try_block(), finish_compound_stmt(), finish_continue_stmt(), finish_do_body(), finish_do_stmt(), finish_else_clause(), finish_expr_stmt(), finish_for_cond(), finish_for_expr(), finish_for_init_stmt(), finish_for_stmt(), finish_function_body(), finish_function_handler_sequence(), finish_function_try_block(), finish_goto_stmt(), finish_handler(), finish_handler_parms(), finish_handler_sequence(), finish_if_stmt(), finish_if_stmt_cond(), finish_label_decl(), finish_label_stmt(), finish_mem_initializers(), finish_named_return_value(), finish_return_stmt(), finish_switch_cond(), finish_switch_stmt(), finish_then_clause(), finish_try_block(), finish_while_stmt(), finish_while_stmt_cond(), FN_TRY_BLOCK_P, FOR_BODY, FOR_COND, FOR_EXPR, FOR_INIT_STMT, GOTO_DESTINATION, HANDLER_BODY, HANDLER_PARMS, IF_COND, input_filename, LABEL_STMT_LABEL, lineno, maybe_push_decl(), NULL_TREE, prep_stmt(), processing_template_decl, RETURN_STMT_EXPR, statement_code_p, STMT_LINENO, SWITCH_BODY, SWITCH_COND, THEN_CLAUSE, tmp, TREE_ADDRESSABLE, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_TYPE, TRY_HANDLERS, TRY_STMTS, tsubst(), tsubst_copy(), tsubst_initializer_list(), USING_STMT_NAMESPACE, val, WHILE_BODY, and WHILE_COND.
Referenced by coerce_template_parms(), instantiate_class_template(), instantiate_decl(), regenerate_decl_from_template(), tsubst(), tsubst_call_declarator_parms(), tsubst_copy(), tsubst_copy_and_build(), tsubst_decl(), tsubst_default_argument(), tsubst_enum(), tsubst_expr(), tsubst_friend_function(), tsubst_initializer_list(), tsubst_omp_clauses(), tsubst_template_arg(), tsubst_template_arg_vector(), and tsubst_template_parms().
Definition at line 5095 of file pt.c.
References CLASSTYPE_USE_TEMPLATE, DECL_CLASS_TEMPLATE_P, DECL_CONTEXT, DECL_NAME, DECL_TEMPLATE_INFO, DECL_TEMPLATE_PARMS, DECL_USE_TEMPLATE, lookup_name(), maybe_get_template_decl_from_type_decl(), NULL_TREE, pop_nested_class(), pop_nested_namespace(), push_nested_class(), push_nested_namespace(), pushdecl_top_level(), redeclare_class_template(), tf_error, tf_none, tf_warning, TMPL_ARGS_DEPTH, TMPL_PARMS_DEPTH, TREE_CODE, TREE_TYPE, tsubst(), and tsubst_template_parms().
Referenced by instantiate_class_template().
Definition at line 4866 of file pt.c.
References add_outermost_template_args(), chainon(), check_classfn(), COMPLETE_TYPE_P, current_class_type, DECL_CONTEXT, DECL_INITIAL, decl_namespace_context(), DECL_NAMESPACE_SCOPE_P, DECL_PRIMARY_TEMPLATE, DECL_SAVED_TREE, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_TEMPLATE_INFO, DECL_TEMPLATE_INSTANTIATION, DECL_TEMPLATE_RESULT, DECL_TEMPLATE_SPECIALIZATIONS, DECL_TI_ARGS, DECL_TI_TEMPLATE, DECL_USE_TEMPLATE, determine_specialization(), input_filename, instantiate_template(), lineno, lookup_template_function(), most_general_template(), NULL_RTX, NULL_TREE, pop_nested_namespace(), push_nested_namespace(), pushdecl_namespace_level(), reregister_specialization(), SET_DECL_ASSEMBLER_NAME, SET_DECL_RTL, tf_error, tf_warning, TI_ARGS, TREE_CHAIN, TREE_CODE, TREE_VALUE, tsubst(), tsubst_expr(), and TYPE_MAIN_DECL.
Referenced by instantiate_class_template().
| static tree tsubst_function_type | ( | tree | t, | |
| tree | args, | |||
| tsubst_flags_t | complain, | |||
| tree | in_decl | |||
| ) | [static] |
Definition at line 6494 of file pt.c.
References arg_types, build_cplus_method_type(), build_function_type(), build_type_attribute_variant(), cp_build_qualified_type_real(), error(), error_mark_node, IS_AGGR_TYPE, my_friendly_assert, NULL_TREE, r, tf_error, TREE_CHAIN, TREE_CODE, TREE_TYPE, TREE_VALUE, tsubst(), tsubst_arg_types(), TYPE_ARG_TYPES, TYPE_ATTRIBUTES, TYPE_CONTEXT, and TYPE_QUALS.
Referenced by is_specialization_of_friend(), and tsubst().
Definition at line 10676 of file pt.c.
References build_tree_list, convert_from_reference(), DECL_P, expand_member_init(), in_base_initializer, NULL_TREE, tf_error, tf_warning, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_VALUE, tsubst_copy(), tsubst_expr(), val, and void_type_node.
Referenced by tsubst_expr().
| static tree tsubst_template_arg_vector | ( | tree | t, | |
| tree | args, | |||
| tsubst_flags_t | complain | |||
| ) | [static] |
Definition at line 5707 of file pt.c.
References alloca, error_mark_node, i, len, make_tree_vec, maybe_fold_nontype_arg(), memset, NULL_TREE, TREE_CODE, TREE_VEC_ELT, TREE_VEC_LENGTH, and tsubst_expr().
Referenced by tsubst(), tsubst_aggr_type(), tsubst_decl(), and tsubst_template_arg_vector().
| static tree tsubst_template_parms | ( | tree | parms, | |
| tree | args, | |||
| tsubst_flags_t | complain | |||
| ) | [static] |
Definition at line 5753 of file pt.c.
References build_tree_list, i, make_tree_vec, maybe_fold_nontype_arg(), NULL_TREE, r, size_int, TMPL_ARGS_DEPTH, TMPL_PARMS_DEPTH, TREE_CHAIN, tree_cons, TREE_PURPOSE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, tsubst(), and tsubst_expr().
Referenced by get_mostly_instantiated_function_type(), is_specialization_of_friend(), tsubst(), tsubst_decl(), and tsubst_friend_class().
| static int type_unification_real | ( | tree | tparms, | |
| tree | targs, | |||
| tree | xparms, | |||
| tree | xargs, | |||
| int | subr, | |||
| unification_kind_t | strict, | |||
| int | allow_incomplete, | |||
| int | xlen | |||
| ) | [static] |
Definition at line 8313 of file pt.c.
References abort, DEDUCE_CALL, DEDUCE_CONV, DEDUCE_EXACT, DEDUCE_ORDER, error(), error_mark_node, i, len, maybe_adjust_types_for_deduction(), my_friendly_assert, NULL_TREE, resolve_overloaded_unification(), same_type_p, tparm(), TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, TYPE_P, type_unknown_p(), unify(), UNIFY_ALLOW_DERIVED, UNIFY_ALLOW_LESS_CV_QUAL, UNIFY_ALLOW_MORE_CV_QUAL, UNIFY_ALLOW_NONE, UNIFY_ALLOW_OUTER_LEVEL, unknown_type_node, uses_template_parms(), and void_list_node.
Referenced by fn_type_unification(), and unify().
Definition at line 8946 of file pt.c.
References abort, build(), check_cv_quals_for_unify(), CLASSTYPE_TEMPLATE_INFO, CLASSTYPE_TI_ARGS, CLASSTYPE_TI_TEMPLATE, coerce_template_parms(), COMPLEX_TYPE, cp_build_qualified_type_real(), cp_tree_equal(), CP_TYPE_CONST_P, cp_type_quals(), decl_constant_value(), DECL_INNERMOST_TEMPLATE_PARMS, DEDUCE_EXACT, error_mark_node, fold(), get_template_base(), i, idx, integer_one_node, integer_type_node, IS_EXPR_CODE_CLASS, NULL_TREE, offset, same_type_ignoring_top_level_qualifiers_p, same_type_p, sorry(), t1, t2, template_args_equal(), template_decl_level(), TEMPLATE_PARM_IDX, TEMPLATE_PARM_LEVEL, TEMPLATE_TYPE_IDX, TEMPLATE_TYPE_LEVEL, tf_none, tparm(), TREE_CODE, TREE_CODE_CLASS, tree_code_name, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, try_class_unification(), tsubst(), TYPE_ARG_TYPES, TYPE_DOMAIN, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_OFFSET_BASETYPE, TYPE_P, TYPE_PTRMEMFUNC_FN_TYPE, TYPE_PTRMEMFUNC_P, TYPE_TI_ARGS, TYPE_TI_TEMPLATE, type_unification_real(), UNIFY_ALLOW_DERIVED, UNIFY_ALLOW_INTEGER, UNIFY_ALLOW_LESS_CV_QUAL, UNIFY_ALLOW_MAX_CORRECTION, UNIFY_ALLOW_MORE_CV_QUAL, UNIFY_ALLOW_NONE, UNIFY_ALLOW_OUTER_LESS_CV_QUAL, UNIFY_ALLOW_OUTER_LEVEL, UNIFY_ALLOW_OUTER_MORE_CV_QUAL, unknown_type_node, uses_template_parms(), and variably_modified_type_p().
Referenced by get_class_bindings(), more_specialized_fn(), try_class_unification(), try_one_overload(), type_unification_real(), and unify().
| int uses_template_parms | ( | tree | t | ) |
Definition at line 4755 of file pt.c.
Referenced by add_binding(), add_builtin_candidate(), add_friend(), bt_instantiate_type_proc(), build_cplus_array_type_1(), build_offset_ref(), check_default_argument(), check_explicit_specialization(), constant_value_1(), convert_template_argument(), cp_parser_check_declarator_template_parameters(), dependent_base_p(), do_friend(), duplicate_decls(), expand_body(), explicit_class_specialization_p(), get_bindings(), get_bindings_real(), grokdeclarator(), grokoptypename(), instantiate_class_template(), lookup_name_real(), lookup_template_class(), make_friend_class(), make_typename_type(), make_unbound_class_template(), mark_used(), maybe_fold_nontype_arg(), maybe_retrofit_in_chrg(), push_tinst_level(), register_specialization(), start_decl_1(), supplement_binding(), template_class_depth(), template_class_depth_real(), try_one_overload(), tsubst(), tsubst_copy(), tsubst_decl(), tsubst_default_arguments(), type_unification_real(), unify(), uses_template_parms(), WFE_Expand_Decl(), WFE_Process_Template_Decl(), and xref_basetypes().
Definition at line 8675 of file pt.c.
References add_outermost_template_args(), comp_template_args(), error_mark_node, INNERMOST_TEMPLATE_ARGS, NULL_TREE, tf_none, and tsubst().
Referenced by get_class_bindings().
int last_template_error_tick [static] |
| int max_tinst_depth |
Definition at line 664 of file c-common.c.
int tinst_depth [static] |
int tinst_level_tick [static] |
1.5.6