[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 f317d8f..b6a6525 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;