{
tree ohi = CALL_EXPR_ARG (call, 0);
tree hi = tsubst_copy_and_build (ohi, args, complain, in_decl,
- false/*fn*/, true/*int_cst*/);
+ true/*int_cst*/);
if (instantiation_dependent_expression_p (hi))
{
/*args=*/NULL_TREE,
complain,
/*in_decl=*/NULL_TREE,
- /*function_p=*/false,
/*integral_constant_expression_p=*/true);
}
{
tree spec = lookup_explicit_specifier (t);
spec = tsubst_copy_and_build (spec, args, complain, in_decl,
- /*function_p=*/false,
/*i_c_e_p=*/true);
spec = build_explicit_specifier (spec, complain);
if (spec == error_mark_node)
|| (in_decl && TREE_CODE (in_decl) == FUNCTION_DECL
&& DECL_LOCAL_DECL_P (in_decl)))
default_arg = tsubst_copy_and_build (default_arg, args, complain, in_decl,
- false/*fn*/, false/*constexpr*/);
+ false/*constexpr*/);
tree remaining_arg_types = tsubst_arg_types (TREE_CHAIN (arg_types),
args, end, complain, in_decl);
expr = DEFERRED_NOEXCEPT_PATTERN (expr);
}
new_specs = tsubst_copy_and_build
- (expr, args, complain, in_decl, /*function_p=*/false,
+ (expr, args, complain, in_decl,
/*integral_constant_expression_p=*/true);
}
new_specs = build_noexcept_spec (new_specs, complain);
type = tsubst_copy_and_build (DECLTYPE_TYPE_EXPR (t), args,
complain|tf_decltype, in_decl,
- /*function_p*/false,
/*integral_constant_expression*/false);
--cp_unevaluated_operand;
if (TREE_CODE (t) != TREE_LIST)
return tsubst_copy_and_build (t, args, complain, in_decl,
- /*function_p=*/false,
/*integral_constant_expression_p=*/false);
if (t == void_list_node)
gcc_assert (!STATEMENT_CODE_P (TREE_CODE (t)));
RETURN (tsubst_copy_and_build (t, args, complain, in_decl,
- /*function_p=*/false,
integral_constant_expression_p));
}
/*done=*/false, /*address_p=*/false);
else
t = tsubst_copy_and_build (t, args, complain, in_decl,
- /*function_p=*/false,
/*integral_constant_expression_p=*/false);
return t;
init = tsubst_pack_expansion (init, args, complain, in_decl);
else
init = tsubst_copy_and_build (init, args, complain, in_decl,
- /*fn*/false, /*constexpr*/false);
+ /*constexpr*/false);
if (init == error_mark_node)
return error_mark_node;
if (!PACK_EXPANSION_P (arg))
vec_safe_push (call_args,
tsubst_copy_and_build (arg, args, complain, in_decl,
- /*function_p=*/false,
integral_constant_expression_p));
else
{
}
/* Like tsubst but deals with expressions and performs semantic
- analysis. FUNCTION_P is true if T is the "F" in "F (ARGS)" or
- "F<TARGS> (ARGS)". */
+ analysis. */
tree
tsubst_copy_and_build (tree t,
tree args,
tsubst_flags_t complain,
tree in_decl,
- bool function_p,
bool integral_constant_expression_p)
{
#define RETURN(EXP) do { retval = (EXP); goto out; } while(0)
#define RECUR(NODE) \
tsubst_copy_and_build (NODE, args, complain, in_decl, \
- /*function_p=*/false, \
integral_constant_expression_p)
tree retval, op1;
input_location);
if (error_msg)
error (error_msg);
- if (!function_p && identifier_p (decl))
+ if (identifier_p (decl))
{
if (complain & tf_error)
unqualified_name_lookup_error (decl);
tree object;
tree templ = tsubst_copy_and_build (TREE_OPERAND (t, 0), args,
complain, in_decl,
- function_p,
integral_constant_expression_p);
tree targs = TREE_OPERAND (t, 1);
op1 = tsubst (op1, args, complain, in_decl);
else
op1 = tsubst_copy_and_build (op1, args, complain, in_decl,
- /*function_p=*/false,
/*integral_constant_expression_p=*/
false);
--cp_unevaluated_operand;
++cp_unevaluated_operand;
++c_inhibit_evaluation_warnings;
op1 = tsubst_copy_and_build (op1, args, complain, in_decl,
- /*function_p=*/false,
/*integral_constant_expression_p=*/false);
--cp_unevaluated_operand;
--c_inhibit_evaluation_warnings;
++c_inhibit_evaluation_warnings;
++cp_noexcept_operand;
op1 = tsubst_copy_and_build (op1, args, complain, in_decl,
- /*function_p=*/false,
/*integral_constant_expression_p=*/false);
--cp_unevaluated_operand;
--c_inhibit_evaluation_warnings;
{
tree op0 = tsubst_copy_and_build (TREE_OPERAND (t, 0), args,
complain & ~tf_decltype, in_decl,
- /*function_p=*/false,
integral_constant_expression_p);
RETURN (build_x_compound_expr (EXPR_LOCATION (t),
op0,
would incorrectly perform unqualified lookup again.
Note that we can also have an IDENTIFIER_NODE if the earlier
- unqualified lookup found a member function; in that case
- koenig_p will be false and we do want to do the lookup
- again to find the instantiated member function.
-
- FIXME but doing that causes c++/15272, so we need to stop
- using IDENTIFIER_NODE in that situation. */
+ unqualified lookup found a dependent local extern declaration
+ (as per finish_call_expr); in that case koenig_p will be false
+ and we do want to do the lookup again to find the substituted
+ declaration. */
qualified_p = false;
if (TREE_CODE (function) == TEMPLATE_ID_EXPR)
subcomplain |= tf_conv;
function = tsubst_copy_and_build (function, args, subcomplain,
in_decl,
- !qualified_p,
integral_constant_expression_p);
if (BASELINK_P (function))
the unqualified lookup again if we aren't in SFINAE
context. */
tree unq = (tsubst_copy_and_build
- (function, args, complain, in_decl, true,
+ (function, args, complain, in_decl,
integral_constant_expression_p));
if (unq == error_mark_node)
RETURN (error_mark_node);
{
tree object_ptr
= tsubst_copy_and_build (TREE_OPERAND (t, 1), args, complain,
- in_decl, /*function_p=*/false,
+ in_decl,
/*integral_constant_expression_p=*/false);
RETURN (finish_offsetof (object_ptr,
RECUR (TREE_OPERAND (t, 0)),
/* Handle Objective-C++ constructs, if appropriate. */
{
tree subst
- = objcp_tsubst_copy_and_build (t, args, complain,
- in_decl, /*function_p=*/false);
+ = objcp_tsubst_copy_and_build (t, args, complain, in_decl);
if (subst)
RETURN (subst);
}
noex = tsubst_copy_and_build (DEFERRED_NOEXCEPT_PATTERN (noex),
DEFERRED_NOEXCEPT_ARGS (noex),
tf_warning_or_error, fn,
- /*function_p=*/false,
/*i_c_e_p=*/true);
/* Build up the noexcept-specification. */