diff options
author | Ghjuvan Lacambre <lacambre@adacore.com> | 2022-09-17 19:35:48 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-11-04 14:47:26 +0100 |
commit | 7d0d27d90dbd8ecab7f8852a807d86a84e31a61c (patch) | |
tree | 800a5e631c92c62e70cf51c453a453ebfc5b89c3 /gcc/ada/checks.adb | |
parent | 587af00955c02040f1c552f7b0381f4ec4f1c3f9 (diff) | |
download | gcc-7d0d27d90dbd8ecab7f8852a807d86a84e31a61c.zip gcc-7d0d27d90dbd8ecab7f8852a807d86a84e31a61c.tar.gz gcc-7d0d27d90dbd8ecab7f8852a807d86a84e31a61c.tar.bz2 |
ada: Refactor: replace uses of `not Present(X)` with `No (X)`
`No (X)` is essentially `not Present (X)`, there's no reason for not
using this shorter form.
gcc/ada/
* checks.adb, exp_atag.adb, exp_attr.adb, exp_ch4.adb, exp_ch6.adb,
exp_ch7.adb, exp_dbug.adb, exp_disp.adb, exp_unst.adb, exp_util.adb,
freeze.adb, layout.adb, pprint.adb, rtsfind.adb, sem_aggr.adb,
sem_attr.adb, sem_case.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb,
sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb,
sem_util.adb, sem_warn.adb:
Replace uses of `not Present (X)` with `No (X)`.
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 8fa16b8..4741294 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -593,7 +593,7 @@ package body Checks is pragma Assert (not No_Dynamic_Accessibility_Checks_Enabled (N)); if Ada_Version >= Ada_2012 - and then not Present (Param_Ent) + and then No (Param_Ent) and then Is_Entity_Name (N) and then Ekind (Entity (N)) in E_Constant | E_Variable and then Present (Effective_Extra_Accessibility (Entity (N))) @@ -778,7 +778,7 @@ package body Checks is -- Note: Expr is empty if the address-clause is applied to in-mode -- actuals (allowed by 13.1(22)). - if not Present (Expr) + if No (Expr) or else (Is_Entity_Name (Expression (AC)) and then Ekind (Entity (Expression (AC))) = E_Constant |