]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Improve readability in Atree.Rewrite body
authorRonan Desplanques <desplanques@adacore.com>
Fri, 28 Feb 2025 11:19:12 +0000 (12:19 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:03 +0000 (08:32 +0200)
This patch visually packs together the statements that implement the
exceptions in Rewrite that a few fields are not actually overwritten, in
order to improve the readability of the code.

gcc/ada/ChangeLog:

* atree.adb (Rewrite): Improve readability.

gcc/ada/atree.adb

index 8a69a0c224de352ab9192144dcf6d62078647e6a..3fa55a7fc6531e23d9bbe3321fb262afcea5172c 100644 (file)
@@ -2271,10 +2271,10 @@ package body Atree is
       --  Copy substitute node into place, preserving old fields as required
 
       Copy_Node (Source => New_Node, Destination => Old_Node);
-      Set_Error_Posted (Old_Node, Old_Error_Posted);
 
       Set_Check_Actuals (Old_Node, Old_CA);
       Set_Is_Ignored_Ghost_Node (Old_Node, Old_Is_IGN);
+      Set_Error_Posted (Old_Node, Old_Error_Posted);
 
       if Nkind (New_Node) in N_Subexpr then
          Set_Paren_Count     (Old_Node, Old_Paren_Count);