aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.ads
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-01-27 12:37:25 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-22 10:44:07 +0200
commit01b0a60038a91d5607e8f64d18bfa43984255632 (patch)
tree426253e24706059c404949aeb3c8fba28f6ef409 /gcc/ada/sem_util.ads
parente7f7018c2a5f07e6e8a045b6ba18c023daed7010 (diff)
ada: Update Controlling_Argument when copying trees
When copying the AST we need to update fields that carry semantic meaning and not just copy them. We already updated some of them, e.g. the First/Next_Named_Association chain, but failed to update the Controlling_Argument. This fix doesn't appear to change anything for the compiler, but it is needed for GNATprove, where we no longer want to expand expression functions and instead we want to copy their preanalyzed expressions. gcc/ada/ * sem_util.ads (New_Copy_Tree): Update comment. * sem_util.adb (New_Copy_Tree): Update Controlling_Argument, very much like we update the First/Next_Named_Association.
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r--gcc/ada/sem_util.ads1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 42c6d249e2f..060d04241d3 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -2646,6 +2646,7 @@ package Sem_Util is
--
-- First_Named_Actual
-- Next_Named_Actual
+ -- Controlling_Argument
--
-- If applicable, the Etype field (if any) is updated to refer to a
-- local itype or type (see below).