From: Ronan Desplanques <[email protected]>
"Is_Ancestor_Package (E, E)" returns True and this patch fixes a comment
that claimed otherwise. This patch also renames an object local to
Is_Ancestor_Package that was misleadingly named "Par", a common
abbreviation of "Parent".
gcc/ada/ChangeLog:
* sem_util.ads (Is_Ancestor_Package): Fix documentation comment.
* sem_util.adb (Is_Ancestor_Package): Rename local object.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 8 ++++----
gcc/ada/sem_util.ads | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 8a3998d7d123..432b036396d7 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -15991,14 +15991,14 @@ package body Sem_Util is
(E1 : Entity_Id;
E2 : Entity_Id) return Boolean
is
- Par : Entity_Id := E2;
+ Cursor : Entity_Id := E2;
begin
- while Present (Par) and then Par /= Standard_Standard loop
- if Par = E1 then
+ while Present (Cursor) and then Cursor /= Standard_Standard loop
+ if Cursor = E1 then
return True;
end if;
- Par := Scope (Par);
+ Cursor := Scope (Cursor);
end loop;
return False;
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 04caed575065..88a1841cb389 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1849,7 +1849,7 @@ package Sem_Util is
function Is_Ancestor_Package
(E1 : Entity_Id;
E2 : Entity_Id) return Boolean;
- -- True if package E1 is an ancestor of E2 other than E2 itself
+ -- True if package E1 is an ancestor of E2
function Is_Atomic_Object (N : Node_Id) return Boolean;
-- Determine whether arbitrary node N denotes a reference to an atomic
--
2.43.0