diff mbox series

[Ada] Remove unreferenced and dubious Is_Renaming_Declaration

Message ID 20200615080522.GA105652@adacore.com
State New
Headers show
Series [Ada] Remove unreferenced and dubious Is_Renaming_Declaration | expand

Commit Message

Pierre-Marie de Rodat June 15, 2020, 8:05 a.m. UTC
Routine Is_Renaming_Declaration was added to support the Ghost aspect in
SPARK, but later its only callee has been removed when handling of this
aspect was fixed; now it is unreferenced. Also, it is dubious whether we
ever needed this routine (and whether we needed to explicitly list
renaming node kinds in its body), because we already have an
N_Renaming_Declaration subtype.

Tested on x86_64-pc-linux-gnu, committed on trunk

2020-06-15  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* sem_util.ads, sem_util.adb (Is_Renaming_Declaration): Remove.
diff mbox series

Patch

--- gcc/ada/sem_util.adb
+++ gcc/ada/sem_util.adb
@@ -18081,28 +18081,6 @@  package body Sem_Util is
       return False;
    end Is_Renamed_Entry;
 
-   -----------------------------
-   -- Is_Renaming_Declaration --
-   -----------------------------
-
-   function Is_Renaming_Declaration (N : Node_Id) return Boolean is
-   begin
-      case Nkind (N) is
-         when N_Exception_Renaming_Declaration
-            | N_Generic_Function_Renaming_Declaration
-            | N_Generic_Package_Renaming_Declaration
-            | N_Generic_Procedure_Renaming_Declaration
-            | N_Object_Renaming_Declaration
-            | N_Package_Renaming_Declaration
-            | N_Subprogram_Renaming_Declaration
-          =>
-            return True;
-
-         when others =>
-            return False;
-      end case;
-   end Is_Renaming_Declaration;
-
    ----------------------------
    -- Is_Reversible_Iterator --
    ----------------------------

--- gcc/ada/sem_util.ads
+++ gcc/ada/sem_util.ads
@@ -2000,9 +2000,6 @@  package Sem_Util is
    function Is_Renamed_Entry (Proc_Nam : Entity_Id) return Boolean;
    --  Return True if Proc_Nam is a procedure renaming of an entry
 
-   function Is_Renaming_Declaration (N : Node_Id) return Boolean;
-   --  Determine whether arbitrary node N denotes a renaming declaration
-
    function Is_Reversible_Iterator (Typ : Entity_Id) return Boolean;
    --  AI05-0139-2: Check whether Typ is derived from the predefined interface
    --  Ada.Iterator_Interfaces.Reversible_Iterator.