diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2018-02-14 14:19:50 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2018-02-14 14:19:50 +0000 |
commit | 87ca401516de990160167da4849cd0b31394237d (patch) | |
tree | 7b5662bc904bbb128554675d4ffb26872f44ebcd | |
parent | da07141fd73342113551814b404044e9ca72afdb (diff) | |
download | gcc-87ca401516de990160167da4849cd0b31394237d.zip gcc-87ca401516de990160167da4849cd0b31394237d.tar.gz gcc-87ca401516de990160167da4849cd0b31394237d.tar.bz2 |
cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove.
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
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 7 | ||||
-rw-r--r-- | gcc/cp/init.c | 2 | ||||
-rw-r--r-- | gcc/cp/pt.c | 13 |
4 files changed, 16 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ed44d9e..4955bf9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 9a9e9f0..9038d67 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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); diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 233f41c..d0d14ab 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -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); } } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 222084d..e62e320 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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)); @@ -25941,17 +25941,6 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags, } /* 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 and is used to control error diagnostics. FLAGS are the LOOKUP_* flags. |