]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Simplify repeated calls in printing of GNAT AST
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 3 Dec 2021 12:23:36 +0000 (13:23 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 6 Jan 2022 17:11:31 +0000 (17:11 +0000)
gcc/ada/

* treepr.adb (Visit_Node): Simplify repeated call to
Next_Entity.

gcc/ada/treepr.adb

index f317d8fd660f5887fbaa3fca6f0d73a806fd75d4..b6a652545ef7352e07e09d0ed1e07931790949f4 100644 (file)
@@ -2305,8 +2305,8 @@ package body Treepr is
             begin
                Nod := N;
                while Present (Nod) loop
-                  Visit_Descendant (Union_Id (Next_Entity (Nod)));
                   Next_Entity (Nod);
+                  Visit_Descendant (Union_Id (Nod));
                end loop;
             end;
          end if;