aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch5.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-04-11 12:38:06 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-17 04:14:08 -0400
commit73642e6899a36de223ea07292e8e7236fb22aee7 (patch)
tree1b58f1ccfb6f7e2287fcb44b38b2ab583742176d /gcc/ada/exp_ch5.adb
parent2ead6a05ac937063483ab73a5b63c98bcd5e3f98 (diff)
downloadgcc-73642e6899a36de223ea07292e8e7236fb22aee7.zip
gcc-73642e6899a36de223ea07292e8e7236fb22aee7.tar.gz
gcc-73642e6899a36de223ea07292e8e7236fb22aee7.tar.bz2
[Ada] Add assertions to Preserve_Comes_From_Source and reuse it
2020-06-17 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * atree.adb (Preserve_Comes_From_Source): Rewrite using Set_Comes_From_Source and Comes_From_Source, which enforce that the parameters are valid. * exp_ch4.adb, exp_ch5.adb, sem_ch12.adb, sem_ch6.adb, sem_res.adb: Rewrite using Preserve_Comes_From_Source.
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r--gcc/ada/exp_ch5.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 458b545..0634ffc 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -3741,7 +3741,7 @@ package body Exp_Ch5 is
-- specific to pure if statements, however (see
-- Sem_Ch5.Analyze_If_Statement).
- Set_Comes_From_Source (New_If, Comes_From_Source (N));
+ Preserve_Comes_From_Source (New_If, N);
return;
-- No special processing for that elsif part, move to next