summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-07 12:09:24 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-07 12:09:24 +0000
commitc198c8d2b62ed5baef594ec56722b717f6dd26f1 (patch)
treeefb847d07f127e75a4ce34c2d83d41f081fc1a39 /gcc/cp
parentddb449aa956fe26d42c53ddf4488433510af858d (diff)
downloadgcc-c198c8d2b62ed5baef594ec56722b717f6dd26f1.tar.gz
* tree.c (walk_tree): Walk siblings even if !walk_subtrees.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/tree.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1b3cceb3015..dbde8050440 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2001-08-07 Jason Merrill <jason_merrill@redhat.com>
+
+ * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
+
2001-08-06 Richard Henderson <rth@redhat.com>
* decl2.c (finish_objects): Pass a symbol_ref and priority to
@@ -140,7 +144,7 @@
declaring a function, and create last_function_parms correctly.
2001-07-25 Jason Merrill <jason_merrill@redhat.com>
-
+
* call.c (joust): Only prefer a non-builtin candidate to a builtin
one if they have the same signature.
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 348942c29ea..3642890f255 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1198,12 +1198,18 @@ walk_tree (tp, func, data, htab)
if (result)
return result;
+ code = TREE_CODE (*tp);
+
/* Even if we didn't, FUNC may have decided that there was nothing
interesting below this point in the tree. */
if (!walk_subtrees)
- return NULL_TREE;
-
- code = TREE_CODE (*tp);
+ {
+ if (statement_code_p (code) || code == TREE_LIST || code == OVERLOAD)
+ /* But we still need to check our siblings. */
+ return walk_tree (&TREE_CHAIN (*tp), func, data, htab);
+ else
+ return NULL_TREE;
+ }
/* Handle common cases up front. */
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))