Lines Matching defs:args

429 add_to_template_args (tree args, tree extra_args)
437 new_args = make_tree_vec (TMPL_ARGS_DEPTH (args) + extra_depth);
439 for (i = 1; i <= TMPL_ARGS_DEPTH (args); ++i)
440 SET_TMPL_ARGS_LEVEL (new_args, i, TMPL_ARGS_LEVEL (args, i));
456 add_outermost_template_args (tree args, tree extra_args)
462 gcc_assert (TMPL_ARGS_DEPTH (args) >= TMPL_ARGS_DEPTH (extra_args));
466 if (TMPL_ARGS_DEPTH (args) == TMPL_ARGS_DEPTH (extra_args))
470 TREE_VEC_LENGTH (args) -= TMPL_ARGS_DEPTH (extra_args);
472 new_args = add_to_template_args (args, extra_args);
475 TREE_VEC_LENGTH (args) += TMPL_ARGS_DEPTH (extra_args);
483 get_innermost_template_args (tree args, int n)
493 return TMPL_ARGS_LEVEL (args, TMPL_ARGS_DEPTH (args));
497 extra_levels = TMPL_ARGS_DEPTH (args) - n;
500 return args;
506 TMPL_ARGS_LEVEL (args, i + extra_levels));
836 retrieve_specialization (tree tmpl, tree args,
839 if (args == error_mark_node)
846 gcc_assert (TMPL_ARGS_DEPTH (args)
862 = retrieve_specialization (class_template, args,
901 if (comp_template_args (TREE_PURPOSE (spec), args))
1037 tree args = NULL_TREE;
1045 args = TYPE_TI_ARGS (context);
1047 args = add_to_template_args (TYPE_TI_ARGS (context), args);
1072 args, tf_none);
1083 friend_type = tsubst_function_type (TREE_TYPE (friend), args,
1129 args, tf_none);
1148 register_specialization (tree spec, tree tmpl, tree args, bool is_friend)
1169 fn = retrieve_specialization (tmpl, args,
1259 = tree_cons (args, spec, DECL_TEMPLATE_SPECIALIZATIONS (tmpl));
1351 explicit template args given in TEMPLATE_ID. The DECL may be
1367 The template args (those explicitly specified and those deduced)
2539 tree args = NULL_TREE;
2547 args = make_tree_vec (length);
2580 TREE_VEC_ELT (args, --l) = a;
2582 args = a;
2585 return args;
3028 tree args;
3129 args = current_template_args ();
3211 args = DECL_TI_ARGS (decl);
3221 = tree_cons (tmpl, args, NULL_TREE);
3225 args,
3234 if (TMPL_ARGS_DEPTH (args) != i)
3237 i, decl, TMPL_ARGS_DEPTH (args));
3242 a = TMPL_ARGS_LEVEL (args, i);
3310 args = add_outermost_template_args (DECL_TI_ARGS (tmpl), args);
3312 info = tree_cons (tmpl, args, NULL_TREE);
3457 /*args=*/NULL_TREE,
3959 tree args,
4058 args))
4095 tree t = tsubst (TREE_TYPE (parm), args, complain, in_decl);
4138 tree args,
4150 inner_args = INNERMOST_TEMPLATE_ARGS (args);
4178 new_args = add_outermost_template_args (args, new_inner_args);
4226 /* Returns 1 if template args OT and NT are equivalent. */
4661 /* Calculate the BOUND_ARGS. These will be the args that are
4929 /* Possibly limit visibility based on template args. */
5307 tsubst_friend_function (tree decl, tree args)
5332 fns = tsubst_expr (DECL_TI_TEMPLATE (decl), args,
5336 arglist = tsubst (DECL_TI_ARGS (decl), args,
5340 new_friend = tsubst (decl, args, tf_warning_or_error, NULL_TREE);
5344 TREE_VEC_LENGTH (args),
5349 new_friend = tsubst (decl, args, tf_warning_or_error, NULL_TREE);
5560 tsubst_friend_class (tree friend_tmpl, tree args)
5573 push_nested_class (tsubst (context, args, tf_none, NULL_TREE));
5618 > TMPL_ARGS_DEPTH (args))
5622 args, tf_warning_or_error);
5633 tmpl = tsubst (friend_tmpl, args, tf_warning_or_error, NULL_TREE);
5684 tree template, args, pattern, t, member;
5722 args = TREE_PURPOSE (t);
5727 args = CLASSTYPE_TI_ARGS (type);
5810 base = tsubst (BINFO_TYPE (pbase_binfo), args, tf_error, NULL_TREE);
5863 newtag = tsubst (t, args, tf_error, NULL_TREE);
5904 r = tsubst (t, args, tf_error, NULL_TREE);
5926 r = tsubst (t, args, tf_warning_or_error, NULL_TREE);
5994 friend_type = tsubst_friend_class (friend_type, args);
6000 friend_type = tsubst (friend_type, args,
6017 friend_type = tsubst (friend_type, args,
6046 friend_type = tsubst (friend_type, args,
6089 r = tsubst_friend_function (t, args);
6138 tsubst_template_arg (tree t, tree args, tsubst_flags_t complain, tree in_decl)
6145 r = tsubst (t, args, complain, in_decl);
6148 r = tsubst_expr (t, args, complain, in_decl,
6158 tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl)
6170 new_arg = tsubst_template_args (orig_arg, args, complain, in_decl);
6172 new_arg = tsubst_template_arg (orig_arg, args, complain, in_decl);
6200 tsubst_template_parms (tree parms, tree args, tsubst_flags_t complain)
6212 TMPL_PARMS_DEPTH (parms) > TMPL_ARGS_DEPTH (args);
6237 parm_decl = tsubst (parm_decl, args, complain, NULL_TREE);
6241 default_value = tsubst_template_arg (default_value, args,
6250 - TMPL_ARGS_DEPTH (args)),
6267 tree args,
6279 return tsubst (TYPE_PTRMEMFUNC_FN_TYPE (t), args, complain, in_decl);
6299 context = tsubst_aggr_type (context, args, complain,
6311 argvec = tsubst_template_args (TYPE_TI_ARGS (t), args,
6331 return tsubst (t, args, complain, in_decl);
6423 tsubst_decl (tree t, tree args, tsubst_flags_t complain)
6448 tree new_type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6458 = tsubst_template_parms (DECL_TEMPLATE_PARMS (t), args,
6466 full args contain the tsubst'd args for the context,
6467 plus the innermost args from the template decl. */
6476 full_args = tsubst_template_args (tmpl_args, args,
6504 DECL_TEMPLATE_INFO (r) = build_tree_list (t, args);
6510 new_type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6525 new_decl = tsubst (decl, args, complain, in_decl);
6545 = tsubst_template_parms (DECL_TEMPLATE_PARMS (t), args,
6594 args, complain, in_decl);
6638 args_depth = TMPL_ARGS_DEPTH (args);
6643 args = get_innermost_template_args (args, parms_depth);
6667 ctx = tsubst_aggr_type (DECL_CONTEXT (t), args,
6675 type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6697 DECL_ARGUMENTS (r) = tsubst (DECL_ARGUMENTS (t), args,
6717 args, complain, t);
6758 args, complain,
6780 args, complain, in_decl));
6782 /* Possibly limit visibility based on template args. */
6802 type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6812 DECL_INITIAL (r) = tsubst (DECL_INITIAL (r), args,
6821 TREE_CHAIN (r) = tsubst (TREE_CHAIN (t), args,
6831 type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6839 = tsubst_expr (DECL_INITIAL (t), args,
6855 (tsubst_copy (USING_DECL_SCOPE (t), args, complain, in_decl),
6856 tsubst_copy (DECL_NAME (t), args, complain, in_decl));
6880 type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6912 ctx = tsubst_aggr_type (ctx, args,
6929 argvec = tsubst (DECL_TI_ARGS (t), args, complain, in_decl);
6960 type = tsubst (TREE_TYPE (t), args, complain, in_decl);
6992 ve = tsubst_expr (ve, args, complain, in_decl,
7014 /* Possibly limit visibility based on template args. */
7059 tree args,
7072 args, complain, in_decl);
7076 type = tsubst (TREE_VALUE (arg_types), args, complain, in_decl);
7133 tree args,
7145 return_type = tsubst (TREE_TYPE (t), args, complain, in_decl);
7166 arg_types = tsubst_arg_types (TYPE_ARG_TYPES (t), args,
7207 tree args,
7224 spec = tsubst (TREE_VALUE (specs), args, complain, in_decl);
7251 tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
7264 return tsubst_decl (t, args, complain);
7278 type = tsubst (type, args, complain, in_decl);
7287 return tsubst_aggr_type (t, args, complain, in_decl,
7313 max = tsubst_expr (omax, args, complain, in_decl,
7362 gcc_assert (TREE_VEC_LENGTH (args) > 0);
7376 levels = TMPL_ARGS_DEPTH (args);
7378 arg = TMPL_ARG (args, level, idx);
7406 args, complain, in_decl);
7447 r = tsubst (TYPE_MAIN_VARIANT (t), args, complain, in_decl);
7466 tree argvec = tsubst (TYPE_TI_ARGS (t), args,
7498 purpose = tsubst (purpose, args, complain, in_decl);
7505 value = tsubst (value, args, complain, in_decl);
7512 chain = tsubst (chain, args, complain, in_decl);
7530 return tsubst_template_args (t, args, complain, in_decl);
7597 r = tsubst (TYPE_OFFSET_BASETYPE (t), args, complain, in_decl);
7649 fntype = tsubst_function_type (t, args, complain, in_decl);
7654 specs = tsubst_exception_specification (t, args, complain,
7664 tree domain = tsubst (TYPE_DOMAIN (t), args, complain, in_decl);
7705 tree e1 = tsubst (TREE_OPERAND (t, 0), args, complain, in_decl);
7706 tree e2 = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl);
7717 tree e = tsubst (TREE_OPERAND (t, 0), args, complain, in_decl);
7726 tree ctx = tsubst_aggr_type (TYPE_CONTEXT (t), args, complain,
7728 tree f = tsubst_copy (TYPENAME_TYPE_FULLNAME (t), args,
7785 tree ctx = tsubst_aggr_type (TYPE_CONTEXT (t), args, complain,
7794 parm_list = tsubst_template_parms (parm_list, args, complain);
7805 tree e1 = tsubst (TREE_OPERAND (t, 0), args, complain, in_decl);
7806 tree e2 = tsubst_expr (TREE_OPERAND (t, 1), args, complain, in_decl,
7816 tree e1 = tsubst (TREE_OPERAND (t, 0), args, complain, in_decl);
7817 tree e2 = tsubst (TREE_OPERAND (t, 1), args, complain, in_decl);
7830 (TYPEOF_TYPE_EXPR (t), args,
7857 tree args, tsubst_flags_t complain, tree in_decl)
7873 qualifying_scope = tsubst (qualifying_scope, args,
7883 template_args = tsubst_template_args (template_args, args,
7906 = tsubst (optype, args, complain, in_decl);
7922 tsubst_qualified_id (tree qualified_id, tree args,
7941 template_args = tsubst_template_args (template_args, args,
7956 if (args)
7958 scope = tsubst (scope, args, complain, in_decl);
7959 expr = tsubst_copy (name, args, complain, in_decl);
8038 tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
8062 return tsubst_copy (DECL_INITIAL (t), args, complain, in_decl);
8068 if (args == NULL_TREE)
8082 = tsubst_aggr_type (TREE_TYPE (t), args, complain, in_decl,
8103 ctx = tsubst_aggr_type (DECL_CONTEXT (t), args, complain, in_decl,
8124 t = tsubst (t, args, complain, in_decl);
8129 return tsubst_baselink (t, current_class_type, args, complain, in_decl);
8134 args, complain, in_decl);
8136 return tsubst (t, args, complain, in_decl);
8155 tree context = tsubst (DECL_CONTEXT (t), args, complain, in_decl);
8169 (code, tsubst (TREE_TYPE (t), args, complain, in_decl),
8170 tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl));
8186 (code, tsubst (TREE_TYPE (t), args, complain, in_decl),
8187 tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl));
8194 object = tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl);
8198 name = tsubst_copy (TREE_OPERAND (name, 0), args,
8205 tree base = tsubst_copy (TREE_OPERAND (name, 0), args,
8208 name = tsubst_copy (TREE_OPERAND (name, 0), args,
8218 args, complain,
8221 name = tsubst_copy (name, args, complain, in_decl);
8262 (code, tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl),
8263 tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl));
8268 args, complain, in_decl),
8270 args, complain, in_decl),
8276 tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl),
8277 tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl),
8282 tsubst_copy (TREE_OPERAND (t, 0), args,
8284 tsubst_copy (TREE_OPERAND (t, 1), args, complain,
8293 (code, tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl),
8294 tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl),
8295 tsubst_copy (TREE_OPERAND (t, 2), args, complain, in_decl));
8303 (code, tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl),
8304 tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl),
8305 tsubst_copy (TREE_OPERAND (t, 2), args, complain, in_decl));
8313 (code, tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl),
8314 tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl));
8326 fn = tsubst_copy (fn, args, complain, in_decl);
8328 targs = tsubst_template_args (targs, args, complain, in_decl);
8342 purpose = tsubst_copy (purpose, args, complain, in_decl);
8345 value = tsubst_copy (value, args, complain, in_decl);
8348 chain = tsubst_copy (chain, args, complain, in_decl);
8374 return tsubst (t, args, complain, in_decl);
8379 tree new_type = tsubst (TREE_TYPE (t), args, complain, in_decl);
8390 return build_x_va_arg (tsubst_copy (TREE_OPERAND (t, 0), args, complain,
8392 tsubst (TREE_TYPE (t), args, complain, in_decl));
8412 tsubst_omp_clauses (tree clauses, tree args, tsubst_flags_t complain,
8436 = tsubst_expr (OMP_CLAUSE_OPERAND (oc, 0), args, complain,
8454 tsubst_copy_asm_operands (tree t, tree args, tsubst_flags_t complain,
8457 #define RECUR(t) tsubst_copy_asm_operands (t, args, complain, in_decl)
8465 return tsubst_copy_and_build (t, args, complain, in_decl,
8489 tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
8493 tsubst_expr ((NODE), args, complain, in_decl, \
8518 (TREE_OPERAND (t, 0), args));
8563 decl = tsubst (decl, args, complain, in_decl);
8711 tsubst_copy_asm_operands (ASM_OUTPUTS (t), args, complain, in_decl),
8712 tsubst_copy_asm_operands (ASM_INPUTS (t), args, complain, in_decl),
8713 tsubst_copy_asm_operands (ASM_CLOBBERS (t), args, complain, in_decl));
8760 decl = tsubst (decl, args, complain, in_decl);
8775 tsubst (TREE_TYPE (t), args, complain, NULL_TREE);
8780 args, complain, in_decl);
8792 args, complain, in_decl);
8821 tmp = tsubst_omp_clauses (OMP_CLAUSES (t), args, complain, in_decl);
8857 return tsubst_copy_and_build (t, args, complain, in_decl,
8870 tsubst_non_call_postfix_expression (tree t, tree args,
8875 t = tsubst_qualified_id (t, args, complain, in_decl,
8878 t = tsubst_copy_and_build (t, args, complain, in_decl,
8890 tree args,
8897 tsubst_copy_and_build (NODE, args, complain, in_decl, \
8920 tree new_type = tsubst (TREE_TYPE (t), args, complain, in_decl);
8956 targs = tsubst_template_args (targs, args, complain, in_decl);
8993 (tsubst (TREE_TYPE (t), args, complain, in_decl),
9005 type = tsubst (TREE_TYPE (t), args, complain, in_decl);
9036 args, complain, in_decl);
9053 op1 = tsubst_qualified_id (op1, args, complain, in_decl,
9056 op1 = tsubst_non_call_postfix_expression (op1, args, complain,
9106 return tsubst_qualified_id (t, args, complain, in_decl, /*done=*/true,
9110 args, complain, in_decl);
9124 if (!args)
9135 op1 = tsubst_copy_and_build (op1, args, complain, in_decl,
9164 args, complain, in_decl);
9203 function = tsubst_qualified_id (function, args, complain, in_decl,
9220 function = tsubst_copy_and_build (function, args, complain,
9316 args, complain, in_decl);
9326 args, complain, in_decl);
9328 member = tsubst_copy (member, args, complain, in_decl);
9348 tree args;
9353 args = TREE_OPERAND (TREE_OPERAND (member, 1), 1);
9361 args);
9403 tree type = tsubst (TREE_TYPE (t), args, complain, in_decl);
9441 if (!args)
9447 tree r = tsubst_copy (t, args, complain, in_decl);
9458 tsubst_copy (TREE_TYPE (t), args, complain,
9470 tsubst_expr (STMT_EXPR_STMT (t), args, complain, in_decl,
9479 t = tsubst_copy (t, args, complain, in_decl);
9493 = objcp_tsubst_copy_and_build (t, args, complain,
9498 return tsubst_copy (t, args, complain, in_decl);
9510 check_instantiated_args (tree tmpl, tree args, tsubst_flags_t complain)
9517 tree t = TREE_VEC_ELT (args, ix);
9706 tree args,
9752 /* Substitute the explicit args into the function type. This is
9755 an incomplete set of explicit args, we must not do semantic
9777 args = tree_cons (NULL_TREE, return_type, args);
9785 targs, parms, args, /*subr=*/0,
9910 tree parms, args;
9938 args = xargs;
9941 && args && args != void_list_node)
9945 arg = TREE_VALUE (args);
9946 args = TREE_CHAIN (args);
9952 template args from other function args. */
10012 /* Fail if we've reached the end of the parm list, and more args
10014 if (args && args != void_list_node && parms == void_list_node)
10049 we try deducing template args from each of the overloads, and if
10087 /* If we got some explicit template args, we need to plug them into
10089 explicit args will completely resolve the templates in question. */
10185 some template args from previous args, unify would complain when we
10195 explicitly specified args. */
10205 template args used in the function parm list with our own
10445 template args from other function args. */
10818 /* Type INTEGER_CST can come from ordinary constant template args. */
11162 /* Only of the args is a reference, see if we should apply
11356 get_class_bindings (tree tparms, tree spec_args, tree args)
11363 if (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (args))
11365 deduced_args = copy_node (args);
11375 INNERMOST_TEMPLATE_ARGS (args),
11400 INNERMOST_TEMPLATE_ARGS (args)))
11553 tree args;
11556 args = CLASSTYPE_TI_ARGS (type);
11565 args);
11926 tree args;
11929 args = DECL_TI_ARGS (decl);
11944 args_depth = TMPL_ARGS_DEPTH (args);
11947 args = get_innermost_template_args (args, parms_depth);
11950 args, tf_error, NULL_TREE);
11968 parm_type = tsubst (TREE_TYPE (pattern_parm), args, tf_error,
11992 tsubst_expr (DECL_INITIAL (code_pattern), args,
12072 tree args;
12141 args = get_innermost_template_args
12144 args = gen_args;
12244 args,
12376 tsubst_expr (DECL_SAVED_TREE (code_pattern), args,
12565 tsubst_enum (tree tag, tree newtag, tree args)
12578 args, tf_warning_or_error, NULL_TREE,
13132 any_type_dependent_arguments_p (tree args)
13134 while (args)
13136 tree arg = TREE_VALUE (args);
13140 args = TREE_CHAIN (args);
13180 any_dependent_template_arguments_p (tree args)
13185 if (!args)
13187 if (args == error_mark_node)
13190 for (i = 0; i < TMPL_ARGS_DEPTH (args); ++i)
13192 tree level = TMPL_ARGS_LEVEL (args, i + 1);
13234 dependent_template_id_p (tree tmpl, tree args)
13237 || any_dependent_template_arguments_p (args));
13299 tree args;
13302 args = TREE_OPERAND (TYPENAME_TYPE_FULLNAME (type), 1);
13304 type = lookup_template_class (tmpl, args, NULL_TREE, NULL_TREE,
13402 build_non_dependent_args (tree args)
13408 for (a = args; a; a = TREE_CHAIN (a))