aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-10 20:43:09 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-10 20:43:09 +0000
commit268de039e3d8136c02e7a11e1e97a7637d7d1323 (patch)
treee6b98650467f32ad2abfacd9502177ab66583f89
parent87c7063d68a79665ff480babc7ff06e6e2e0e1f8 (diff)
downloadgcc-268de039e3d8136c02e7a11e1e97a7637d7d1323.zip
gcc-268de039e3d8136c02e7a11e1e97a7637d7d1323.tar.gz
gcc-268de039e3d8136c02e7a11e1e97a7637d7d1323.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog11
-rw-r--r--gcc/cp/call.c18
-rw-r--r--gcc/cp/cp-tree.h19
-rw-r--r--gcc/cp/pt.c11
-rw-r--r--gcc/cp/semantics.c2
5 files changed, 27 insertions, 34 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f29878f..35dc539 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,14 @@
+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)
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index dee236e..b9807cf 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4192,7 +4192,7 @@ print_error_for_call_failure (tree fn, vec<tree, va_gc> *args,
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;
@@ -4210,22 +4210,6 @@ build_new_function_call (tree fn, vec<tree, va_gc> **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 e746450..09b1364 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<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 *,
@@ -5665,7 +5666,7 @@ extern tree build_new_op (location_t, enum tree_code,
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);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f80d7a5..05aa454 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 8c6e11b..7b2c101 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2438,7 +2438,7 @@ finish_call_expr (tree fn, vec<tree, va_gc> **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)