aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-04-09 14:53:56 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-29 14:23:47 +0000
commit898edf758e03a6cc31219405a667c75b67a726ca (patch)
tree69749a9c1b8385174595567094c2dc2853a9731a /gcc/ada/sem_ch6.adb
parent568d3d4656c347012eb7dd2f008845505eab3ca8 (diff)
[Ada] tech debt: Parent (Empty) is not allowed
gcc/ada/ * atree.adb, atree.ads (Parent, Set_Parent): Assert node is Present. (Copy_Parent, Parent_Kind): New helper routines. * gen_il-gen.adb: Add with clause. * nlists.adb (Parent): Assert Parent of list is Present. * aspects.adb, checks.adb, exp_aggr.adb, exp_ch6.adb, exp_util.adb, lib-xref-spark_specific.adb, osint.ads, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch6.adb, sem_dim.adb, sem_prag.adb, sem_res.adb, sem_util.adb, treepr.adb: Do not call Parent and Set_Parent on the Empty node. * libgnat/a-stwiun__shared.adb, libgnat/a-stzunb__shared.adb: Minor: Fix typos in comments. * einfo.ads: Minor comment update. * sinfo-utils.ads, sinfo-utils.adb (Parent_Kind, Copy_Parent): New functions.
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index d37f295d917..7b4b288e050 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -11709,7 +11709,7 @@ package body Sem_Ch6 is
if Inside_Freezing_Actions = 0
and then Is_Package_Or_Generic_Package (Current_Scope)
and then In_Private_Part (Current_Scope)
- and then Nkind (Parent (E)) = N_Private_Extension_Declaration
+ and then Parent_Kind (E) = N_Private_Extension_Declaration
and then Nkind (Parent (S)) = N_Full_Type_Declaration
and then Full_View (Defining_Identifier (Parent (E)))
= Defining_Identifier (Parent (S))