diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2018-08-21 14:50:03 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-08-21 14:50:03 +0000 |
commit | 92a68a0464fc59667a3713c2a041b9f4582122a4 (patch) | |
tree | bc4a2c0acd603dd31646404b2abf2c573e7f272b /gcc/ada/contracts.adb | |
parent | 5ec8edb56ea77f8627b6fc7b9f95751d27cd9162 (diff) | |
download | gcc-92a68a0464fc59667a3713c2a041b9f4582122a4.zip gcc-92a68a0464fc59667a3713c2a041b9f4582122a4.tar.gz gcc-92a68a0464fc59667a3713c2a041b9f4582122a4.tar.bz2 |
[Ada] Minor reformattings
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* checks.adb, contracts.adb, exp_aggr.adb, exp_attr.adb,
exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb,
exp_util.adb, freeze.adb, gnatlink.adb, layout.adb,
lib-writ.adb, lib-xref-spark_specific.adb, sem_ch13.adb,
sem_ch3.adb, sem_ch6.adb, sem_res.adb, sem_util.adb, sinfo.ads,
sprint.adb: Minor reformatting.
From-SVN: r263737
Diffstat (limited to 'gcc/ada/contracts.adb')
-rw-r--r-- | gcc/ada/contracts.adb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index e70765a..26a8d28 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -592,18 +592,20 @@ package body Contracts is null; -- Otherwise analyze the pre/postconditions. Their expressions - -- might include references to types that are not frozen yet, - -- in the case where the body is a rewritten expression function - -- that is a completion, so freeze all types within before - -- constructing the contract code. + -- might include references to types that are not frozen yet, in the + -- case where the body is a rewritten expression function that is a + -- completion, so freeze all types within before constructing the + -- contract code. else declare - Bod : Node_Id; + Bod : Node_Id; Freeze_Types : Boolean := False; + begin if Present (Freeze_Id) then Bod := Unit_Declaration_Node (Freeze_Id); + if Nkind (Bod) = N_Subprogram_Body and then Was_Expression_Function (Bod) and then Ekind (Subp_Id) = E_Function @@ -617,8 +619,11 @@ package body Contracts is Prag := Pre_Post_Conditions (Items); while Present (Prag) loop if Freeze_Types then - Freeze_Expr_Types (Subp_Id, Standard_Boolean, - Expression (Corresponding_Aspect (Prag)), Bod); + Freeze_Expr_Types + (Def_Id => Subp_Id, + Typ => Standard_Boolean, + Expr => Expression (Corresponding_Aspect (Prag)), + N => Bod); end if; Analyze_Pre_Post_Condition_In_Decl_Part (Prag, Freeze_Id); |