[Ada] Remove duplicated calls to Set_Entity
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 26 Oct 2020 13:25:22 +0000 (14:25 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 26 Nov 2020 08:39:50 +0000 (03:39 -0500)
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
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb

index d06a4a8..7b358d4 100644 (file)
@@ -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.
index fc839b7..a7eacbc 100644 (file)
@@ -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);
 
index a5db24d..2a4874d 100644 (file)
@@ -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;
 
    ------------------------------