aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2023-03-03 17:48:47 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-25 09:44:16 +0200
commitf82ef0e92470b2c2afbdd7368cdd08f0c67a0606 (patch)
tree6885d54c952be65e471efab3e0a89d2e73ded094
parent9df64b72bb887ca8802df1a2731403d219bebb5f (diff)
downloadgcc-f82ef0e92470b2c2afbdd7368cdd08f0c67a0606.zip
gcc-f82ef0e92470b2c2afbdd7368cdd08f0c67a0606.tar.gz
gcc-f82ef0e92470b2c2afbdd7368cdd08f0c67a0606.tar.bz2
ada: Enrich documentation of subprogram
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.
-rw-r--r--gcc/ada/sem_ch3.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 0bddfa8..db2bbb5 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;