cp-tree.h (build_new_function_call): Lose koenig_p arg.
authorNathan Sidwell <nathan@acm.org>
Wed, 10 May 2017 20:43:09 +0000 (20:43 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 10 May 2017 20:43:09 +0000 (20:43 +0000)
* 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

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c

index f29878fb5c847f26ee7e1656740bf36a81933fdf..35dc539e86afab713e181e66725d7131c443f200 100644 (file)
@@ -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)
index dee236e703d228d88b491c748ae2d2b88ad4c557..b9807cf1ec28149ec12f782e1ddde791aa46b410 100644 (file)
@@ -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);
 
index e746450a71696be5bd11b667c312c3f791fc1266..09b136467ff58b9d0c91cc71c471ae425ec91fbd 100644 (file)
@@ -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);
index f80d7a5adcf6638bc15d5bf1e6bf6d346e62d109..05aa454418da7fef8c253aa5a6b3337165458099 100644 (file)
@@ -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");
index 8c6e11becbb88d762a8e29144fa744ee10654964..7b2c101302faa4849da5ecb9ffa5536dcf4d8637 100644 (file)
@@ -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)