From 433b2e91f9ea5ebc1513abd9a749dbde832a7634 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 26 Oct 2020 14:25:22 +0100 Subject: [PATCH] [Ada] Remove duplicated calls to Set_Entity gcc/ada/ * sem_ch4.adb (Indicate_Name_And_Type): Fix whitespace in comment. * sem_res.adb (Resolve_Call): Remove redundant parens. * sem_util.adb (Set_Entity_With_Checks): Remove extra call to Set_Entity. --- gcc/ada/sem_ch4.adb | 2 +- gcc/ada/sem_res.adb | 2 +- gcc/ada/sem_util.adb | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index d06a4a8..7b358d4 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -3414,7 +3414,7 @@ package body Sem_Ch4 is Success := True; -- If the prefix of the call is a name, indicate the entity - -- being called. If it is not a name, it is an expression that + -- being called. If it is not a name, it is an expression that -- denotes an access to subprogram or else an entry or family. In -- the latter case, the name is a selected component, and the entity -- being called is noted on the selector. diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index fc839b7..a7eacbc 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6293,7 +6293,7 @@ package body Sem_Res is -- Normal subprogram call with name established in Resolve - elsif not (Is_Type (Entity (Subp))) then + elsif not Is_Type (Entity (Subp)) then Nam := Entity (Subp); Set_Entity_With_Checks (Subp, Nam); diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index a5db24d..2a4874d 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -27600,8 +27600,6 @@ package body Sem_Util is Style.Check_Identifier (Nod, Val_Actual); end if; end if; - - Set_Entity (N, Val); end Set_Entity_With_Checks; ------------------------------ -- 2.7.4