aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2025-02-07 14:43:37 +0100
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-06-05 10:18:38 +0200
commitb35d2322d7b970e1e6eab2094bfebbccf661ae17 (patch)
treea2d120a4e5163bab6893a9d315a9d38cd149f0d9
parentc657fe1488649a919f7cc48ea2b74c8aa062c5b8 (diff)
downloadgcc-b35d2322d7b970e1e6eab2094bfebbccf661ae17.zip
gcc-b35d2322d7b970e1e6eab2094bfebbccf661ae17.tar.gz
gcc-b35d2322d7b970e1e6eab2094bfebbccf661ae17.tar.bz2
ada: Tweak wording of documentation comments in Atree
This patch removes an outdated reference to the concept of node extensions in comments. It also slightly clarifies the documentation of Atree.Relocate_Node. gcc/ada/ChangeLog: * atree.ads (New_Copy, Relocate_Node): Tweak documentation comments.
-rw-r--r--gcc/ada/atree.ads15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index dc5fe0d..c8cc2bc 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -299,20 +299,19 @@ package Atree is
-- This function allocates a new node, and then initializes it by copying
-- the contents of the source node into it. The contents of the source node
-- is not affected. The target node is always marked as not being in a list
- -- (even if the source is a list member), and not overloaded. The new node
- -- will have an extension if the source has an extension. New_Copy (Empty)
- -- returns Empty, and New_Copy (Error) returns Error. Note that, unlike
- -- Copy_Separate_Tree, New_Copy does not recursively copy any descendants,
- -- so in general parent pointers are not set correctly for the descendants
- -- of the copied node.
+ -- (even if the source is a list member), and not overloaded.
+ -- New_Copy (Empty) returns Empty, and New_Copy (Error) returns Error. Note
+ -- that, unlike Copy_Separate_Tree, New_Copy does not recursively copy any
+ -- descendants, so in general parent pointers are not set correctly for the
+ -- descendants of the copied node.
function Relocate_Node (Source : Node_Id) return Node_Id;
-- Source is a non-entity node that is to be relocated. A new node is
-- allocated, and the contents of Source are copied to this node, using
-- New_Copy. The parent pointers of descendants of the node are then
-- adjusted to point to the relocated copy. The original node is not
- -- modified, but the parent pointers of its descendants are no longer
- -- valid. The new copy is always marked as not overloaded. This routine is
+ -- modified, but the parent pointers of its children no longer point back
+ -- at it. The new copy is always marked as not overloaded. This routine is
-- used in conjunction with the tree rewrite routines (see descriptions of
-- Replace/Rewrite).
--