aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-16 14:46:30 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-16 14:46:30 +0000
commit3f267553fca2671ca4abb0dbbe3c9f625357edf0 (patch)
tree75f1cd1884906c9e7903a3f2d97c780e17e2066f /gcc/cp/parser.c
parent058c785479b1652ffd47d397a9693fe5e5fdea39 (diff)
downloadgcc-3f267553fca2671ca4abb0dbbe3c9f625357edf0.zip
gcc-3f267553fca2671ca4abb0dbbe3c9f625357edf0.tar.gz
gcc-3f267553fca2671ca4abb0dbbe3c9f625357edf0.tar.bz2
cp-tree.h (class ovl_iterator, [...]): New OVERLOAD iterators.
* cp-tree.h (class ovl_iterator, class lkp_iterator): New OVERLOAD iterators. (MAYBE_BASELINK_FUNCTIONS): New. * constraint.cc (resolve_constraint_check): Use lkp_iterator. * decl2.c (maybe_warn_sized_delete): Use ovl_iterator. * lambda.c (maybe_generic_this_capture): Use lkp_iterator. * method.c (inherited_ctor_binfo): Use ovl_iterator. (binfo_inherited_from): Likewise. * parser.c (lookup_literal_operator): Use lkp_iterator. * pt.c (iterative_hash_template_arg): Use lkp_iterator. (print_candidates_1): Likewise. (determine_specialization): Likewise. (resolve_overloaded_unification): Likewise. (resolve_nondeduced_context): Likewise. (type_dependent_expression_p): Likewise. (dependent_template_p): Likewise. * ptree.c (cxx_print_xnode): Likewise. * semantics.c (omp_reduction_lookup): Use lkp_iterator. (classtype_has_nothrow_assign_or_copy_p): Use ovl_iterator. * typeck.c (check_template_keyword): Use lkp_iterator. From-SVN: r248112
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 99c742f..7509dce 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -4061,16 +4061,16 @@ cp_parser_string_literal (cp_parser *parser, bool translate, bool wide_ok,
static tree
lookup_literal_operator (tree name, vec<tree, va_gc> *args)
{
- tree decl, fns;
+ tree decl;
decl = lookup_name (name);
if (!decl || !is_overloaded_fn (decl))
return error_mark_node;
- for (fns = decl; fns; fns = OVL_NEXT (fns))
+ for (lkp_iterator iter (decl); iter; ++iter)
{
unsigned int ix;
bool found = true;
- tree fn = OVL_CURRENT (fns);
+ tree fn = *iter;
tree parmtypes = TYPE_ARG_TYPES (TREE_TYPE (fn));
if (parmtypes != NULL_TREE)
{