diff mbox series

[Ada] Simplify repeated calls in printing of GNAT AST

Message ID 20220106171249.GA2921385@adacore.com
State New
Headers show
Series [Ada] Simplify repeated calls in printing of GNAT AST | expand

Commit Message

Pierre-Marie de Rodat Jan. 6, 2022, 5:12 p.m. UTC
Code cleanup; behaviour is unaffected.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

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

Patch

diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -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;