From: Ronan Desplanques <desplanq...@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(-) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 0bddfa84463..db2bbb5ee8e 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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; -- 2.40.0