[Ada] Simplify membership tests with N_Delay_Statement subtype

gcc/ada/

	* exp_ch9.adb, sem_warn.adb: Simplify membership test.
This commit is contained in:
Piotr Trojanek 2020-11-29 22:30:17 +01:00 committed by Pierre-Marie de Rodat
parent 612c48b13b
commit 2c623ed86a
2 changed files with 2 additions and 5 deletions

View 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);

View 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;