summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-11-19 09:01:09 -0500
committerPatrick Palka <ppalka@redhat.com>2021-11-19 09:01:09 -0500
commitcb09215ad0bbc96fd67aac16004d2131739df096 (patch)
tree41ce1f7ced4598dc8139c878578d5e3dd4c7bcbd
parentfd740165e54151ea794fca34904f5c2e2ea1dcda (diff)
c++: cp_walk_subtrees simplification for *_CAST_EXPR
Let walk_tree_1 do the operand walking for us. gcc/cp/ChangeLog: * tree.c (cp_walk_subtrees) <case *_CAST_EXPR>: Don't explicitly walk the operands.
-rw-r--r--gcc/cp/tree.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 32ddf835a91..7050a53abc2 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -5352,13 +5352,6 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
case BIT_CAST_EXPR:
if (TREE_TYPE (*tp))
WALK_SUBTREE (TREE_TYPE (*tp));
-
- {
- int i;
- for (i = 0; i < TREE_CODE_LENGTH (TREE_CODE (*tp)); ++i)
- WALK_SUBTREE (TREE_OPERAND (*tp, i));
- }
- *walk_subtrees_p = 0;
break;
case CONSTRUCTOR: