+2017-05-10 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (build_new_function_call): Lose koenig_p arg. Fix
+ line breaking.
+ * call.c (build_new_function_call): Lose koenig_p arg. Remove
+ koenig_p handling here.
+ * pt.c (push_template_decl_real): Unconditionally retrofit_lang_decl.
+ (tsubst_omp_clauses): Likewise.
+ (do_class_deduction): Adjust buld_new_function_call calls.
+ * semantics.c (finish_call_expr): Likewise.
+
2017-05-10 Jason Merrill <jason@redhat.com>
* pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch)
ARGS. */
tree
-build_new_function_call (tree fn, vec<tree, va_gc> **args, bool koenig_p,
+build_new_function_call (tree fn, vec<tree, va_gc> **args,
tsubst_flags_t complain)
{
struct z_candidate *candidates, *cand;
if (flag_tm)
tm_malloc_replacement (fn);
- /* If this function was found without using argument dependent
- lookup, then we want to ignore any undeclared friend
- functions. */
- if (!koenig_p)
- {
- tree orig_fn = fn;
-
- fn = remove_hidden_names (fn);
- if (!fn)
- {
- if (complain & tf_error)
- print_error_for_call_failure (orig_fn, *args, NULL);
- return error_mark_node;
- }
- }
-
/* Get the high-water mark for the CONVERSION_OBSTACK. */
p = conversion_obstack_alloc (0);
extern tree extract_call_expr (tree);
extern tree build_user_type_conversion (tree, tree, int,
tsubst_flags_t);
-extern tree build_new_function_call (tree, vec<tree, va_gc> **, bool,
+extern tree build_new_function_call (tree, vec<tree, va_gc> **,
tsubst_flags_t);
-extern tree build_operator_new_call (tree, vec<tree, va_gc> **, tree *,
- tree *, tree, tree, tree *,
- tsubst_flags_t);
-extern tree build_new_method_call (tree, tree, vec<tree, va_gc> **,
- tree, int, tree *,
- tsubst_flags_t);
-extern tree build_special_member_call (tree, tree, vec<tree, va_gc> **,
+extern tree build_operator_new_call (tree, vec<tree, va_gc> **,
+ tree *, tree *, tree, tree,
+ tree *, tsubst_flags_t);
+extern tree build_new_method_call (tree, tree,
+ vec<tree, va_gc> **, tree,
+ int, tree *, tsubst_flags_t);
+extern tree build_special_member_call (tree, tree,
+ vec<tree, va_gc> **,
tree, int, tsubst_flags_t);
extern tree build_new_op (location_t, enum tree_code,
int, tree, tree, tree, tree *,
extern tree build_op_call (tree, vec<tree, va_gc> **,
tsubst_flags_t);
extern bool aligned_allocation_fn_p (tree);
-extern bool usual_deallocation_fn_p (tree);
+extern bool usual_deallocation_fn_p (tree);
extern tree build_op_delete_call (enum tree_code, tree, tree,
bool, tree, tree,
tsubst_flags_t);
SET_TYPE_TEMPLATE_INFO (TREE_TYPE (tmpl), info);
else
{
- if (is_primary && !DECL_LANG_SPECIFIC (decl))
+ if (is_primary)
retrofit_lang_decl (decl);
if (DECL_LANG_SPECIFIC (decl))
DECL_TEMPLATE_INFO (decl) = info;
tree decl = OMP_CLAUSE_DECL (nc);
if (VAR_P (decl))
{
- if (!DECL_LANG_SPECIFIC (decl))
- retrofit_lang_decl (decl);
+ retrofit_lang_decl (decl);
DECL_OMP_PRIVATIZED_MEMBER (decl) = 1;
}
}
}
++cp_unevaluated_operand;
- tree t = build_new_function_call (cands, &args, /*koenig*/false,
- tf_decltype);
+ tree t = build_new_function_call (cands, &args, tf_decltype);
if (t == error_mark_node && (complain & tf_warning_or_error))
{
error ("class template argument deduction failed:");
- t = build_new_function_call (cands, &args, /*koenig*/false,
- complain | tf_decltype);
+ t = build_new_function_call (cands, &args, complain | tf_decltype);
if (old_cands != cands)
inform (input_location, "explicit deduction guides not considered "
"for copy-initialization");
}
/* A call to a namespace-scope function. */
- result = build_new_function_call (fn, args, koenig_p, complain);
+ result = build_new_function_call (fn, args, complain);
}
}
else if (TREE_CODE (fn) == PSEUDO_DTOR_EXPR)