if (type_dependent_expression_p (fn)
|| any_type_dependent_arguments_p (args))
{
- result = build_nt (CALL_EXPR, fn, args, NULL_TREE);
+ result = build_nt_call_list (fn, args);
KOENIG_LOOKUP_P (result) = koenig_p;
return result;
}
if (processing_template_decl)
{
if (type_dependent_expression_p (object))
- return build_nt (CALL_EXPR, orig_fn, orig_args, NULL_TREE);
+ return build_nt_call_list (orig_fn, orig_args);
object = build_non_dependent_expr (object);
}
if (processing_template_decl)
{
- result = build3 (CALL_EXPR, TREE_TYPE (result), orig_fn,
- orig_args, NULL_TREE);
+ result = build_call_list (TREE_TYPE (result), orig_fn, orig_args);
KOENIG_LOOKUP_P (result) = koenig_p;
}
return result;
tree aggr_init_expr = *tp;
/* Form an appropriate CALL_EXPR. */
- tree fn = TREE_OPERAND (aggr_init_expr, 0);
- tree args = TREE_OPERAND (aggr_init_expr, 1);
- tree slot = TREE_OPERAND (aggr_init_expr, 2);
+ tree fn = AGGR_INIT_EXPR_FN (aggr_init_expr);
+ tree slot = AGGR_INIT_EXPR_SLOT (aggr_init_expr);
tree type = TREE_TYPE (slot);
tree call_expr;
style = arg;
}
+ call_expr = build_call_array (TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))),
+ fn,
+ aggr_init_expr_nargs (aggr_init_expr),
+ AGGR_INIT_EXPR_ARGP (aggr_init_expr));
+
if (style == ctor)
{
/* Replace the first argument to the ctor with the address of the
slot. */
- tree addr;
-
- args = TREE_CHAIN (args);
cxx_mark_addressable (slot);
- addr = build1 (ADDR_EXPR, build_pointer_type (type), slot);
- args = tree_cons (NULL_TREE, addr, args);
+ CALL_EXPR_ARG (call_expr, 0) =
+ build1 (ADDR_EXPR, build_pointer_type (type), slot);
}
-
- call_expr = build3 (CALL_EXPR,
- TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))),
- fn, args, NULL_TREE);
-
- if (style == arg)
+ else if (style == arg)
{
/* Just mark it addressable here, and leave the rest to
expand_call{,_inline}. */