]> gcc.gnu.org Git - gcc.git/commitdiff
c++: cp_walk_subtrees simplification for *_CAST_EXPR
authorPatrick Palka <ppalka@redhat.com>
Fri, 19 Nov 2021 14:01:09 +0000 (09:01 -0500)
committerPatrick Palka <ppalka@redhat.com>
Fri, 19 Nov 2021 14:01:09 +0000 (09:01 -0500)
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.

gcc/cp/tree.c

index 32ddf835a9184a60a1453b4fdf51580050b0705f..7050a53abc2edb32753e0b71bfa0eb35a7a6f0c3 100644 (file)
@@ -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:
This page took 0.071566 seconds and 5 git commands to generate.