[Ada] Simplify membership tests with N_Delay_Statement subtype
authorPiotr Trojanek <trojanek@adacore.com>
Sun, 29 Nov 2020 21:30:17 +0000 (22:30 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Dec 2020 13:01:03 +0000 (08:01 -0500)
gcc/ada/

* exp_ch9.adb, sem_warn.adb: Simplify membership test.

gcc/ada/exp_ch9.adb
gcc/ada/sem_warn.adb

index 525eee900292d6df88912c20aa9341985e282826..b055b278da0c4b39a1f7c825d83f3f4869125288 100644 (file)
@@ -7161,8 +7161,7 @@ package body Exp_Ch9 is
          if Ada_Version >= Ada_2005
            and then
              (No (Original_Node (Ecall))
-               or else Nkind (Original_Node (Ecall)) not in
-                         N_Delay_Relative_Statement | N_Delay_Until_Statement)
+               or else Nkind (Original_Node (Ecall)) not in N_Delay_Statement)
          then
             Extract_Dispatching_Call (Ecall, Call_Ent, Obj, Actuals, Formals);
 
index d92975f4a5ef27b88f7fdd07a63164d8d8501022..b5275a8b019da683b389d79da0a13c85702fc875 100644 (file)
@@ -750,9 +750,7 @@ package body Sem_Warn is
          Fstm : constant Node_Id :=
                   Original_Node (First (Statements (Loop_Statement)));
       begin
-         if Nkind (Fstm) = N_Delay_Relative_Statement
-           or else Nkind (Fstm) = N_Delay_Until_Statement
-         then
+         if Nkind (Fstm) in N_Delay_Statement then
             return;
          end if;
       end;