diff options
author | Arnaud Charlet <charlet@adacore.com> | 2020-06-13 11:33:04 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-27 04:05:18 -0400 |
commit | 4a08c95cf0604a96e6fc48102365ef0d498f11ae (patch) | |
tree | 4251c81960f577683ea9280d94b6d0ffb13948b4 /gcc/ada/sem.adb | |
parent | 26ac7446f607b1b031bbd38fab28265fd772f8a5 (diff) | |
download | gcc-4a08c95cf0604a96e6fc48102365ef0d498f11ae.zip gcc-4a08c95cf0604a96e6fc48102365ef0d498f11ae.tar.gz gcc-4a08c95cf0604a96e6fc48102365ef0d498f11ae.tar.bz2 |
[Ada] Use membership tests in front-end
gcc/ada/
* aspects.adb, atree.adb, atree.ads, checks.adb, contracts.adb,
einfo.adb, errout.adb, exp_aggr.adb, exp_attr.adb, exp_cg.adb,
exp_ch11.adb, exp_ch2.adb, exp_ch3.adb, exp_ch4.adb,
exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_ch8.adb, exp_ch9.adb,
exp_dbug.adb, exp_disp.adb, exp_intr.adb, exp_pakd.adb,
exp_prag.adb, exp_put_image.adb, exp_smem.adb, exp_tss.adb,
exp_unst.adb, exp_util.adb, freeze.adb, ghost.adb, gnat1drv.adb,
inline.adb, lib-writ.adb, lib-xref-spark_specific.adb,
lib-xref.adb, namet.adb, namet.ads, nlists.adb, par-ch10.adb,
par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb,
par-prag.adb, par-util.adb, par_sco.adb, pprint.adb,
repinfo.adb, restrict.adb, rtsfind.adb, scil_ll.adb, sem.adb,
sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb,
sem_ch10.adb, sem_ch11.adb, sem_ch12.adb, sem_ch13.adb,
sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch7.adb,
sem_ch8.adb, sem_ch9.adb, sem_dim.adb, sem_disp.adb,
sem_dist.adb, sem_elab.adb, sem_elim.adb, sem_eval.adb,
sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb,
sem_scil.adb, sem_type.adb, sem_util.adb, sem_warn.adb,
sinfo.adb, sinfo.ads, sprint.adb, styleg.adb, tbuild.adb,
treepr.adb (Nkind_In, Nam_In, Ekind_In): Removed, replaced by
membership tests.
Diffstat (limited to 'gcc/ada/sem.adb')
-rw-r--r-- | gcc/ada/sem.adb | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index 5474e08..4429b6b 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -799,7 +799,7 @@ package body Sem is -- and because the reference may become overloaded in the instance. elsif GNATprove_Mode - and then Nkind_In (N, N_Expanded_Name, N_Identifier) + and then Nkind (N) in N_Expanded_Name | N_Identifier and then not Is_Overloaded (N) and then not Inside_A_Generic then @@ -1739,7 +1739,7 @@ package body Sem is begin -- Problem does not arise with main subprograms - if not Nkind_In (MCU, N_Package_Body, N_Package_Declaration) then + if Nkind (MCU) not in N_Package_Body | N_Package_Declaration then return False; end if; @@ -1854,13 +1854,12 @@ package body Sem is -- N_Null_Statement will happen in case of a ghost unit -- which gets rewritten. - if not Nkind_In - (Unit (Withed_Unit), - N_Generic_Package_Declaration, - N_Package_Body, - N_Package_Renaming_Declaration, - N_Subprogram_Body, - N_Null_Statement) + if Nkind (Unit (Withed_Unit)) not in + N_Generic_Package_Declaration | + N_Package_Body | + N_Package_Renaming_Declaration | + N_Subprogram_Body | + N_Null_Statement then Write_Unit_Name (Unit_Name (Get_Cunit_Unit_Number (Withed_Unit))); @@ -1960,7 +1959,7 @@ package body Sem is -- Process the unit if it is a spec or the main unit, if it -- has no previous spec or we have done all other units. - if not Nkind_In (Item, N_Package_Body, N_Subprogram_Body) + if Nkind (Item) not in N_Package_Body | N_Subprogram_Body or else Acts_As_Spec (CU) then if CU = Main_CU and then not Do_Main then |