From 2c623ed86a387bcef5d1d0b7286d2df6d332ef06 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Sun, 29 Nov 2020 22:30:17 +0100 Subject: [PATCH] [Ada] Simplify membership tests with N_Delay_Statement subtype gcc/ada/ * exp_ch9.adb, sem_warn.adb: Simplify membership test. --- gcc/ada/exp_ch9.adb | 3 +-- gcc/ada/sem_warn.adb | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 525eee90029..b055b278da0 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -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); diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index d92975f4a5e..b5275a8b019 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -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; -- 2.30.2