]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Cleanup iteration over aggregate component associations
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 21 Jul 2022 09:32:27 +0000 (11:32 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 5 Sep 2022 07:21:06 +0000 (09:21 +0200)
Code cleanup related to fixes for iterated component associations in
GNATprove ; semantics is unaffected.

gcc/ada/

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

gcc/ada/sem_aggr.adb

index c9c0a76ca48d0db872be3bcf559004780380a5fd..4ad4a29373dc28ca4c39b201defc5954cc9cab9e 100644 (file)
@@ -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;