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/freeze.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/freeze.adb')
-rw-r--r-- | gcc/ada/freeze.adb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 346904e..888e2ec 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3793,7 +3793,7 @@ package body Freeze is -- Set component size if not already set by a component -- size clause. - if not Present (Comp_Size_C) then + if No (Comp_Size_C) then Set_Component_Size (Arr, Csiz); end if; @@ -3805,7 +3805,7 @@ package body Freeze is -- explicitly, then generate a warning. if Has_Pragma_Pack (Arr) - and then not Present (Comp_Size_C) + and then No (Comp_Size_C) and then (Csiz = 7 or else Csiz = 15 or else Csiz = 31) and then Known_Esize (Base_Type (Ctyp)) and then Esize (Base_Type (Ctyp)) = Csiz + 1 @@ -7059,7 +7059,7 @@ package body Freeze is -- end of a declarative part. if Is_Library_Level_Tagged_Type (E) - and then not Present (Full_View (E)) + and then No (Full_View (E)) then Set_Is_Frozen (E, False); goto Leave; @@ -7467,7 +7467,7 @@ package body Freeze is -- If no formal is passed in, then issue an error for a -- missing formal. - elsif not Present (Pool_Op_Formal) then + elsif No (Pool_Op_Formal) then Error_Msg_NE ("simple storage pool op missing formal " & Formal_Name & " of type&", Pool_Op, Expected_Type); @@ -7599,7 +7599,7 @@ package body Freeze is -- and no excess formals are present, then this -- operation has been validated, so record it. - if not Present (Formal) and then Is_OK then + if No (Formal) and then Is_OK then Found_Op := Op; end if; end if; @@ -7611,7 +7611,7 @@ package body Freeze is -- so issue an error if none was found. if Op_Name = Name_Allocate - and then not Present (Found_Op) + and then No (Found_Op) then Error_Msg_N ("missing % operation for simple " & "storage pool type", Pool_Type); |