From: Nathan Sidwell Date: Wed, 10 May 2017 20:43:09 +0000 (+0000) Subject: cp-tree.h (build_new_function_call): Lose koenig_p arg. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=268de039e3d8136c02e7a11e1e97a7637d7d1323;p=gcc.git cp-tree.h (build_new_function_call): Lose koenig_p arg. * 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. From-SVN: r247860 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f29878fb5c8..35dc539e86a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,14 @@ +2017-05-10 Nathan Sidwell + + * 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 * pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch) diff --git a/gcc/cp/call.c b/gcc/cp/call.c index dee236e703d..b9807cf1ec2 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4192,7 +4192,7 @@ print_error_for_call_failure (tree fn, vec *args, ARGS. */ tree -build_new_function_call (tree fn, vec **args, bool koenig_p, +build_new_function_call (tree fn, vec **args, tsubst_flags_t complain) { struct z_candidate *candidates, *cand; @@ -4210,22 +4210,6 @@ build_new_function_call (tree fn, vec **args, bool koenig_p, 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); diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index e746450a716..09b136467ff 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5649,15 +5649,16 @@ extern tree type_decays_to (tree); 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 **, bool, +extern tree build_new_function_call (tree, vec **, tsubst_flags_t); -extern tree build_operator_new_call (tree, vec **, tree *, - tree *, tree, tree, tree *, - tsubst_flags_t); -extern tree build_new_method_call (tree, tree, vec **, - tree, int, tree *, - tsubst_flags_t); -extern tree build_special_member_call (tree, tree, vec **, +extern tree build_operator_new_call (tree, vec **, + tree *, tree *, tree, tree, + tree *, tsubst_flags_t); +extern tree build_new_method_call (tree, tree, + vec **, tree, + int, tree *, tsubst_flags_t); +extern tree build_special_member_call (tree, tree, + vec **, tree, int, tsubst_flags_t); extern tree build_new_op (location_t, enum tree_code, int, tree, tree, tree, tree *, @@ -5665,7 +5666,7 @@ extern tree build_new_op (location_t, enum tree_code, extern tree build_op_call (tree, vec **, 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); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f80d7a5adcf..05aa454418d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5570,7 +5570,7 @@ template arguments to %qD do not match original template %qD", 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; @@ -15253,8 +15253,7 @@ tsubst_omp_clauses (tree clauses, enum c_omp_region_type ort, 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; } } @@ -25250,14 +25249,12 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags, } ++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"); diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 8c6e11becbb..7b2c101302f 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2438,7 +2438,7 @@ finish_call_expr (tree fn, vec **args, bool disallow_virtual, } /* 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)