From d5e6a22b54b0bfc78288c7ffb94ac6afad39ee7e Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 24 Jan 2022 12:19:19 +0100 Subject: [PATCH] [Ada] Simplify call to overloaded Earlier_In_Extended_Unit We have two variants of Earlier_In_Extended_Unit that take either Node_Id or Source_Ptr values. The caller can simply use another variant and not explicitly convert parameters. Code cleanup; semantics is unaffected. gcc/ada/ * sem_warn.adb (Check_Unset_Reference): Use variant of Earlier_In_Extended_Unit that calls Sloc internally. --- gcc/ada/sem_warn.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index d1f2036..f86c2c7 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -1915,7 +1915,7 @@ package body Sem_Warn is and then (No (Unset_Reference (E)) or else Earlier_In_Extended_Unit - (Sloc (N), Sloc (Unset_Reference (E)))) + (N, Unset_Reference (E))) and then not Has_Pragma_Unmodified_Check_Spec (E) and then not Warnings_Off_Check_Spec (E) and then not Has_Junk_Name (E) -- 2.7.4