]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Improve comment on First_Entity
authorBob Duff <duff@adacore.com>
Fri, 13 Jan 2023 13:03:08 +0000 (08:03 -0500)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 15 May 2023 09:36:42 +0000 (11:36 +0200)
Clarify that "act as scope" overlaps with "[sub]type".

gcc/ada/

* einfo.ads:
(First_Entity): Update comment explaining why this exists on all
[sub]types, as opposed to just the ones with associated entities.

gcc/ada/einfo.ads

index 878737c7cc162924ddecde716a0d5e6b7819bae9..6748533a32c879ffbbfb8cb68878dd7f154121fe 100644 (file)
@@ -1347,11 +1347,12 @@ package Einfo is
 
 --    First_Entity
 --       Defined in all entities that act as scopes to which a list of
---       associated entities is attached. This is defined in all [sub]types,
---       including things like scalars that cannot have nested entities,
---       which makes it more convenient to Mutate_Entity between type kinds.
---       Points to a list of associated entities using the Next_Entity field
---       as a chain pointer with Empty marking the end of the list.
+--       associated entities is attached, and also in all [sub]types. Some
+--       entities are both; for example E_Record_Type acts as a scope and
+--       is a type. [Sub]types that do not act as scopes (e.g. scalars) are
+--       included to make it more convenient to Mutate_Entity between type
+--       kinds. Points to a list of associated entities linked through the
+--       Next_Entity field with Empty marking end-of-list.
 --       See also Last_Entity.
 
 --    First_Exit_Statement