[Ada] Extend function to retrieve first/last nodes to all declarations
authorYannick Moy <moy@adacore.com>
Wed, 10 Feb 2021 14:23:06 +0000 (15:23 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 15 Jun 2021 10:19:37 +0000 (06:19 -0400)
gcc/ada/

* errout.adb (First_And_Last_Node): Also apply to arbitrary late
declarations, not only subprogram specs.

gcc/ada/errout.adb

index 09092f9..42a1099 100644 (file)
@@ -1785,7 +1785,7 @@ package body Errout is
                        | N_Declaration
                        | N_Access_To_Subprogram_Definition
                        | N_Generic_Instantiation
-                       | N_Subprogram_Declaration
+                       | N_Later_Decl_Item
                        | N_Use_Package_Clause
                        | N_Array_Type_Definition
                        | N_Renaming_Declaration