[Ada] Cleanup iteration over aggregate component associations

Message ID 20220905072615.GA1174852@poulhies-Precision-5550
State New, archived
Headers
Series [Ada] Cleanup iteration over aggregate component associations |

Commit Message

Marc Poulhiès Sept. 5, 2022, 7:26 a.m. UTC
  Code cleanup related to fixes for iterated component associations in
GNATprove ; semantics is unaffected.

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

gcc/ada/

	* sem_aggr.adb
	(Resolve_Container_Aggregate): Style cleanup.
	(Resolve_Record_Aggregate): Remove redundant guard.
  

Patch

diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -3182,7 +3182,7 @@  package body Sem_Aggr is
             end if;
          end;
 
-      elsif  Present (Add_Named_Subp) then
+      elsif Present (Add_Named_Subp) then
          declare
             --  Retrieves types of container, key, and element from the
             --  specified insertion procedure.
@@ -5048,9 +5048,7 @@  package body Sem_Aggr is
       --    OTHERS cannot be used.
       --    Positional and named associations cannot be mixed.
 
-      if Present (Component_Associations (N))
-        and then Present (First (Component_Associations (N)))
-      then
+      if Present (Component_Associations (N)) then
          declare
             Assoc : Node_Id;