]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Enrich documentation of subprogram
authorRonan Desplanques <desplanques@adacore.com>
Fri, 3 Mar 2023 16:48:47 +0000 (17:48 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:16 +0000 (09:44 +0200)
This patch adds documentation to the subprogram Replace_Type in
Sem_Ch3. In particular, references to relevant parts of the Ada
reference manual are added.

gcc/ada/

* sem_ch3.adb (Replace_Type): Add more documentation.

gcc/ada/sem_ch3.adb

index 0bddfa8446308dfe3835745d435bdf20962426fd..db2bbb5ee8e3b0e76d17bc20ef2b2dc40486dfb2 100644 (file)
@@ -15849,7 +15849,11 @@ package body Sem_Ch3 is
       --  derived type.
 
       procedure Replace_Type (Id, New_Id : Entity_Id);
-      --  When the type is an anonymous access type, create a new access type
+      --  Set the Etype of New_Id to the appropriate subtype determined from
+      --  the Etype of Id, following (RM 3.4 (18, 19, 20, 21)). Id is either
+      --  the parent type's primitive subprogram or one of its formals, and
+      --  New_Id is the corresponding entity for the derived type. When the
+      --  Etype of Id is an anonymous access type, create a new access type
       --  designating the derived type.
 
       procedure Set_Derived_Name;