]> gcc.gnu.org Git - gcc.git/commitdiff
ada: Remove redundant guard against an empty list of interfaces
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 23 Aug 2023 13:53:07 +0000 (15:53 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 5 Sep 2023 11:05:16 +0000 (13:05 +0200)
Code cleanup; semantics is unaffected.

gcc/ada/

* sem_type.adb (Iface_Present_In_Ancestor): Remove guard for empty list
of interfaces; the following loop will work just fine without it.

gcc/ada/sem_type.adb

index 00a64152df1c1d795321973a124669b1efc74a3f..bbdcd5f24b8a5abaeb877cf7317d17e9d8bf1510 100644 (file)
@@ -2578,9 +2578,7 @@ package body Sem_Type is
          end if;
 
          loop
-            if Present (Interfaces (E))
-              and then not Is_Empty_Elmt_List (Interfaces (E))
-            then
+            if Present (Interfaces (E)) then
                Elmt := First_Elmt (Interfaces (E));
                while Present (Elmt) loop
                   AI := Node (Elmt);
This page took 0.061594 seconds and 5 git commands to generate.