diff options
author | Jason Merrill <jason@redhat.com> | 2020-05-11 14:05:46 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-05-11 14:50:57 -0400 |
commit | 08434b02e2903c60517f64f3bc3070992001d3b5 (patch) | |
tree | fd027f55d388b7abe95663a72853492f9a68fbd1 /gcc/cp/call.c | |
parent | f315d1477d5164cb8ec1a004ce368dd52d47092a (diff) | |
download | gcc-08434b02e2903c60517f64f3bc3070992001d3b5.zip gcc-08434b02e2903c60517f64f3bc3070992001d3b5.tar.gz gcc-08434b02e2903c60517f64f3bc3070992001d3b5.tar.bz2 |
c++: Remove LOOKUP_EXPLICIT_TMPL_ARGS.
This flag is redundant with the explicit_targs field in the overload
candidate information.
gcc/cp/ChangeLog
2020-05-11 Jason Merrill <jason@redhat.com>
* cp-tree.h (LOOKUP_EXPLICIT_TMPL_ARGS): Remove.
* call.c (build_new_function_call): Don't set it.
(build_new_method_call_1): Likewise.
(build_over_call): Check cand->explicit_targs instead.
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index dbce386..aca12c7 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4600,15 +4600,7 @@ build_new_function_call (tree fn, vec<tree, va_gc> **args, } else { - int flags = LOOKUP_NORMAL; - /* If fn is template_id_expr, the call has explicit template arguments - (e.g. func<int>(5)), communicate this info to build_over_call - through flags so that later we can use it to decide whether to warn - about peculiar null pointer conversion. */ - if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) - flags |= LOOKUP_EXPLICIT_TMPL_ARGS; - - result = build_over_call (cand, flags, complain); + result = build_over_call (cand, LOOKUP_NORMAL, complain); } if (flag_coroutines @@ -8773,7 +8765,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) if (null_node_p (arg) && DECL_TEMPLATE_INFO (fn) && cand->template_decl - && !(flags & LOOKUP_EXPLICIT_TMPL_ARGS)) + && !cand->explicit_targs) conversion_warning = false; /* Set user_conv_p on the argument conversions, so rvalue/base handling @@ -10345,8 +10337,6 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args, if (call != error_mark_node) { - if (explicit_targs) - flags |= LOOKUP_EXPLICIT_TMPL_ARGS; /* Now we know what function is being called. */ if (fn_p) *fn_p = fn; |