[COMMITTED] ada: Enrich documentation of subprogram
Checks
Commit Message
From: Ronan Desplanques <desplanques@adacore.com>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch3.adb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -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;