cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 14 Feb 2018 14:19:50 +0000 (14:19 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 14 Feb 2018 14:19:50 +0000 (14:19 +0000)
2018-02-14  Paolo Carlini  <paolo.carlini@oracle.com>

* cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove.
(do_auto_deduction (tree, tree, tree, tsubst_flags_t,
auto_deduction_context, tree, int): Add defaults.
* pt.c (do_auto_deduction (tree, tree, tree)): Remove definition.
(tsubst_omp_for_iterator): Adjust do_auto_deduction call, forward
tsubst_flags_t argument.
* init.c (build_new): Likewise.

From-SVN: r257659

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/pt.c

index ed44d9e28426796a8c2a78420f5b03a1d758e8ad..4955bf9e1a0ef43d045db6578ea43b0e58b54005 100644 (file)
@@ -1,3 +1,13 @@
+2018-02-14  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove.
+       (do_auto_deduction (tree, tree, tree, tsubst_flags_t,
+       auto_deduction_context, tree, int): Add defaults.
+       * pt.c (do_auto_deduction (tree, tree, tree)): Remove definition.
+       (tsubst_omp_for_iterator): Adjust do_auto_deduction call, forward
+       tsubst_flags_t argument.
+       * init.c (build_new): Likewise.
+
 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/84364
index 9a9e9f0bbcb0c5033674d1cee95fd3adf3dcf957..9038d677b2de89bfa3b2cf58b6a663685fceaa8d 100644 (file)
@@ -6470,10 +6470,11 @@ extern tree make_auto                           (void);
 extern tree make_decltype_auto                 (void);
 extern tree make_template_placeholder          (tree);
 extern bool template_placeholder_p             (tree);
-extern tree do_auto_deduction                   (tree, tree, tree);
 extern tree do_auto_deduction                   (tree, tree, tree,
-                                                 tsubst_flags_t,
-                                                 auto_deduction_context,
+                                                 tsubst_flags_t
+                                                = tf_warning_or_error,
+                                                 auto_deduction_context
+                                                = adc_unspecified,
                                                 tree = NULL_TREE,
                                                 int = LOOKUP_NORMAL);
 extern tree type_uses_auto                     (tree);
index 233f41c2592a760ea83f232aa463e734308f600e..d0d14abdc9fa6408a40c0bf3fda72b0916fb3fd0 100644 (file)
@@ -3593,7 +3593,7 @@ build_new (vec<tree, va_gc> **placement, tree type, tree nelts,
              d_init = (**init)[0];
              d_init = resolve_nondeduced_context (d_init, complain);
            }
-         type = do_auto_deduction (type, d_init, auto_node);
+         type = do_auto_deduction (type, d_init, auto_node, complain);
        }
     }
 
index 222084df4cbe722bac39efc6a21405bb8bcf5a5e..e62e320fe31132203c5f42913eaf249fd0d6c1a4 100644 (file)
@@ -15785,7 +15785,7 @@ tsubst_omp_for_iterator (tree t, int i, tree declv, tree orig_declv,
   tree auto_node = type_uses_auto (TREE_TYPE (decl));
   if (auto_node && init)
     TREE_TYPE (decl)
-      = do_auto_deduction (TREE_TYPE (decl), init, auto_node);
+      = do_auto_deduction (TREE_TYPE (decl), init, auto_node, complain);
 
   gcc_assert (!type_dependent_expression_p (decl));
 
@@ -25940,17 +25940,6 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags,
   return cp_build_qualified_type (TREE_TYPE (call), cp_type_quals (ptype));
 }
 
-/* Replace occurrences of 'auto' in TYPE with the appropriate type deduced
-   from INIT.  AUTO_NODE is the TEMPLATE_TYPE_PARM used for 'auto' in TYPE.  */
-
-tree
-do_auto_deduction (tree type, tree init, tree auto_node)
-{
-  return do_auto_deduction (type, init, auto_node,
-                            tf_warning_or_error,
-                            adc_unspecified);
-}
-
 /* Replace occurrences of 'auto' in TYPE with the appropriate type deduced
    from INIT.  AUTO_NODE is the TEMPLATE_TYPE_PARM used for 'auto' in TYPE.
    The CONTEXT determines the context in which auto deduction is performed