diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-05-26 15:01:07 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-05-26 15:01:07 +0000 |
commit | 32196b873a1ba319e9b3fc4cccb910d8cc4d6b31 (patch) | |
tree | b5d1722f7346122ff6f56ed689c65ce9caf9c0fd /gcc/cp/ptree.c | |
parent | 262149f536cdfbe64ebce8fd80958d10b7a47f2e (diff) | |
download | gcc-32196b873a1ba319e9b3fc4cccb910d8cc4d6b31.zip gcc-32196b873a1ba319e9b3fc4cccb910d8cc4d6b31.tar.gz gcc-32196b873a1ba319e9b3fc4cccb910d8cc4d6b31.tar.bz2 |
cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD.
* cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD.
(ovl_iterator): Add allow_inner field. Adjust ctor. Make
unduplicatable.
(ovl_iterator::maybe_push, ovl_iterator::pop): New.
(lkp_iterator): Add outer field. Adjust ctor.
(lkp_iterator::operator++): New.
(lookup_mark, lookup_maybe_add): Declare.
* name-lookup.c (name_lookup): Delete fn_set member.
(name_lookup::preserve_state, name_lookup::restore_state): Unmark
and mark lookup.
(name_lookup::add_value): Use lookup_add directly.
(name_lookup::add_fns: Use lookup_maybe_add.
(name_lookup::search_adl): Mark and unmark fns.
(pushdecl): Adjust.
* pt.c (check_explicit_specialization): Use lookup_add directly.
* ptree.c (cxx_print_xnode): Show complete overload structure.
* tree.c (lookup_mark, lookup_maybe_add): New.
From-SVN: r248517
Diffstat (limited to 'gcc/cp/ptree.c')
-rw-r--r-- | gcc/cp/ptree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index 5c7548a..a2977e8 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -237,8 +237,10 @@ cxx_print_xnode (FILE *file, tree node, int indent) break; case OVERLOAD: print_node (file, "name", OVL_NAME (node), indent+4); - for (lkp_iterator iter (node); iter; ++iter) - print_node (file, "function", *iter, indent+4); + for (ovl_iterator iter (node, true); iter; ++iter) + print_node (file, + TREE_CODE (*iter) == OVERLOAD ? "inner" : "function", + *iter, indent+4); break; case TEMPLATE_PARM_INDEX: print_node (file, "decl", TEMPLATE_PARM_DECL (node), indent+4); |