]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Use membership tests in front-end
authorArnaud Charlet <charlet@adacore.com>
Sat, 13 Jun 2020 15:33:04 +0000 (11:33 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 27 Jul 2020 08:05:18 +0000 (04:05 -0400)
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.

89 files changed:
gcc/ada/aspects.adb
gcc/ada/atree.adb
gcc/ada/atree.ads
gcc/ada/checks.adb
gcc/ada/contracts.adb
gcc/ada/einfo.adb
gcc/ada/errout.adb
gcc/ada/exp_aggr.adb
gcc/ada/exp_attr.adb
gcc/ada/exp_cg.adb
gcc/ada/exp_ch11.adb
gcc/ada/exp_ch2.adb
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch5.adb
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch7.adb
gcc/ada/exp_ch8.adb
gcc/ada/exp_ch9.adb
gcc/ada/exp_dbug.adb
gcc/ada/exp_disp.adb
gcc/ada/exp_intr.adb
gcc/ada/exp_pakd.adb
gcc/ada/exp_prag.adb
gcc/ada/exp_put_image.adb
gcc/ada/exp_smem.adb
gcc/ada/exp_tss.adb
gcc/ada/exp_unst.adb
gcc/ada/exp_util.adb
gcc/ada/freeze.adb
gcc/ada/ghost.adb
gcc/ada/gnat1drv.adb
gcc/ada/inline.adb
gcc/ada/lib-writ.adb
gcc/ada/lib-xref-spark_specific.adb
gcc/ada/lib-xref.adb
gcc/ada/namet.adb
gcc/ada/namet.ads
gcc/ada/nlists.adb
gcc/ada/par-ch10.adb
gcc/ada/par-ch2.adb
gcc/ada/par-ch3.adb
gcc/ada/par-ch4.adb
gcc/ada/par-ch5.adb
gcc/ada/par-ch6.adb
gcc/ada/par-prag.adb
gcc/ada/par-util.adb
gcc/ada/par_sco.adb
gcc/ada/pprint.adb
gcc/ada/repinfo.adb
gcc/ada/restrict.adb
gcc/ada/rtsfind.adb
gcc/ada/scil_ll.adb
gcc/ada/sem.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_aux.adb
gcc/ada/sem_cat.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch11.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_ch5.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch7.adb
gcc/ada/sem_ch8.adb
gcc/ada/sem_ch9.adb
gcc/ada/sem_dim.adb
gcc/ada/sem_disp.adb
gcc/ada/sem_dist.adb
gcc/ada/sem_elab.adb
gcc/ada/sem_elim.adb
gcc/ada/sem_eval.adb
gcc/ada/sem_intr.adb
gcc/ada/sem_mech.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_scil.adb
gcc/ada/sem_type.adb
gcc/ada/sem_util.adb
gcc/ada/sem_warn.adb
gcc/ada/sinfo.adb
gcc/ada/sinfo.ads
gcc/ada/sprint.adb
gcc/ada/styleg.adb
gcc/ada/tbuild.adb
gcc/ada/treepr.adb

index c55f4ed6b16a8c3ad927c86cd6348a4a004bdc21..c222c33efe07ebdd2b6efc44080bda01a5b0fd5b 100644 (file)
@@ -142,12 +142,9 @@ package body Aspects is
       --  The routine should be invoked on a body [stub] with aspects
 
       pragma Assert (Has_Aspects (N));
-      pragma Assert (Nkind (N) in N_Body_Stub
-                       or else Nkind_In (N, N_Entry_Body,
-                                            N_Package_Body,
-                                            N_Protected_Body,
-                                            N_Subprogram_Body,
-                                            N_Task_Body));
+      pragma Assert
+        (Nkind (N) in N_Body_Stub      | N_Entry_Body      | N_Package_Body |
+                      N_Protected_Body | N_Subprogram_Body | N_Task_Body);
 
       --  Look through all aspects and see whether they can be applied to a
       --  body [stub].
@@ -401,9 +398,8 @@ package body Aspects is
             --  Note: It is better to use Is_Single_Concurrent_Type_Declaration
             --  here, but Aspects and Sem_Util have incompatible licenses.
 
-            elsif Nkind_In
-                    (Original_Node (From), N_Single_Protected_Declaration,
-                                           N_Single_Task_Declaration)
+            elsif Nkind (Original_Node (From)) in
+                    N_Single_Protected_Declaration | N_Single_Task_Declaration
             then
                Asp_Id := Get_Aspect_Id (Asp);
 
index 1a00f59d7d26e0aaab6715196891f58aab2e963e..7e05a484bc6ed2356f7493a9f79b5485ab795a7e 100644 (file)
@@ -994,336 +994,6 @@ package body Atree is
       return N_To_E (Nodes.Table (E + 1).Nkind);
    end Ekind;
 
-   --------------
-   -- Ekind_In --
-   --------------
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8;
-   end Ekind_In;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind;
-      V9 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8 or else
-             T = V9;
-   end Ekind_In;
-
-   function Ekind_In
-     (T   : Entity_Kind;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8 or else
-             T = V9 or else
-             T = V10;
-   end Ekind_In;
-
-   function Ekind_In
-     (T   : Entity_Kind;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind;
-      V11 : Entity_Kind) return Boolean
-   is
-   begin
-      return T = V1  or else
-             T = V2  or else
-             T = V3  or else
-             T = V4  or else
-             T = V5  or else
-             T = V6  or else
-             T = V7  or else
-             T = V8  or else
-             T = V9  or else
-             T = V10 or else
-             T = V11;
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4, V5);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8);
-   end Ekind_In;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind;
-      V9 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8, V9);
-   end Ekind_In;
-
-   function Ekind_In
-     (E   : Entity_Id;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind) return Boolean
-   is
-   begin
-      return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10);
-   end Ekind_In;
-
-   function Ekind_In
-     (E   : Entity_Id;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind;
-      V11 : Entity_Kind) return Boolean
-   is
-   begin
-      return
-        Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11);
-   end Ekind_In;
-
    ------------------
    -- Error_Posted --
    ------------------
@@ -1783,171 +1453,6 @@ package body Atree is
       return Nodes.Table (N).Nkind;
    end Nkind;
 
-   --------------
-   -- Nkind_In --
-   --------------
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8);
-   end Nkind_In;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind;
-      V9 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8, V9);
-   end Nkind_In;
-
-   function Nkind_In
-     (N   : Node_Id;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10);
-   end Nkind_In;
-
-   function Nkind_In
-     (N   : Node_Id;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10,
-                                  V11);
-   end Nkind_In;
-
-   function Nkind_In
-     (N   : Node_Id;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind;
-      V12 : Node_Kind;
-      V13 : Node_Kind;
-      V14 : Node_Kind;
-      V15 : Node_Kind;
-      V16 : Node_Kind;
-      V17 : Node_Kind) return Boolean
-   is
-   begin
-      return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10,
-                                  V11, V12, V13, V14, V15, V16, V17);
-   end Nkind_In;
-
    --------
    -- No --
    --------
index 68415d49ecb1f6c57b1329b0d6c18aa6f8a20f67..e958a9b7af58cb1d51a3c7a61d53e9334ec915a2 100644 (file)
@@ -670,335 +670,6 @@ package Atree is
    function Sloc                         (N : Node_Id) return Source_Ptr;
    pragma Inline (Sloc);
 
-   ---------------------
-   -- Node_Kind Tests --
-   ---------------------
-
-   --  These are like the functions in Sinfo, but the first argument is a
-   --  Node_Id, and the tested field is Nkind (N).
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N  : Node_Id;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind;
-      V9 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N   : Node_Id;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (N   : Node_Id;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind) return Boolean;
-
-   --  12..16-parameter versions are not yet needed
-
-   function Nkind_In
-     (N   : Node_Id;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind;
-      V12 : Node_Kind;
-      V13 : Node_Kind;
-      V14 : Node_Kind;
-      V15 : Node_Kind;
-      V16 : Node_Kind;
-      V17 : Node_Kind) return Boolean;
-
-   pragma Inline (Nkind_In);
-   --  Inline all above functions
-
-   -----------------------
-   -- Entity_Kind_Tests --
-   -----------------------
-
-   --  Utility functions to test whether an Entity_Kind value, either given
-   --  directly as the first argument, or the Ekind field of an Entity given
-   --  as the first argument, matches any of the given list of Entity_Kind
-   --  values. Return True if any match, False if no match.
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E  : Entity_Id;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind;
-      V9 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E   : Entity_Id;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (E   : Entity_Id;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind;
-      V11 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T  : Entity_Kind;
-      V1 : Entity_Kind;
-      V2 : Entity_Kind;
-      V3 : Entity_Kind;
-      V4 : Entity_Kind;
-      V5 : Entity_Kind;
-      V6 : Entity_Kind;
-      V7 : Entity_Kind;
-      V8 : Entity_Kind;
-      V9 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T   : Entity_Kind;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind) return Boolean;
-
-   function Ekind_In
-     (T   : Entity_Kind;
-      V1  : Entity_Kind;
-      V2  : Entity_Kind;
-      V3  : Entity_Kind;
-      V4  : Entity_Kind;
-      V5  : Entity_Kind;
-      V6  : Entity_Kind;
-      V7  : Entity_Kind;
-      V8  : Entity_Kind;
-      V9  : Entity_Kind;
-      V10 : Entity_Kind;
-      V11 : Entity_Kind) return Boolean;
-
-   pragma Inline (Ekind_In);
-   --  Inline all above functions
-
    -----------------------------
    -- Entity Access Functions --
    -----------------------------
index 46a878e7e38afb112737bc75e11cc3ccdac878dc..9de21d6a49c0fcab501261f842dc2e22257f2da9 100644 (file)
@@ -433,7 +433,7 @@ package body Checks is
          --  Nothing to do for Rem/Mod/Plus (overflow not possible, the check
          --  for zero-divide is a divide check, not an overflow check).
 
-         if Nkind_In (N, N_Op_Rem, N_Op_Mod, N_Op_Plus) then
+         if Nkind (N) in N_Op_Rem | N_Op_Mod | N_Op_Plus then
             return;
          end if;
       end if;
@@ -585,7 +585,7 @@ package body Checks is
       if Ada_Version >= Ada_2012
          and then not Present (Param_Ent)
          and then Is_Entity_Name (N)
-         and then Ekind_In (Entity (N), E_Constant, E_Variable)
+         and then Ekind (Entity (N)) in E_Constant | E_Variable
          and then Present (Effective_Extra_Accessibility (Entity (N)))
       then
          Param_Ent := Entity (N);
@@ -621,9 +621,8 @@ package body Checks is
          --  deepest type level so as to appropriatly handle the rules for
          --  RM 3.10.2 (10.1/3).
 
-         if Ekind_In (Scope (Param_Ent), E_Function,
-                                         E_Operator,
-                                         E_Subprogram_Type)
+         if Ekind (Scope (Param_Ent))
+              in E_Function | E_Operator | E_Subprogram_Type
            and then Present (Extra_Accessibility_Of_Result (Scope (Param_Ent)))
          then
             Type_Level :=
@@ -1204,7 +1203,7 @@ package body Checks is
          --  there is no overflow check that starts from that parent node,
          --  so apply check now.
 
-         if Nkind_In (P, N_If_Expression, N_Case_Expression)
+         if Nkind (P) in N_If_Expression | N_Case_Expression
            and then not Is_Signed_Integer_Arithmetic_Op (Parent (P))
          then
             null;
@@ -2713,11 +2712,11 @@ package body Checks is
          --    mode IN OUT - Pre, Post => Formal'Valid[_Scalars]
          --    mode    OUT -      Post => Formal'Valid[_Scalars]
 
-         if Ekind_In (Formal, E_In_Parameter, E_In_Out_Parameter) then
+         if Ekind (Formal) in E_In_Parameter | E_In_Out_Parameter then
             Add_Validity_Check (Formal, Name_Precondition, False);
          end if;
 
-         if Ekind_In (Formal, E_In_Out_Parameter, E_Out_Parameter) then
+         if Ekind (Formal) in E_In_Out_Parameter | E_Out_Parameter then
             Add_Validity_Check (Formal, Name_Postcondition, False);
          end if;
 
@@ -2850,7 +2849,7 @@ package body Checks is
              (Typ, New_Occurrence_Of (Entity (N), Sloc (N))));
          return;
 
-      elsif Nkind_In (N, N_Aggregate, N_Extension_Aggregate) then
+      elsif Nkind (N) in N_Aggregate | N_Extension_Aggregate then
 
          --  If the expression is an aggregate in an assignment, apply the
          --  check to the LHS after the assignment, rather than create a
@@ -4037,9 +4036,9 @@ package body Checks is
       function Left_Expression (Op : Node_Id) return Node_Id is
          LE : Node_Id := Left_Opnd (Op);
       begin
-         while Nkind_In (LE, N_Qualified_Expression,
-                             N_Type_Conversion,
-                             N_Expression_With_Actions)
+         while Nkind (LE) in N_Qualified_Expression
+                           | N_Type_Conversion
+                           | N_Expression_With_Actions
          loop
             LE := Expression (LE);
          end loop;
@@ -4249,11 +4248,11 @@ package body Checks is
 
    begin
       pragma Assert
-        (Nkind_In (Kind, N_Component_Declaration,
-                         N_Discriminant_Specification,
-                         N_Function_Specification,
-                         N_Object_Declaration,
-                         N_Parameter_Specification));
+        (Kind in N_Component_Declaration
+               | N_Discriminant_Specification
+               | N_Function_Specification
+               | N_Object_Declaration
+               | N_Parameter_Specification);
 
       if Kind = N_Function_Specification then
          Typ := Etype (Defining_Entity (N));
@@ -6078,7 +6077,7 @@ package body Checks is
             --  Likewise for Abs/Minus, the only case where the operation can
             --  overflow is when the operand is the largest negative number.
 
-            elsif Nkind_In (N, N_Op_Abs, N_Op_Minus) then
+            elsif Nkind (N) in N_Op_Abs | N_Op_Minus then
                Determine_Range
                  (Right_Opnd (N), OK, Lo, Hi, Assume_Valid => True);
 
@@ -6220,7 +6219,7 @@ package body Checks is
       --  Do not set range check flag if parent is assignment statement or
       --  object declaration with Suppress_Assignment_Checks flag set
 
-      if Nkind_In (Parent (N), N_Assignment_Statement, N_Object_Declaration)
+      if Nkind (Parent (N)) in N_Assignment_Statement | N_Object_Declaration
         and then Suppress_Assignment_Checks (Parent (N))
       then
          return;
@@ -6581,9 +6580,9 @@ package body Checks is
                --  If this is an indirect or dispatching call, get signature
                --  from the subprogram type.
 
-               if Nkind_In (P, N_Entry_Call_Statement,
-                               N_Function_Call,
-                               N_Procedure_Call_Statement)
+               if Nkind (P) in N_Entry_Call_Statement
+                             | N_Function_Call
+                             | N_Procedure_Call_Statement
                then
                   E := Get_Called_Entity (P);
                   L := Parameter_Associations (P);
@@ -6714,13 +6713,13 @@ package body Checks is
       --  Integer and character literals always have valid values, where
       --  appropriate these will be range checked in any case.
 
-      elsif Nkind_In (Expr, N_Integer_Literal, N_Character_Literal) then
+      elsif Nkind (Expr) in N_Integer_Literal | N_Character_Literal then
          return True;
 
       --  If we have a type conversion or a qualification of a known valid
       --  value, then the result will always be valid.
 
-      elsif Nkind_In (Expr, N_Type_Conversion, N_Qualified_Expression) then
+      elsif Nkind (Expr) in N_Type_Conversion | N_Qualified_Expression then
          return Expr_Known_Valid (Expression (Expr));
 
       --  Case of expression is a non-floating-point operator. In this case we
@@ -7059,9 +7058,7 @@ package body Checks is
       begin
          P := Prefix (N);
          while not Is_Entity_Name (P) loop
-            if not Nkind_In (P, N_Selected_Component,
-                                N_Indexed_Component)
-            then
+            if Nkind (P) not in N_Selected_Component | N_Indexed_Component then
                return Empty;
             end if;
 
@@ -7174,7 +7171,7 @@ package body Checks is
                   if Nkind (A_Idx) = N_Range then
                      A_Range := A_Idx;
 
-                  elsif Nkind_In (A_Idx, N_Identifier, N_Expanded_Name) then
+                  elsif Nkind (A_Idx) in N_Identifier | N_Expanded_Name then
                      A_Range := Scalar_Range (Entity (A_Idx));
 
                      if Nkind (A_Range) = N_Subtype_Indication then
@@ -7362,7 +7359,8 @@ package body Checks is
         --  the target.
 
         and then not
-          (Nkind_In (N, N_Integer_Literal, N_Real_Literal, N_Character_Literal)
+          (Nkind (N) in
+               N_Integer_Literal | N_Real_Literal | N_Character_Literal
              or else
                (Is_Entity_Name (N)
                  and then Ekind (Entity (N)) = E_Enumeration_Literal))
@@ -8533,9 +8531,8 @@ package body Checks is
       --  need to be called while elaboration is taking place.
 
       elsif Is_Controlled (Tag_Typ)
-        and then Nam_In (Chars (Subp_Id), Name_Adjust,
-                                          Name_Finalize,
-                                          Name_Initialize)
+        and then
+          Chars (Subp_Id) in Name_Adjust | Name_Finalize | Name_Initialize
       then
          return;
       end if;
index 50d842244c1d00a0d8ddf219c3807799cc12986f..9d3e9e99b489a7c0ec2df3b452a17dc4d14733e6 100644 (file)
@@ -154,7 +154,7 @@ package body Contracts is
       --    Refined_Post
 
       elsif Is_Entry_Body (Id) then
-         if Nam_In (Prag_Nam, Name_Refined_Depends, Name_Refined_Global) then
+         if Prag_Nam in Name_Refined_Depends | Name_Refined_Global then
             Add_Classification;
 
          elsif Prag_Nam = Name_Refined_Post then
@@ -179,31 +179,31 @@ package body Contracts is
       --    Volatile_Function
 
       elsif Is_Entry_Declaration (Id)
-        or else Ekind_In (Id, E_Function,
-                              E_Generic_Function,
-                              E_Generic_Procedure,
-                              E_Procedure)
+        or else Ekind (Id) in E_Function
+                            | E_Generic_Function
+                            | E_Generic_Procedure
+                            | E_Procedure
       then
-         if Nam_In (Prag_Nam, Name_Attach_Handler, Name_Interrupt_Handler)
-           and then Ekind_In (Id, E_Generic_Procedure, E_Procedure)
+         if Prag_Nam in Name_Attach_Handler | Name_Interrupt_Handler
+           and then Ekind (Id) in E_Generic_Procedure | E_Procedure
          then
             Add_Classification;
 
-         elsif Nam_In (Prag_Nam, Name_Depends,
-                                 Name_Extensions_Visible,
-                                 Name_Global)
+         elsif Prag_Nam in Name_Depends
+                         | Name_Extensions_Visible
+                         | Name_Global
          then
             Add_Classification;
 
          elsif Prag_Nam = Name_Volatile_Function
-           and then Ekind_In (Id, E_Function, E_Generic_Function)
+           and then Ekind (Id) in E_Function | E_Generic_Function
          then
             Add_Classification;
 
-         elsif Nam_In (Prag_Nam, Name_Contract_Cases, Name_Test_Case) then
+         elsif Prag_Nam in Name_Contract_Cases | Name_Test_Case then
             Add_Contract_Test_Case;
 
-         elsif Nam_In (Prag_Nam, Name_Postcondition, Name_Precondition) then
+         elsif Prag_Nam in Name_Postcondition | Name_Precondition then
             Add_Pre_Post_Condition;
 
          --  The pragma is not a proper contract item
@@ -219,9 +219,9 @@ package body Contracts is
       --    Part_Of (instantiation only)
 
       elsif Is_Package_Or_Generic_Package (Id) then
-         if Nam_In (Prag_Nam, Name_Abstract_State,
-                              Name_Initial_Condition,
-                              Name_Initializes)
+         if Prag_Nam in Name_Abstract_State
+                      | Name_Initial_Condition
+                      | Name_Initializes
          then
             Add_Classification;
 
@@ -256,14 +256,14 @@ package body Contracts is
       elsif Is_Type (Id) then
          declare
             Is_OK : constant Boolean :=
-              Nam_In (Prag_Nam, Name_Async_Readers,
-                                Name_Async_Writers,
-                                Name_Effective_Reads,
-                                Name_Effective_Writes)
+              Prag_Nam in Name_Async_Readers
+                        | Name_Async_Writers
+                        | Name_Effective_Reads
+                        | Name_Effective_Writes
               or else (Ekind (Id) = E_Task_Type
-                         and Nam_In (Prag_Nam, Name_Part_Of,
-                                               Name_Depends,
-                                               Name_Global))
+                         and Prag_Nam in Name_Part_Of
+                                       | Name_Depends
+                                       | Name_Global)
               or else (Ekind (Id) = E_Protected_Type
                          and Prag_Nam = Name_Part_Of);
          begin
@@ -285,12 +285,12 @@ package body Contracts is
       --    Refined_Post
 
       elsif Ekind (Id) = E_Subprogram_Body then
-         if Nam_In (Prag_Nam, Name_Refined_Depends, Name_Refined_Global) then
+         if Prag_Nam in Name_Refined_Depends | Name_Refined_Global then
             Add_Classification;
 
-         elsif Nam_In (Prag_Nam, Name_Postcondition,
-                                 Name_Precondition,
-                                 Name_Refined_Post)
+         elsif Prag_Nam in Name_Postcondition
+                         | Name_Precondition
+                         | Name_Refined_Post
          then
             Add_Pre_Post_Condition;
 
@@ -305,7 +305,7 @@ package body Contracts is
       --    Refined_Global
 
       elsif Ekind (Id) = E_Task_Body then
-         if Nam_In (Prag_Nam, Name_Refined_Depends, Name_Refined_Global) then
+         if Prag_Nam in Name_Refined_Depends | Name_Refined_Global then
             Add_Classification;
 
          --  The pragma is not a proper contract item
@@ -331,15 +331,15 @@ package body Contracts is
       --    Part_Of
 
       elsif Ekind (Id) = E_Variable then
-         if Nam_In (Prag_Nam, Name_Async_Readers,
-                              Name_Async_Writers,
-                              Name_Constant_After_Elaboration,
-                              Name_Depends,
-                              Name_Effective_Reads,
-                              Name_Effective_Writes,
-                              Name_Global,
-                              Name_No_Caching,
-                              Name_Part_Of)
+         if Prag_Nam in Name_Async_Readers
+                      | Name_Async_Writers
+                      | Name_Constant_After_Elaboration
+                      | Name_Depends
+                      | Name_Effective_Reads
+                      | Name_Effective_Writes
+                      | Name_Global
+                      | Name_No_Caching
+                      | Name_Part_Of
          then
             Add_Classification;
 
@@ -367,10 +367,10 @@ package body Contracts is
 
          --  Entry or subprogram declarations
 
-         if Nkind_In (Decl, N_Abstract_Subprogram_Declaration,
-                            N_Entry_Declaration,
-                            N_Generic_Subprogram_Declaration,
-                            N_Subprogram_Declaration)
+         if Nkind (Decl) in N_Abstract_Subprogram_Declaration
+                          | N_Entry_Declaration
+                          | N_Generic_Subprogram_Declaration
+                          | N_Subprogram_Declaration
          then
             declare
                Subp_Id : constant Entity_Id := Defining_Entity (Decl);
@@ -392,7 +392,7 @@ package body Contracts is
 
          --  Entry or subprogram bodies
 
-         elsif Nkind_In (Decl, N_Entry_Body, N_Subprogram_Body) then
+         elsif Nkind (Decl) in N_Entry_Body | N_Subprogram_Body then
             Analyze_Entry_Or_Subprogram_Body_Contract (Defining_Entity (Decl));
 
          --  Objects
@@ -407,8 +407,8 @@ package body Contracts is
 
          --  Protected units
 
-         elsif Nkind_In (Decl, N_Protected_Type_Declaration,
-                               N_Single_Protected_Declaration)
+         elsif Nkind (Decl) in N_Protected_Type_Declaration
+                             | N_Single_Protected_Declaration
          then
             Analyze_Protected_Contract (Defining_Entity (Decl));
 
@@ -419,8 +419,8 @@ package body Contracts is
 
          --  Task units
 
-         elsif Nkind_In (Decl, N_Single_Task_Declaration,
-                               N_Task_Type_Declaration)
+         elsif Nkind (Decl) in N_Single_Task_Declaration
+                             | N_Task_Type_Declaration
          then
             Analyze_Task_Contract (Defining_Entity (Decl));
 
@@ -459,11 +459,11 @@ package body Contracts is
             end;
          end if;
 
-         if Nkind_In (Decl, N_Full_Type_Declaration,
-                            N_Private_Type_Declaration,
-                            N_Task_Type_Declaration,
-                            N_Protected_Type_Declaration,
-                            N_Formal_Type_Declaration)
+         if Nkind (Decl) in N_Full_Type_Declaration
+                          | N_Private_Type_Declaration
+                          | N_Task_Type_Declaration
+                          | N_Protected_Type_Declaration
+                          | N_Formal_Type_Declaration
          then
             Analyze_Type_Contract (Defining_Identifier (Decl));
          end if;
@@ -528,7 +528,7 @@ package body Contracts is
       --  subprograms.
 
       if SPARK_Mode = On
-        and then Ekind_In (Body_Id, E_Function, E_Generic_Function)
+        and then Ekind (Body_Id) in E_Function | E_Generic_Function
         and then Comes_From_Source (Spec_Id)
         and then not Is_Volatile_Function (Body_Id)
       then
@@ -737,7 +737,7 @@ package body Contracts is
       --  processed after the analysis of the related subprogram declaration.
 
       if SPARK_Mode = On
-        and then Ekind_In (Subp_Id, E_Function, E_Generic_Function)
+        and then Ekind (Subp_Id) in E_Function | E_Generic_Function
         and then Comes_From_Source (Subp_Id)
         and then not Is_Volatile_Function (Subp_Id)
       then
@@ -2882,12 +2882,9 @@ package body Contracts is
 
       function Causes_Contract_Freezing (N : Node_Id) return Boolean is
       begin
-         return Nkind_In (N, N_Entry_Body,
-                             N_Package_Body,
-                             N_Protected_Body,
-                             N_Subprogram_Body,
-                             N_Subprogram_Body_Stub,
-                             N_Task_Body);
+         return Nkind (N) in
+           N_Entry_Body      | N_Package_Body         | N_Protected_Body |
+           N_Subprogram_Body | N_Subprogram_Body_Stub | N_Task_Body;
       end Causes_Contract_Freezing;
 
       ----------------------
@@ -2922,10 +2919,10 @@ package body Contracts is
 
             --  Entry or subprogram declarations
 
-            elsif Nkind_In (Decl, N_Abstract_Subprogram_Declaration,
-                                  N_Entry_Declaration,
-                                  N_Generic_Subprogram_Declaration,
-                                  N_Subprogram_Declaration)
+            elsif Nkind (Decl) in N_Abstract_Subprogram_Declaration
+                                | N_Entry_Declaration
+                                | N_Generic_Subprogram_Declaration
+                                | N_Subprogram_Declaration
             then
                Analyze_Entry_Or_Subprogram_Contract
                  (Subp_Id   => Defining_Entity (Decl),
@@ -2940,8 +2937,8 @@ package body Contracts is
 
             --  Protected units
 
-            elsif Nkind_In (Decl, N_Protected_Type_Declaration,
-                                  N_Single_Protected_Declaration)
+            elsif Nkind (Decl) in N_Protected_Type_Declaration
+                                | N_Single_Protected_Declaration
             then
                Analyze_Protected_Contract (Defining_Entity (Decl));
 
@@ -2952,17 +2949,17 @@ package body Contracts is
 
             --  Task units
 
-            elsif Nkind_In (Decl, N_Single_Task_Declaration,
-                                  N_Task_Type_Declaration)
+            elsif Nkind (Decl) in N_Single_Task_Declaration
+                                | N_Task_Type_Declaration
             then
                Analyze_Task_Contract (Defining_Entity (Decl));
             end if;
 
-            if Nkind_In (Decl, N_Full_Type_Declaration,
-                               N_Private_Type_Declaration,
-                               N_Task_Type_Declaration,
-                               N_Protected_Type_Declaration,
-                               N_Formal_Type_Declaration)
+            if Nkind (Decl) in N_Full_Type_Declaration
+                             | N_Private_Type_Declaration
+                             | N_Task_Type_Declaration
+                             | N_Protected_Type_Declaration
+                             | N_Formal_Type_Declaration
             then
                Analyze_Type_Contract (Defining_Identifier (Decl));
             end if;
index 6cdea4801a604c1b74812c8b7d27b0baa02c9ddd..bf839a5aac6c58cb69fa4ddcf061c199b3e4ad99 100644 (file)
@@ -726,17 +726,17 @@ package body Einfo is
 
    function Access_Disp_Table (Id : E) return L is
    begin
-      pragma Assert (Ekind_In (Id, E_Record_Subtype,
-                                   E_Record_Type,
-                                   E_Record_Type_With_Private));
+      pragma Assert (Ekind (Id) in E_Record_Subtype
+                                 | E_Record_Type
+                                 | E_Record_Type_With_Private);
       return Elist16 (Implementation_Base_Type (Id));
    end Access_Disp_Table;
 
    function Access_Disp_Table_Elab_Flag (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Record_Subtype,
-                                   E_Record_Type,
-                                   E_Record_Type_With_Private));
+      pragma Assert (Ekind (Id) in E_Record_Subtype
+                                 | E_Record_Type
+                                 | E_Record_Type_With_Private);
       return Node30 (Implementation_Base_Type (Id));
    end Access_Disp_Table_Elab_Flag;
 
@@ -748,19 +748,19 @@ package body Einfo is
 
    function Activation_Record_Component (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant,
-                                   E_In_Parameter,
-                                   E_In_Out_Parameter,
-                                   E_Loop_Parameter,
-                                   E_Out_Parameter,
-                                   E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant
+                                 | E_In_Parameter
+                                 | E_In_Out_Parameter
+                                 | E_Loop_Parameter
+                                 | E_Out_Parameter
+                                 | E_Variable);
       return Node31 (Id);
    end Activation_Record_Component;
 
    function Actual_Subtype (Id : E) return E is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
+        (Ekind (Id) in E_Constant | E_Variable | E_Generic_In_Out_Parameter
            or else Is_Formal (Id));
       return Node17 (Id);
    end Actual_Subtype;
@@ -781,10 +781,10 @@ package body Einfo is
    begin
       pragma Assert (Is_Type (Id)
                        or else Is_Formal (Id)
-                       or else Ekind_In (Id, E_Loop_Parameter,
-                                             E_Constant,
-                                             E_Exception,
-                                             E_Variable));
+                       or else Ekind (Id) in E_Loop_Parameter
+                                           | E_Constant
+                                           | E_Exception
+                                           | E_Variable);
       return Uint14 (Id);
    end Alignment;
 
@@ -796,16 +796,16 @@ package body Einfo is
 
    function Anonymous_Masters (Id : E) return L is
    begin
-      pragma Assert (Ekind_In (Id, E_Function,
-                                   E_Package,
-                                   E_Procedure,
-                                   E_Subprogram_Body));
+      pragma Assert (Ekind (Id) in E_Function
+                                 | E_Package
+                                 | E_Procedure
+                                 | E_Subprogram_Body);
       return Elist29 (Id);
    end Anonymous_Masters;
 
    function Anonymous_Object (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
+      pragma Assert (Ekind (Id) in E_Protected_Type | E_Task_Type);
       return Node30 (Id);
    end Anonymous_Object;
 
@@ -872,7 +872,7 @@ package body Einfo is
 
    function BIP_Initialization_Call (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       return Node29 (Id);
    end BIP_Initialization_Call;
 
@@ -906,19 +906,19 @@ package body Einfo is
 
    function Cloned_Subtype (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
+      pragma Assert (Ekind (Id) in E_Record_Subtype | E_Class_Wide_Subtype);
       return Node16 (Id);
    end Cloned_Subtype;
 
    function Component_Bit_Offset (Id : E) return U is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       return Uint11 (Id);
    end Component_Bit_Offset;
 
    function Component_Clause (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       return Node13 (Id);
    end Component_Clause;
 
@@ -975,7 +975,7 @@ package body Einfo is
 
    function Corresponding_Record_Component (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       return Node21 (Id);
    end Corresponding_Record_Component;
 
@@ -1147,8 +1147,7 @@ package body Einfo is
 
    function Dispatch_Table_Wrappers (Id : E) return L is
    begin
-      pragma Assert (Ekind_In (Id, E_Record_Type,
-                                   E_Record_Subtype));
+      pragma Assert (Ekind (Id) in E_Record_Type | E_Record_Subtype);
       return Elist26 (Implementation_Base_Type (Id));
    end Dispatch_Table_Wrappers;
 
@@ -1166,14 +1165,14 @@ package body Einfo is
 
    function DT_Position (Id : E) return U is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure
                        and then Present (DTC_Entity (Id)));
       return Uint15 (Id);
    end DT_Position;
 
    function DTC_Entity (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Node16 (Id);
    end DTC_Entity;
 
@@ -1188,7 +1187,7 @@ package body Einfo is
       pragma Assert
         (Is_Subprogram (Id)
            or else
-         Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
+         Ekind (Id) in E_Entry | E_Entry_Family | E_Package
            or else
          Is_Generic_Unit (Id));
       return Node13 (Id);
@@ -1199,7 +1198,7 @@ package body Einfo is
       pragma Assert
         (Is_Subprogram (Id)
            or else
-         Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
+         Ekind (Id) in E_Entry | E_Entry_Family | E_Package
            or else
          Is_Generic_Unit (Id));
       return Flag174 (Id);
@@ -1207,7 +1206,7 @@ package body Einfo is
 
    function Encapsulating_State (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Abstract_State | E_Constant | E_Variable);
       return Node32 (Id);
    end Encapsulating_State;
 
@@ -1257,40 +1256,40 @@ package body Einfo is
    function Contains_Ignored_Ghost_Code (Id : E) return B is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Block,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Package,
-                       E_Generic_Procedure,
-                       E_Package,
-                       E_Package_Body,
-                       E_Procedure,
-                       E_Subprogram_Body));
+        (Ekind (Id) in E_Block
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Package
+                     | E_Generic_Procedure
+                     | E_Package
+                     | E_Package_Body
+                     | E_Procedure
+                     | E_Subprogram_Body);
       return Flag279 (Id);
    end Contains_Ignored_Ghost_Code;
 
    function Contract (Id : E) return N is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Type,      --  concurrent types
-                       E_Task_Body,
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Type       --  concurrent types
+                     | E_Task_Body
+                     | E_Task_Type
            or else
-         Ekind_In (Id, E_Constant,            --  objects
-                       E_Variable)
+         Ekind (Id) in E_Constant             --  objects
+                     | E_Variable
            or else
-         Ekind_In (Id, E_Entry,               --  overloadable
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Entry                --  overloadable
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body)
+         Ekind (Id) in E_Generic_Package      --  packages
+                     | E_Package
+                     | E_Package_Body
            or else
          Is_Type (Id)                         --  types
            or else
@@ -1336,13 +1335,12 @@ package body Einfo is
    function Equivalent_Type (Id : E) return E is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Class_Wide_Type,
-                       E_Class_Wide_Subtype,
-                       E_Access_Subprogram_Type,
-                       E_Access_Protected_Subprogram_Type,
-                       E_Anonymous_Access_Protected_Subprogram_Type,
-                       E_Access_Subprogram_Type,
-                       E_Exception_Type));
+        (Ekind (Id) in E_Class_Wide_Type
+                     | E_Class_Wide_Subtype
+                     | E_Access_Subprogram_Type
+                     | E_Access_Protected_Subprogram_Type
+                     | E_Anonymous_Access_Protected_Subprogram_Type
+                     | E_Exception_Type);
       return Node18 (Id);
    end Equivalent_Type;
 
@@ -1354,13 +1352,14 @@ package body Einfo is
    function Extra_Accessibility (Id : E) return E is
    begin
       pragma Assert
-        (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
+        (Is_Formal (Id) or else Ekind (Id) in E_Variable | E_Constant);
       return Node13 (Id);
    end Extra_Accessibility;
 
    function Extra_Accessibility_Of_Result (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
+      pragma Assert
+        (Ekind (Id) in E_Function | E_Operator | E_Subprogram_Type);
       return Node19 (Id);
    end Extra_Accessibility_Of_Result;
 
@@ -1379,9 +1378,9 @@ package body Einfo is
    begin
       pragma Assert
         (Is_Overloadable (Id)
-           or else Ekind_In (Id, E_Entry_Family,
-                                 E_Subprogram_Body,
-                                 E_Subprogram_Type));
+           or else Ekind (Id) in E_Entry_Family
+                               | E_Subprogram_Body
+                               | E_Subprogram_Type);
       return Node28 (Id);
    end Extra_Formals;
 
@@ -1405,7 +1404,7 @@ package body Einfo is
 
    function Finalizer (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
+      pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
       return Node28 (Id);
    end Finalizer;
 
@@ -1681,7 +1680,7 @@ package body Einfo is
 
    function Has_Missing_Return (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
+      pragma Assert (Ekind (Id) in E_Function | E_Generic_Function);
       return Flag142 (Id);
    end Has_Missing_Return;
 
@@ -2015,23 +2014,23 @@ package body Einfo is
    function Ignore_SPARK_Mode_Pragmas (Id : E) return B is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Body,      --  concurrent types
-                       E_Protected_Type,
-                       E_Task_Body,
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Body      --  concurrent types
+                     | E_Protected_Type
+                     | E_Task_Body
+                     | E_Task_Type
           or else
-         Ekind_In (Id, E_Entry,               --  overloadable
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Entry               --  overloadable
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body));
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body);
       return Flag301 (Id);
    end Ignore_SPARK_Mode_Pragmas;
 
@@ -2077,7 +2076,7 @@ package body Einfo is
 
    function Initialization_Statements (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       return Node28 (Id);
    end Initialization_Statements;
 
@@ -2155,7 +2154,7 @@ package body Einfo is
 
    function Is_Called (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Procedure, E_Function, E_Package));
+      pragma Assert (Ekind (Id) in E_Procedure | E_Function | E_Package);
       return Flag102 (Id);
    end Is_Called;
 
@@ -2244,7 +2243,7 @@ package body Einfo is
 
    function Is_DIC_Procedure (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag132 (Id);
    end Is_DIC_Procedure;
 
@@ -2314,7 +2313,7 @@ package body Einfo is
 
    function Is_Finalized_Transient (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
       return Flag252 (Id);
    end Is_Finalized_Transient;
 
@@ -2335,7 +2334,7 @@ package body Einfo is
 
    function Is_Generic_Actual_Subprogram (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag274 (Id);
    end Is_Generic_Actual_Subprogram;
 
@@ -2382,7 +2381,7 @@ package body Einfo is
 
    function Is_Ignored_Transient (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
       return Flag295 (Id);
    end Is_Ignored_Transient;
 
@@ -2409,7 +2408,7 @@ package body Einfo is
 
    function Is_Initial_Condition_Procedure (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag302 (Id);
    end Is_Initial_Condition_Procedure;
 
@@ -2420,7 +2419,7 @@ package body Einfo is
 
    function Is_Inlined_Always (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag1 (Id);
    end Is_Inlined_Always;
 
@@ -2453,7 +2452,7 @@ package body Einfo is
 
    function Is_Invariant_Procedure (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag257 (Id);
    end Is_Invariant_Procedure;
 
@@ -2555,7 +2554,7 @@ package body Einfo is
 
    function Is_Partial_Invariant_Procedure (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag292 (Id);
    end Is_Partial_Invariant_Procedure;
 
@@ -2567,13 +2566,13 @@ package body Einfo is
 
    function Is_Predicate_Function (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag255 (Id);
    end Is_Predicate_Function;
 
    function Is_Predicate_Function_M (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag256 (Id);
    end Is_Predicate_Function_M;
 
@@ -2590,7 +2589,7 @@ package body Einfo is
 
    function Is_Primitive_Wrapper (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag195 (Id);
    end Is_Primitive_Wrapper;
 
@@ -2607,7 +2606,7 @@ package body Einfo is
 
    function Is_Private_Primitive (Id : E) return B is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Flag245 (Id);
    end Is_Private_Primitive;
 
@@ -2793,7 +2792,7 @@ package body Einfo is
 
    function Last_Aggregate_Assignment (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       return Node30 (Id);
    end Last_Aggregate_Assignment;
 
@@ -2904,7 +2903,7 @@ package body Einfo is
    begin
       pragma Assert
         (Is_Overloadable (Id)
-           or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
+           or else Ekind (Id) in E_Subprogram_Type | E_Entry_Family);
       return Flag22 (Id);
    end Needs_No_Actuals;
 
@@ -2984,19 +2983,19 @@ package body Einfo is
 
    function Normalized_First_Bit (Id : E) return U is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       return Uint8 (Id);
    end Normalized_First_Bit;
 
    function Normalized_Position (Id : E) return U is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       return Uint14 (Id);
    end Normalized_Position;
 
    function Normalized_Position_Max (Id : E) return U is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       return Uint10 (Id);
    end Normalized_Position_Max;
 
@@ -3009,14 +3008,14 @@ package body Einfo is
    function Optimize_Alignment_Space (Id : E) return B is
    begin
       pragma Assert
-        (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
+        (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
       return Flag241 (Id);
    end Optimize_Alignment_Space;
 
    function Optimize_Alignment_Time (Id : E) return B is
    begin
       pragma Assert
-        (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
+        (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
       return Flag242 (Id);
    end Optimize_Alignment_Time;
 
@@ -3039,7 +3038,7 @@ package body Einfo is
 
    function Original_Record_Component (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Void | E_Component | E_Discriminant);
       return Node22 (Id);
    end Original_Record_Component;
 
@@ -3074,7 +3073,7 @@ package body Einfo is
 
    function Part_Of_Constituents (Id : E) return L is
    begin
-      pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
+      pragma Assert (Ekind (Id) in E_Abstract_State | E_Variable);
       return Elist10 (Id);
    end Part_Of_Constituents;
 
@@ -3098,18 +3097,17 @@ package body Einfo is
 
    function Postconditions_Proc (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Entry,
-                                   E_Entry_Family,
-                                   E_Function,
-                                   E_Procedure));
+      pragma Assert
+        (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
       return Node14 (Id);
    end Postconditions_Proc;
 
    function Predicated_Parent (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Array_Subtype,
-                                   E_Record_Subtype,
-                                   E_Record_Subtype_With_Private));
+      pragma Assert
+        (Ekind (Id) in E_Array_Subtype  |
+                       E_Record_Subtype |
+                       E_Record_Subtype_With_Private);
       return Node38 (Id);
    end Predicated_Parent;
 
@@ -3132,7 +3130,7 @@ package body Einfo is
 
    function Prival_Link (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       return Node20 (Id);
    end Prival_Link;
 
@@ -3156,16 +3154,14 @@ package body Einfo is
 
    function Protected_Subprogram (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       return Node39 (Id);
    end Protected_Subprogram;
 
    function Protection_Object (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Entry,
-                                   E_Entry_Family,
-                                   E_Function,
-                                   E_Procedure));
+      pragma Assert
+        (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
       return Node23 (Id);
    end Protection_Object;
 
@@ -3215,20 +3211,19 @@ package body Einfo is
 
    function Related_Expression (Id : E) return N is
    begin
-      pragma Assert (Ekind (Id) in Type_Kind
-                       or else Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in Type_Kind | E_Constant | E_Variable);
       return Node24 (Id);
    end Related_Expression;
 
    function Related_Instance (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
+      pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
       return Node15 (Id);
    end Related_Instance;
 
    function Related_Type (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Component | E_Constant | E_Variable);
       return Node27 (Id);
    end Related_Type;
 
@@ -3332,7 +3327,7 @@ package body Einfo is
 
    function Size_Check_Code (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       return Node19 (Id);
    end Size_Check_Code;
 
@@ -3355,51 +3350,51 @@ package body Einfo is
    function SPARK_Aux_Pragma (Id : E) return N is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Type,      --  concurrent types
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Type      --  concurrent types
+                     | E_Task_Type
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body));
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body);
       return Node41 (Id);
    end SPARK_Aux_Pragma;
 
    function SPARK_Aux_Pragma_Inherited (Id : E) return B is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Type,      --  concurrent types
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Type      --  concurrent types
+                     | E_Task_Type
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body));
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body);
       return Flag266 (Id);
    end SPARK_Aux_Pragma_Inherited;
 
    function SPARK_Pragma (Id : E) return N is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant,            --  objects
-                       E_Variable)
+        (Ekind (Id) in E_Constant            --  objects
+                     | E_Variable
           or else
-         Ekind_In (Id, E_Abstract_State,      --  overloadable
-                       E_Entry,
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Abstract_State      --  overloadable
+                     | E_Entry
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body)
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body
            or else
-         Ekind (Id) = E_Void                  --  special purpose
+         Ekind (Id) = E_Void                 --  special purpose
            or else
-         Ekind_In (Id, E_Protected_Body,      --  types
-                       E_Task_Body)
+         Ekind (Id) in E_Protected_Body      --  types
+                     | E_Task_Body
            or else
          Is_Type (Id));
       return Node40 (Id);
@@ -3408,27 +3403,27 @@ package body Einfo is
    function SPARK_Pragma_Inherited (Id : E) return B is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant,            --  objects
-                       E_Variable)
+        (Ekind (Id) in E_Constant            --  objects
+                     | E_Variable
           or else
-         Ekind_In (Id, E_Abstract_State,      --  overloadable
-                       E_Entry,
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Abstract_State      --  overloadable
+                     | E_Entry
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body)
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body
            or else
-         Ekind (Id) = E_Void                  --  special purpose
+         Ekind (Id) = E_Void                 --  special purpose
            or else
-         Ekind_In (Id, E_Protected_Body,      --  types
-                       E_Task_Body)
+         Ekind (Id) in E_Protected_Body      --  types
+                     | E_Task_Body
            or else
          Is_Type (Id));
       return Flag265 (Id);
@@ -3466,9 +3461,8 @@ package body Einfo is
 
    function Status_Flag_Or_Transient_Decl (Id : E) return N is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant,
-                                   E_Loop_Parameter,
-                                   E_Variable));
+      pragma Assert
+        (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
       return Node15 (Id);
    end Status_Flag_Or_Transient_Decl;
 
@@ -3559,7 +3553,7 @@ package body Einfo is
 
    function Thunk_Entity (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure
                       and then Is_Thunk (Id));
       return Node31 (Id);
    end Thunk_Entity;
@@ -3640,7 +3634,7 @@ package body Einfo is
 
    function Wrapped_Entity (Id : E) return E is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure
                        and then Is_Primitive_Wrapper (Id));
       return Node27 (Id);
    end Wrapped_Entity;
@@ -3945,16 +3939,15 @@ package body Einfo is
 
    procedure Set_Anonymous_Masters (Id : E; V : L) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function,
-                                   E_Package,
-                                   E_Procedure,
-                                   E_Subprogram_Body));
+      pragma Assert
+        (Ekind (Id)
+           in E_Function | E_Package | E_Procedure | E_Subprogram_Body);
       Set_Elist29 (Id, V);
    end Set_Anonymous_Masters;
 
    procedure Set_Anonymous_Object (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
+      pragma Assert (Ekind (Id) in E_Protected_Type | E_Task_Type);
       Set_Node30 (Id, V);
    end Set_Anonymous_Object;
 
@@ -3981,19 +3974,20 @@ package body Einfo is
 
    procedure Set_Activation_Record_Component (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant,
-                                   E_In_Parameter,
-                                   E_In_Out_Parameter,
-                                   E_Loop_Parameter,
-                                   E_Out_Parameter,
-                                   E_Variable));
+      pragma Assert
+        (Ekind (Id) in E_Constant
+                     | E_In_Parameter
+                     | E_In_Out_Parameter
+                     | E_Loop_Parameter
+                     | E_Out_Parameter
+                     | E_Variable);
       Set_Node31 (Id, V);
    end Set_Activation_Record_Component;
 
    procedure Set_Actual_Subtype (Id : E; V : E) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
+        (Ekind (Id) in E_Constant | E_Variable | E_Generic_In_Out_Parameter
            or else Is_Formal (Id));
       Set_Node17 (Id, V);
    end Set_Actual_Subtype;
@@ -4014,10 +4008,10 @@ package body Einfo is
    begin
       pragma Assert (Is_Type (Id)
                        or else Is_Formal (Id)
-                       or else Ekind_In (Id, E_Loop_Parameter,
-                                             E_Constant,
-                                             E_Exception,
-                                             E_Variable));
+                       or else Ekind (Id) in E_Loop_Parameter
+                                           | E_Constant
+                                           | E_Exception
+                                           | E_Variable);
       Set_Uint14 (Id, V);
    end Set_Alignment;
 
@@ -4062,7 +4056,7 @@ package body Einfo is
 
    procedure Set_BIP_Initialization_Call (Id : E; V : N) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       Set_Node29 (Id, V);
    end Set_BIP_Initialization_Call;
 
@@ -4103,19 +4097,19 @@ package body Einfo is
 
    procedure Set_Cloned_Subtype (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
+      pragma Assert (Ekind (Id) in E_Record_Subtype | E_Class_Wide_Subtype);
       Set_Node16 (Id, V);
    end Set_Cloned_Subtype;
 
    procedure Set_Component_Bit_Offset (Id : E; V : U) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       Set_Uint11 (Id, V);
    end Set_Component_Bit_Offset;
 
    procedure Set_Component_Clause (Id : E; V : N) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       Set_Node13 (Id, V);
    end Set_Component_Clause;
 
@@ -4134,46 +4128,46 @@ package body Einfo is
    procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Block,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Package,
-                       E_Generic_Procedure,
-                       E_Package,
-                       E_Package_Body,
-                       E_Procedure,
-                       E_Subprogram_Body));
+        (Ekind (Id) in E_Block
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Package
+                     | E_Generic_Procedure
+                     | E_Package
+                     | E_Package_Body
+                     | E_Procedure
+                     | E_Subprogram_Body);
       Set_Flag279 (Id, V);
    end Set_Contains_Ignored_Ghost_Code;
 
    procedure Set_Contract (Id : E; V : N) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Type,      --  concurrent types
-                       E_Task_Body,
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Type      --  concurrent types
+                     | E_Task_Body
+                     | E_Task_Type
            or else
-         Ekind_In (Id, E_Constant,            --  objects
-                       E_Variable)
+         Ekind (Id) in E_Constant            --  objects
+                     | E_Variable
            or else
-         Ekind_In (Id, E_Entry,               --  overloadable
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Entry               --  overloadable
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body)
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body
 
            or else
-         Is_Type (Id)                         -- types
+         Is_Type (Id)                        -- types
 
            or else
-         Ekind (Id) = E_Void);                --  special purpose
+         Ekind (Id) = E_Void);               --  special purpose
       Set_Node34 (Id, V);
    end Set_Contract;
 
@@ -4219,13 +4213,13 @@ package body Einfo is
 
    procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
+      pragma Assert (Ekind (Id) in E_Void | E_Subprogram_Body);
       Set_Node18 (Id, V);
    end Set_Corresponding_Protected_Entry;
 
    procedure Set_Corresponding_Record_Component (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       Set_Node21 (Id, V);
    end Set_Corresponding_Record_Component;
 
@@ -4308,7 +4302,7 @@ package body Einfo is
    procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
+        (Is_Subprogram (Id) or else Ekind (Id) in E_Package | E_Package_Body);
 
       Set_Flag50 (Id, V);
    end Set_Delay_Subprogram_Descriptors;
@@ -4416,13 +4410,13 @@ package body Einfo is
 
    procedure Set_DT_Position (Id : E; V : U) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Uint15 (Id, V);
    end Set_DT_Position;
 
    procedure Set_DTC_Entity (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Node16 (Id, V);
    end Set_DTC_Entity;
 
@@ -4437,7 +4431,7 @@ package body Einfo is
       pragma Assert
         (Is_Subprogram (Id)
            or else
-         Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
+         Ekind (Id) in E_Entry | E_Entry_Family | E_Package
            or else
          Is_Generic_Unit (Id));
       Set_Node13 (Id, V);
@@ -4448,7 +4442,7 @@ package body Einfo is
       pragma Assert
         (Is_Subprogram (Id)
            or else
-         Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
+         Ekind (Id) in E_Entry | E_Entry_Family | E_Package
            or else
          Is_Generic_Unit (Id));
       Set_Flag174 (Id, V);
@@ -4456,7 +4450,7 @@ package body Einfo is
 
    procedure Set_Encapsulating_State (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Abstract_State | E_Constant | E_Variable);
       Set_Node32 (Id, V);
    end Set_Encapsulating_State;
 
@@ -4535,12 +4529,12 @@ package body Einfo is
    procedure Set_Equivalent_Type (Id : E; V : E) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Class_Wide_Type,
-                       E_Class_Wide_Subtype,
-                       E_Access_Protected_Subprogram_Type,
-                       E_Anonymous_Access_Protected_Subprogram_Type,
-                       E_Access_Subprogram_Type,
-                       E_Exception_Type));
+        (Ekind (Id) in E_Class_Wide_Type
+                     | E_Class_Wide_Subtype
+                     | E_Access_Protected_Subprogram_Type
+                     | E_Anonymous_Access_Protected_Subprogram_Type
+                     | E_Access_Subprogram_Type
+                     | E_Exception_Type);
       Set_Node18 (Id, V);
    end Set_Equivalent_Type;
 
@@ -4552,13 +4546,14 @@ package body Einfo is
    procedure Set_Extra_Accessibility (Id : E; V : E) is
    begin
       pragma Assert
-        (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
+        (Is_Formal (Id) or else Ekind (Id) in E_Variable | E_Constant);
       Set_Node13 (Id, V);
    end Set_Extra_Accessibility;
 
    procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
+      pragma Assert
+        (Ekind (Id) in E_Function | E_Operator | E_Subprogram_Type);
       Set_Node19 (Id, V);
    end Set_Extra_Accessibility_Of_Result;
 
@@ -4577,9 +4572,9 @@ package body Einfo is
    begin
       pragma Assert
         (Is_Overloadable (Id)
-           or else Ekind_In (Id, E_Entry_Family,
-                                 E_Subprogram_Body,
-                                 E_Subprogram_Type));
+           or else Ekind (Id) in E_Entry_Family
+                               | E_Subprogram_Body
+                               | E_Subprogram_Type);
       Set_Node28 (Id, V);
    end Set_Extra_Formals;
 
@@ -4597,7 +4592,7 @@ package body Einfo is
 
    procedure Set_Finalizer (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
+      pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
       Set_Node28 (Id, V);
    end Set_Finalizer;
 
@@ -4650,7 +4645,7 @@ package body Einfo is
    procedure Set_From_Limited_With (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
+        (Is_Type (Id) or else Ekind (Id) in E_Abstract_State | E_Package);
       Set_Flag159 (Id, V);
    end Set_From_Limited_With;
 
@@ -4812,10 +4807,8 @@ package body Einfo is
 
    procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Entry,
-                                   E_Entry_Family,
-                                   E_Function,
-                                   E_Procedure));
+      pragma Assert
+        (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
       Set_Flag240 (Id, V);
    end Set_Has_Expanded_Contract;
 
@@ -4870,7 +4863,7 @@ package body Einfo is
 
    procedure Set_Has_Initial_Value (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
+      pragma Assert (Ekind (Id) in E_Variable | E_Out_Parameter);
       Set_Flag219 (Id, V);
    end Set_Has_Initial_Value;
 
@@ -4893,7 +4886,7 @@ package body Einfo is
 
    procedure Set_Has_Missing_Return (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
+      pragma Assert (Ekind (Id) in E_Function | E_Generic_Function);
       Set_Flag142 (Id, V);
    end Set_Has_Missing_Return;
 
@@ -4923,7 +4916,7 @@ package body Einfo is
    procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Entry, E_Entry_Family)
+        (Ekind (Id) in E_Entry | E_Entry_Family
           or else Is_Subprogram_Or_Generic_Subprogram (Id));
       Set_Flag110 (Id, V);
    end Set_Has_Out_Or_In_Out_Parameter;
@@ -5247,23 +5240,23 @@ package body Einfo is
    procedure Set_Ignore_SPARK_Mode_Pragmas (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Body,      --  concurrent types
-                       E_Protected_Type,
-                       E_Task_Body,
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Body      --  concurrent types
+                     | E_Protected_Type
+                     | E_Task_Body
+                     | E_Task_Type
           or else
-         Ekind_In (Id, E_Entry,               --  overloadable
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Entry               --  overloadable
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body));
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body);
       Set_Flag301 (Id, V);
    end Set_Ignore_SPARK_Mode_Pragmas;
 
@@ -5278,7 +5271,7 @@ package body Einfo is
       pragma Assert
         (Is_Internal (Id)
            and then Is_Hidden (Id)
-           and then (Ekind_In (Id, E_Procedure, E_Function)));
+           and then (Ekind (Id) in E_Procedure | E_Function));
       Set_Node25 (Id, V);
    end Set_Interface_Alias;
 
@@ -5310,7 +5303,7 @@ package body Einfo is
       --  an aggregate used as the initialization expression for an object
       --  declaration, and this occurs before the Ekind for the object is set.
 
-      pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Void | E_Constant | E_Variable);
       Set_Node28 (Id, V);
    end Set_Initialization_Statements;
 
@@ -5397,7 +5390,7 @@ package body Einfo is
 
    procedure Set_Is_Called (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Procedure, E_Function, E_Package));
+      pragma Assert (Ekind (Id) in E_Procedure | E_Function | E_Package);
       Set_Flag102 (Id, V);
    end Set_Is_Called;
 
@@ -5569,7 +5562,7 @@ package body Einfo is
 
    procedure Set_Is_Finalized_Transient (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
       Set_Flag252 (Id, V);
    end Set_Is_Finalized_Transient;
 
@@ -5591,7 +5584,7 @@ package body Einfo is
 
    procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag274 (Id, V);
    end Set_Is_Generic_Actual_Subprogram;
 
@@ -5619,7 +5612,7 @@ package body Einfo is
 
    procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag2 (Id, V);
    end Set_Is_Hidden_Non_Overridden_Subpgm;
 
@@ -5639,7 +5632,7 @@ package body Einfo is
 
    procedure Set_Is_Ignored_Transient (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
       Set_Flag295 (Id, V);
    end Set_Is_Ignored_Transient;
 
@@ -5666,7 +5659,7 @@ package body Einfo is
 
    procedure Set_Is_Initial_Condition_Procedure (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag302 (Id, V);
    end Set_Is_Initial_Condition_Procedure;
 
@@ -5677,7 +5670,7 @@ package body Einfo is
 
    procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag1 (Id, V);
    end Set_Is_Inlined_Always;
 
@@ -5804,7 +5797,7 @@ package body Einfo is
 
    procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Void, E_General_Access_Type));
+      pragma Assert (Ekind (Id) in E_Void | E_General_Access_Type);
       Set_Flag215 (Id, V);
    end Set_Is_Param_Block_Component_Type;
 
@@ -5828,7 +5821,7 @@ package body Einfo is
 
    procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag256 (Id, V);
    end Set_Is_Predicate_Function_M;
 
@@ -5845,7 +5838,7 @@ package body Einfo is
 
    procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag195 (Id, V);
    end Set_Is_Primitive_Wrapper;
 
@@ -5862,7 +5855,7 @@ package body Einfo is
 
    procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Flag245 (Id, V);
    end Set_Is_Private_Primitive;
 
@@ -5936,16 +5929,14 @@ package body Einfo is
    begin
       pragma Assert
         (Is_Type (Id)
-           or else Ekind_In (Id, E_Exception,
-                                 E_Variable,
-                                 E_Constant,
-                                 E_Void));
+           or else
+             Ekind (Id) in E_Exception | E_Variable | E_Constant | E_Void);
       Set_Flag28 (Id, V);
    end Set_Is_Statically_Allocated;
 
    procedure Set_Is_Tag (Id : E; V : B := True) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Component | E_Constant | E_Variable);
       Set_Flag78 (Id, V);
    end Set_Is_Tag;
 
@@ -6002,7 +5993,7 @@ package body Einfo is
    procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable)
+        (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable
           or else Is_Formal (Id)
           or else Is_Type (Id));
       Set_Flag283 (Id, V);
@@ -6059,7 +6050,7 @@ package body Einfo is
 
    procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       Set_Node30 (Id, V);
    end Set_Last_Aggregate_Assignment;
 
@@ -6171,7 +6162,7 @@ package body Einfo is
    begin
       pragma Assert
         (Is_Overloadable (Id)
-           or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
+           or else Ekind (Id) in E_Subprogram_Type | E_Entry_Family);
       Set_Flag22 (Id, V);
    end Set_Needs_No_Actuals;
 
@@ -6237,7 +6228,7 @@ package body Einfo is
    begin
       pragma Assert
         (Ekind (Id) in Incomplete_Kind
-          or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
+          or else Ekind (Id) in E_Abstract_State | E_Class_Wide_Type);
       Set_Node19 (Id, V);
    end Set_Non_Limited_View;
 
@@ -6251,19 +6242,19 @@ package body Einfo is
 
    procedure Set_Normalized_First_Bit (Id : E; V : U) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       Set_Uint8 (Id, V);
    end Set_Normalized_First_Bit;
 
    procedure Set_Normalized_Position (Id : E; V : U) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       Set_Uint14 (Id, V);
    end Set_Normalized_Position;
 
    procedure Set_Normalized_Position_Max (Id : E; V : U) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
       Set_Uint10 (Id, V);
    end Set_Normalized_Position_Max;
 
@@ -6276,14 +6267,14 @@ package body Einfo is
    procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
+        (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
       Set_Flag241 (Id, V);
    end Set_Optimize_Alignment_Space;
 
    procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
+        (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
       Set_Flag242 (Id, V);
    end Set_Optimize_Alignment_Time;
 
@@ -6301,13 +6292,13 @@ package body Einfo is
 
    procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Node41 (Id, V);
    end Set_Original_Protected_Subprogram;
 
    procedure Set_Original_Record_Component (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
+      pragma Assert (Ekind (Id) in E_Void | E_Component | E_Discriminant);
       Set_Node22 (Id, V);
    end Set_Original_Record_Component;
 
@@ -6324,7 +6315,7 @@ package body Einfo is
 
    procedure Set_Package_Instantiation (Id : E; V : N) is
    begin
-      pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
+      pragma Assert (Ekind (Id) in E_Void | E_Generic_Package | E_Package);
       Set_Node26 (Id, V);
    end Set_Package_Instantiation;
 
@@ -6342,7 +6333,7 @@ package body Einfo is
 
    procedure Set_Part_Of_Constituents (Id : E; V : L) is
    begin
-      pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
+      pragma Assert (Ekind (Id) in E_Abstract_State | E_Variable);
       Set_Elist10 (Id, V);
    end Set_Part_Of_Constituents;
 
@@ -6366,18 +6357,16 @@ package body Einfo is
 
    procedure Set_Postconditions_Proc (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Entry,
-                                   E_Entry_Family,
-                                   E_Function,
-                                   E_Procedure));
+      pragma Assert
+        (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
       Set_Node14 (Id, V);
    end Set_Postconditions_Proc;
 
    procedure Set_Predicated_Parent (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Array_Subtype,
-                                   E_Record_Subtype,
-                                   E_Record_Subtype_With_Private));
+      pragma Assert (Ekind (Id) in E_Array_Subtype
+                                 | E_Record_Subtype
+                                 | E_Record_Subtype_With_Private);
       Set_Node38 (Id, V);
    end Set_Predicated_Parent;
 
@@ -6401,7 +6390,7 @@ package body Einfo is
 
    procedure Set_Prival_Link (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       Set_Node20 (Id, V);
    end Set_Prival_Link;
 
@@ -6430,16 +6419,16 @@ package body Einfo is
 
    procedure Set_Protected_Subprogram (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure);
       Set_Node39 (Id, V);
    end Set_Protected_Subprogram;
 
    procedure Set_Protection_Object (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Entry,
-                                   E_Entry_Family,
-                                   E_Function,
-                                   E_Procedure));
+      pragma Assert (Ekind (Id) in E_Entry
+                                 | E_Entry_Family
+                                 | E_Function
+                                 | E_Procedure);
       Set_Node23 (Id, V);
    end Set_Protection_Object;
 
@@ -6489,20 +6478,20 @@ package body Einfo is
 
    procedure Set_Related_Expression (Id : E; V : N) is
    begin
-      pragma Assert (Ekind (Id) in Type_Kind
-                       or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
+      pragma Assert
+        (Ekind (Id) in Type_Kind | E_Constant | E_Variable | E_Void);
       Set_Node24 (Id, V);
    end Set_Related_Expression;
 
    procedure Set_Related_Instance (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
+      pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
       Set_Node15 (Id, V);
    end Set_Related_Instance;
 
    procedure Set_Related_Type (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Component | E_Constant | E_Variable);
       Set_Node27 (Id, V);
    end Set_Related_Type;
 
@@ -6610,7 +6599,7 @@ package body Einfo is
 
    procedure Set_Size_Check_Code (Id : E; V : N) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant | E_Variable);
       Set_Node19 (Id, V);
    end Set_Size_Check_Code;
 
@@ -6633,51 +6622,51 @@ package body Einfo is
    procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Type,      --  concurrent types
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Type      --  concurrent types
+                     | E_Task_Type
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body));
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body);
       Set_Node41 (Id, V);
    end Set_SPARK_Aux_Pragma;
 
    procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Protected_Type,      --  concurrent types
-                       E_Task_Type)
+        (Ekind (Id) in E_Protected_Type      --  concurrent types
+                     | E_Task_Type
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body));
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body);
       Set_Flag266 (Id, V);
    end Set_SPARK_Aux_Pragma_Inherited;
 
    procedure Set_SPARK_Pragma (Id : E; V : N) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant,            --  objects
-                       E_Variable)
+        (Ekind (Id) in E_Constant            --  objects
+                     | E_Variable
           or else
-         Ekind_In (Id, E_Abstract_State,      --  overloadable
-                       E_Entry,
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Abstract_State      --  overloadable
+                     | E_Entry
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body)
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body
            or else
-         Ekind (Id) = E_Void                  --  special purpose
+         Ekind (Id) = E_Void                 --  special purpose
            or else
-         Ekind_In (Id, E_Protected_Body,      --  types
-                       E_Task_Body)
+         Ekind (Id) in E_Protected_Body      --  types
+                     | E_Task_Body
            or else
          Is_Type (Id));
       Set_Node40 (Id, V);
@@ -6686,27 +6675,27 @@ package body Einfo is
    procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
    begin
       pragma Assert
-        (Ekind_In (Id, E_Constant,            --  objects
-                       E_Variable)
+        (Ekind (Id) in E_Constant            --  objects
+                     | E_Variable
           or else
-         Ekind_In (Id, E_Abstract_State,      --  overloadable
-                       E_Entry,
-                       E_Entry_Family,
-                       E_Function,
-                       E_Generic_Function,
-                       E_Generic_Procedure,
-                       E_Operator,
-                       E_Procedure,
-                       E_Subprogram_Body)
+         Ekind (Id) in E_Abstract_State      --  overloadable
+                     | E_Entry
+                     | E_Entry_Family
+                     | E_Function
+                     | E_Generic_Function
+                     | E_Generic_Procedure
+                     | E_Operator
+                     | E_Procedure
+                     | E_Subprogram_Body
            or else
-         Ekind_In (Id, E_Generic_Package,     --  packages
-                       E_Package,
-                       E_Package_Body)
+         Ekind (Id) in E_Generic_Package     --  packages
+                     | E_Package
+                     | E_Package_Body
            or else
-         Ekind (Id) = E_Void                  --  special purpose
+         Ekind (Id) = E_Void                 --  special purpose
            or else
-         Ekind_In (Id, E_Protected_Body,      --  types
-                       E_Task_Body)
+         Ekind (Id) in E_Protected_Body      --  types
+                     | E_Task_Body
            or else
          Is_Type (Id));
       Set_Flag265 (Id, V);
@@ -6749,9 +6738,9 @@ package body Einfo is
 
    procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Constant,
-                                   E_Loop_Parameter,
-                                   E_Variable));
+      pragma Assert (Ekind (Id) in E_Constant
+                                 | E_Loop_Parameter
+                                 | E_Variable);
       Set_Node15 (Id, V);
    end Set_Status_Flag_Or_Transient_Decl;
 
@@ -6846,7 +6835,7 @@ package body Einfo is
 
    procedure Set_Thunk_Entity (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure
                        and then Is_Thunk (Id));
       Set_Node31 (Id, V);
    end Set_Thunk_Entity;
@@ -6928,7 +6917,7 @@ package body Einfo is
 
    procedure Set_Wrapped_Entity (Id : E; V : E) is
    begin
-      pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
+      pragma Assert (Ekind (Id) in E_Function | E_Procedure
                        and then Is_Primitive_Wrapper (Id));
       Set_Node27 (Id, V);
    end Set_Wrapped_Entity;
@@ -7348,7 +7337,7 @@ package body Einfo is
       end if;
 
       loop
-         if Nkind_In (P, N_Selected_Component, N_Expanded_Name)
+         if Nkind (P) in N_Selected_Component | N_Expanded_Name
            or else (Nkind (P) = N_Defining_Program_Unit_Name
                      and then Is_Child_Unit (Id))
          then
@@ -7464,7 +7453,7 @@ package body Einfo is
 
       Comp_Id := First_Entity (Id);
       while Present (Comp_Id) loop
-         exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
+         exit when Ekind (Comp_Id) in E_Component | E_Discriminant;
          Next_Entity (Comp_Id);
       end loop;
 
@@ -7482,9 +7471,9 @@ package body Einfo is
       pragma Assert
         (Is_Generic_Subprogram (Id)
            or else Is_Overloadable (Id)
-           or else Ekind_In (Id, E_Entry_Family,
-                                 E_Subprogram_Body,
-                                 E_Subprogram_Type));
+           or else Ekind (Id) in E_Entry_Family
+                               | E_Subprogram_Body
+                               | E_Subprogram_Type);
 
       if Ekind (Id) = E_Enumeration_Literal then
          return Empty;
@@ -7523,9 +7512,9 @@ package body Einfo is
       pragma Assert
         (Is_Generic_Subprogram (Id)
            or else Is_Overloadable (Id)
-           or else Ekind_In (Id, E_Entry_Family,
-                                 E_Subprogram_Body,
-                                 E_Subprogram_Type));
+           or else Ekind (Id) in E_Entry_Family
+                               | E_Subprogram_Body
+                               | E_Subprogram_Type);
 
       if Ekind (Id) = E_Enumeration_Literal then
          return Empty;
@@ -8095,7 +8084,7 @@ package body Einfo is
 
    function Is_Constant_Object (Id : E) return B is
    begin
-      return Ekind_In (Id, E_Constant, E_In_Parameter, E_Loop_Parameter);
+      return Ekind (Id) in E_Constant | E_In_Parameter | E_Loop_Parameter;
    end Is_Constant_Object;
 
    -------------------
@@ -8113,7 +8102,7 @@ package body Einfo is
 
    function Is_Discriminal (Id : E) return B is
    begin
-      return Ekind_In (Id, E_Constant, E_In_Parameter)
+      return Ekind (Id) in E_Constant | E_In_Parameter
                and then Present (Discriminal_Link (Id));
    end Is_Discriminal;
 
@@ -8175,7 +8164,7 @@ package body Einfo is
    function Is_Elaboration_Target (Id : Entity_Id) return Boolean is
    begin
       return
-        Ekind_In (Id, E_Constant, E_Package, E_Variable)
+        Ekind (Id) in E_Constant | E_Package | E_Variable
           or else Is_Entry        (Id)
           or else Is_Generic_Unit (Id)
           or else Is_Subprogram   (Id)
@@ -8223,7 +8212,7 @@ package body Einfo is
 
    function Is_Package_Or_Generic_Package (Id : E) return B is
    begin
-      return Ekind_In (Id, E_Generic_Package, E_Package);
+      return Ekind (Id) in E_Generic_Package | E_Package;
    end Is_Package_Or_Generic_Package;
 
    ---------------------
@@ -8241,7 +8230,7 @@ package body Einfo is
 
    function Is_Prival (Id : E) return B is
    begin
-      return Ekind_In (Id, E_Constant, E_Variable)
+      return Ekind (Id) in E_Constant | E_Variable
                and then Present (Prival_Link (Id));
    end Is_Prival;
 
@@ -8434,9 +8423,9 @@ package body Einfo is
    begin
       pragma Assert
         (Is_Overloadable (Id)
-          or else Ekind_In (Id, E_Entry_Family,
-                                E_Subprogram_Body,
-                                E_Subprogram_Type));
+          or else Ekind (Id) in E_Entry_Family
+                              | E_Subprogram_Body
+                              | E_Subprogram_Type);
 
       if Ekind (Id) = E_Enumeration_Literal then
          return Empty;
@@ -8607,7 +8596,7 @@ package body Einfo is
    begin
       Comp_Id := Next_Entity (Id);
       while Present (Comp_Id) loop
-         exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
+         exit when Ekind (Comp_Id) in E_Component | E_Discriminant;
          Next_Entity (Comp_Id);
       end loop;
 
@@ -8945,9 +8934,9 @@ package body Einfo is
       then
          Typ := Full_View (Id);
 
-      elsif Ekind_In (Id, E_Array_Subtype,
-                          E_Record_Subtype,
-                          E_Record_Subtype_With_Private)
+      elsif Ekind (Id) in E_Array_Subtype
+                        | E_Record_Subtype
+                        | E_Record_Subtype_With_Private
         and then Present (Predicated_Parent (Id))
       then
          Typ := Predicated_Parent (Id);
@@ -11499,7 +11488,7 @@ package body Einfo is
    begin
       N := Next_Entity (N);
       while Present (N) loop
-         exit when Ekind_In (N, E_Component, E_Discriminant);
+         exit when Ekind (N) in E_Component | E_Discriminant;
          N := Next_Entity (N);
       end loop;
    end Proc_Next_Component_Or_Discriminant;
index 8c60a3f93596816499ee9fa2abd3ceebfae36fa9..0f46ab614f790299114ab15176c411f69445a9c2 100644 (file)
@@ -3293,11 +3293,11 @@ package body Errout is
             exit when Nkind (P) not in N_Subexpr;
          end loop;
 
-         if Nkind_In (P, N_Pragma_Argument_Association,
-                         N_Component_Association,
-                         N_Discriminant_Association,
-                         N_Generic_Association,
-                         N_Parameter_Association)
+         if Nkind (P) in N_Pragma_Argument_Association
+                       | N_Component_Association
+                       | N_Discriminant_Association
+                       | N_Generic_Association
+                       | N_Parameter_Association
          then
             Set_Error_Posted (Parent (P));
          end if;
index 102844f8c901be85f7a269211f104a2bbdbe5682..168a5923944e034d09bea391dbe62d1a0c4678e1 100644 (file)
@@ -534,7 +534,7 @@ package body Exp_Aggr is
       --  Strip away any conversions from the expression as they simply
       --  qualify the real expression.
 
-      while Nkind_In (Expr, N_Unchecked_Type_Conversion, N_Type_Conversion)
+      while Nkind (Expr) in N_Unchecked_Type_Conversion | N_Type_Conversion
       loop
          Expr := Expression (Expr);
       end loop;
@@ -855,8 +855,8 @@ package body Exp_Aggr is
             Expr : Node_Id := Original_Node (N);
 
          begin
-            while Nkind_In (Expr, N_Type_Conversion,
-                                  N_Unchecked_Type_Conversion)
+            while Nkind (Expr) in
+                    N_Type_Conversion | N_Unchecked_Type_Conversion
             loop
                Expr := Original_Node (Expression (Expr));
             end loop;
@@ -1554,9 +1554,9 @@ package body Exp_Aggr is
             --  the initialization expression denotes. An unanalyzed function
             --  call may appear as an identifier or an indexed component.
 
-            if Nkind_In (Expr, N_Function_Call,
-                               N_Identifier,
-                               N_Indexed_Component)
+            if Nkind (Expr) in N_Function_Call
+                             | N_Identifier
+                             | N_Indexed_Component
               and then not Analyzed (Expr)
             then
                Preanalyze_And_Resolve (Expr, Comp_Typ);
@@ -1737,7 +1737,7 @@ package body Exp_Aggr is
          --  default initialized components (otherwise Expr_Q is not present).
 
          if Present (Expr_Q)
-           and then Nkind_In (Expr_Q, N_Aggregate, N_Extension_Aggregate)
+           and then Nkind (Expr_Q) in N_Aggregate | N_Extension_Aggregate
          then
             --  At this stage the Expression may not have been analyzed yet
             --  because the array aggregate code has not been updated to use
@@ -3064,9 +3064,9 @@ package body Exp_Aggr is
          --  the initialization expression denotes. Unanalyzed function calls
          --  may appear as identifiers or indexed components.
 
-         if Nkind_In (Init_Expr, N_Function_Call,
-                                 N_Identifier,
-                                 N_Indexed_Component)
+         if Nkind (Init_Expr) in N_Function_Call
+                               | N_Identifier
+                               | N_Indexed_Component
            and then not Analyzed (Init_Expr)
          then
             Preanalyze_And_Resolve (Init_Expr, Comp_Typ);
@@ -3490,8 +3490,8 @@ package body Exp_Aggr is
             --  qualified).
 
             elsif Is_Limited_Type (Etype (Ancestor))
-              and then Nkind_In (Unqualify (Ancestor), N_Aggregate,
-                                                       N_Extension_Aggregate)
+              and then Nkind (Unqualify (Ancestor)) in
+                         N_Aggregate | N_Extension_Aggregate
             then
                Ancestor_Is_Expression := True;
 
@@ -3523,8 +3523,8 @@ package body Exp_Aggr is
                --  If the ancestor part is an aggregate, force its full
                --  expansion, which was delayed.
 
-               if Nkind_In (Unqualify (Ancestor), N_Aggregate,
-                                                  N_Extension_Aggregate)
+               if Nkind (Unqualify (Ancestor)) in
+                    N_Aggregate | N_Extension_Aggregate
                then
                   Set_Analyzed (Ancestor, False);
                   Set_Analyzed (Expression (Ancestor), False);
@@ -4783,7 +4783,7 @@ package body Exp_Aggr is
       Parent_Node : Node_Id;
 
    begin
-      pragma Assert (Nkind_In (N, N_Aggregate, N_Extension_Aggregate));
+      pragma Assert (Nkind (N) in N_Aggregate | N_Extension_Aggregate);
       pragma Assert (not Is_Static_Dispatch_Table_Aggregate (N));
       pragma Assert (Is_Record_Type (Typ));
 
@@ -4897,7 +4897,7 @@ package body Exp_Aggr is
 
             --  The check just above may have replaced the aggregate with a CE
 
-            if Nkind_In (N, N_Aggregate, N_Extension_Aggregate) then
+            if Nkind (N) in N_Aggregate | N_Extension_Aggregate then
                Target_Expr := New_Copy_Tree (Lhs);
                Insert_Actions (Parent_Node,
                  Build_Record_Aggr_Code (N, Typ, Target_Expr));
@@ -6189,7 +6189,7 @@ package body Exp_Aggr is
          if Is_Entity_Name (N) then
             return True;
 
-         elsif Nkind_In (N, N_Explicit_Dereference, N_Selected_Component)
+         elsif Nkind (N) in N_Explicit_Dereference | N_Selected_Component
            and then Safe_Left_Hand_Side (Prefix (N))
          then
             return True;
@@ -6701,7 +6701,7 @@ package body Exp_Aggr is
          if Needs_Finalization (Typ)
            and then Is_Entity_Name (Target)
            and then Present (Entity (Target))
-           and then Ekind_In (Entity (Target), E_Constant, E_Variable)
+           and then Ekind (Entity (Target)) in E_Constant | E_Variable
          then
             Set_Last_Aggregate_Assignment (Entity (Target), Last (Aggr_Code));
          end if;
@@ -8099,8 +8099,8 @@ package body Exp_Aggr is
       begin
          Aggr := N;
          while Present (Parent (Aggr))
-           and then Nkind_In (Parent (Aggr), N_Aggregate,
-                                             N_Component_Association)
+           and then Nkind (Parent (Aggr)) in
+                      N_Aggregate | N_Component_Association
          loop
             Aggr := Parent (Aggr);
          end loop;
@@ -8146,8 +8146,8 @@ package body Exp_Aggr is
       --  aggregates for C++ imported types must be expanded.
 
       elsif Ada_Version >= Ada_2005 and then Is_Limited_View (Typ) then
-         if not Nkind_In (Parent (N), N_Component_Association,
-                                      N_Object_Declaration)
+         if Nkind (Parent (N)) not in
+              N_Component_Association | N_Object_Declaration
          then
             Convert_To_Assignments (N, Typ);
 
@@ -8257,7 +8257,7 @@ package body Exp_Aggr is
    begin
       R := Get_Referenced_Object (N);
 
-      while Nkind_In (R, N_Indexed_Component, N_Selected_Component, N_Slice)
+      while Nkind (R) in N_Indexed_Component | N_Selected_Component | N_Slice
       loop
          R := Get_Referenced_Object (Prefix (R));
       end loop;
@@ -8279,7 +8279,7 @@ package body Exp_Aggr is
       Expr  : Node_Id;
 
    begin
-      pragma Assert (Nkind_In (N, N_Aggregate, N_Extension_Aggregate));
+      pragma Assert (Nkind (N) in N_Aggregate | N_Extension_Aggregate);
 
       if No (Comps) then
          return False;
@@ -8307,7 +8307,7 @@ package body Exp_Aggr is
          Expr := Expression (C);
 
          if Present (Expr)
-           and then Nkind_In (Expr, N_Aggregate, N_Extension_Aggregate)
+           and then Nkind (Expr) in N_Aggregate | N_Extension_Aggregate
            and then Has_Default_Init_Comps (Expr)
          then
             return True;
@@ -8360,7 +8360,7 @@ package body Exp_Aggr is
          Kind := Nkind (Node);
       end if;
 
-      if not Nkind_In (Kind, N_Aggregate, N_Extension_Aggregate) then
+      if Kind not in N_Aggregate | N_Extension_Aggregate then
          return False;
       else
          return Expansion_Delayed (Node);
@@ -8532,7 +8532,7 @@ package body Exp_Aggr is
       if Needs_Finalization (Typ)
         and then Is_Entity_Name (Target)
         and then Present (Entity (Target))
-        and then Ekind_In (Entity (Target), E_Constant, E_Variable)
+        and then Ekind (Entity (Target)) in E_Constant | E_Variable
       then
          Set_Last_Aggregate_Assignment (Entity (Target), Last (Aggr_Code));
       end if;
@@ -8576,13 +8576,13 @@ package body Exp_Aggr is
       function Aggr_Context (N : Node_Id) return Node_Id is
          Result : Node_Id := Parent (N);
       begin
-         if Nkind_In (Result, N_Qualified_Expression,
-                              N_Type_Conversion,
-                              N_Unchecked_Type_Conversion,
-                              N_If_Expression,
-                              N_Case_Expression,
-                              N_Component_Association,
-                              N_Aggregate)
+         if Nkind (Result) in N_Qualified_Expression
+                            | N_Type_Conversion
+                            | N_Unchecked_Type_Conversion
+                            | N_If_Expression
+                            | N_Case_Expression
+                            | N_Component_Association
+                            | N_Aggregate
          then
             Result := Aggr_Context (Result);
          end if;
@@ -9370,7 +9370,7 @@ package body Exp_Aggr is
 
       function Is_Static_Component (Nod : Node_Id) return Boolean is
       begin
-         if Nkind_In (Nod, N_Integer_Literal, N_Real_Literal) then
+         if Nkind (Nod) in N_Integer_Literal | N_Real_Literal then
             return True;
 
          elsif Is_Entity_Name (Nod)
index cbc1fdd28d81ead9e6e79c9674889629c29f5a16..855aa29c4d4aa955f1b5d52905e266b68e162f02 100644 (file)
@@ -533,10 +533,7 @@ package body Exp_Attr is
          --  Comes_From_Source is not correct because this will eliminate the
          --  components within the corresponding record of a protected type.
 
-         if Nam_In (Field_Nam, Name_uObject,
-                               Name_uParent,
-                               Name_uTag)
-         then
+         if Field_Nam in Name_uObject | Name_uParent | Name_uTag then
             null;
 
          --  Do not process fields without any scalar components
@@ -2030,8 +2027,8 @@ package body Exp_Attr is
 
       if Is_Protected_Self_Reference (Pref)
         and then not
-          (Nkind_In (Parent (N), N_Index_Or_Discriminant_Constraint,
-                                 N_Discriminant_Association)
+          (Nkind (Parent (N)) in N_Index_Or_Discriminant_Constraint
+                               | N_Discriminant_Association
             and then Nkind (Parent (Parent (Parent (Parent (N))))) =
                                                       N_Component_Definition)
 
@@ -2100,9 +2097,9 @@ package body Exp_Attr is
 
             begin
                Obj_Name := N;
-               while Nkind_In (Obj_Name, N_Selected_Component,
-                                         N_Indexed_Component,
-                                         N_Slice)
+               while Nkind (Obj_Name) in N_Selected_Component
+                                       | N_Indexed_Component
+                                       | N_Slice
                loop
                   Obj_Name := Prefix (Obj_Name);
                end loop;
@@ -2270,7 +2267,7 @@ package body Exp_Attr is
 
                         begin
                            Subp := Current_Scope;
-                           while Ekind_In (Subp, E_Loop, E_Block) loop
+                           while Ekind (Subp) in E_Loop | E_Block loop
                               Subp := Scope (Subp);
                            end loop;
 
@@ -7666,7 +7663,7 @@ package body Exp_Attr is
          Cnam := Name_Last;
       end if;
 
-      if not Nkind_In (P, N_Assignment_Statement, N_Object_Declaration)
+      if Nkind (P) not in N_Assignment_Statement | N_Object_Declaration
         or else not Suppress_Assignment_Checks (P)
       then
          Insert_Action (N,
index 02a0652335ce74d5164260d3dfda0429fcbbbbc0..122a40f519942d665cf4672f9b820c06b83a996c 100644 (file)
@@ -268,7 +268,7 @@ package body Exp_CG is
             return True;
 
          elsif not Has_Fully_Qualified_Name (E) then
-            if Nam_In (Chars (E), Name_uSize, Name_uAlignment, Name_uAssign)
+            if Chars (E) in Name_uSize | Name_uAlignment | Name_uAssign
               or else
                 (Chars (E) = Name_Op_Eq
                   and then Etype (First_Formal (E)) = Etype (Last_Formal (E)))
index acc53b19b1af9a4368bd994e6eec01ab4451f3e7..abc91a2f131894df58c535323174cf8b945abefd 100644 (file)
@@ -1426,9 +1426,9 @@ package body Exp_Ch11 is
       --  objects of controlled types, for example. We do not want to clean up
       --  the return object.
 
-      if not Nkind_In (Parent (N), N_Accept_Statement,
-                                   N_Extended_Return_Statement,
-                                   N_Package_Body)
+      if Nkind (Parent (N)) not in N_Accept_Statement
+                                 | N_Extended_Return_Statement
+                                 | N_Package_Body
         and then not Delay_Cleanups (Current_Scope)
         and then not Is_Thunk (Current_Scope)
       then
index 407ffcb434ccd1d6c6df392b6ab23ca7315b29c1..ff1029cb5f771683ded5c5ac74b554af0a7af4dd 100644 (file)
@@ -160,11 +160,9 @@ package body Exp_Ch2 is
 
          and then not (Nkind (Parent (N)) = N_Attribute_Reference
                         and then
-                          (Nam_In (Attribute_Name (Parent (N)),
-                                   Name_Asm_Input,
-                                   Name_Asm_Output)
+                          (Attribute_Name (Parent (N)) in Name_Asm_Input
+                                                        | Name_Asm_Output
                             or else Prefix (Parent (N)) = N))
-
       then
          --  Case of Current_Value is a compile time known value
 
@@ -406,7 +404,7 @@ package body Exp_Ch2 is
       --  Set Atomic_Sync_Required if necessary for atomic variable. Note that
       --  this processing does NOT apply to Volatile_Full_Access variables.
 
-      if Nkind_In (N, N_Identifier, N_Expanded_Name)
+      if Nkind (N) in N_Identifier | N_Expanded_Name
         and then Ekind (E) = E_Variable
         and then (Is_Atomic (E) or else Is_Atomic (Etype (E)))
       then
@@ -512,8 +510,8 @@ package body Exp_Ch2 is
          --  ??? passing a formal as actual for a mode IN formal is
          --  considered as an assignment?
 
-         if Nkind_In (Parent (N), N_Procedure_Call_Statement,
-                                  N_Entry_Call_Statement)
+         if Nkind (Parent (N)) in
+              N_Procedure_Call_Statement | N_Entry_Call_Statement
            or else (Nkind (Parent (N)) = N_Assignment_Statement
                       and then N = Name (Parent (N)))
          then
@@ -529,9 +527,8 @@ package body Exp_Ch2 is
          --  which case there is an implicit dereference, and the formal itself
          --  is not being assigned to).
 
-         elsif Nkind_In (Parent (N), N_Selected_Component,
-                                     N_Indexed_Component,
-                                     N_Slice)
+         elsif Nkind (Parent (N)) in
+                 N_Selected_Component | N_Indexed_Component | N_Slice
            and then N = Prefix (Parent (N))
            and then not Is_Access_Type (Etype (N))
            and then In_Assignment_Context (Parent (N))
@@ -748,7 +745,7 @@ package body Exp_Ch2 is
    begin
       --  Simple reference case
 
-      if Nkind_In (N, N_Identifier, N_Expanded_Name) then
+      if Nkind (N) in N_Identifier | N_Expanded_Name then
          if Is_Formal (Entity (N)) then
             return Entity (N);
 
index ba4f3da23bc6d1a4236f3edbe1cfb7f2638d029d..0b601c56213ad99cc1d9da9928acba33782d0324 100644 (file)
@@ -1976,8 +1976,8 @@ package body Exp_Ch3 is
          --  traversing the expression. ???
 
          if Kind = N_Attribute_Reference
-           and then Nam_In (Attribute_Name (Default), Name_Unchecked_Access,
-                                                      Name_Unrestricted_Access)
+           and then Attribute_Name (Default) in Name_Unchecked_Access
+                                              | Name_Unrestricted_Access
            and then Is_Entity_Name (Prefix (Default))
            and then Is_Type (Entity (Prefix (Default)))
            and then Entity (Prefix (Default)) = Rec_Type
@@ -2040,7 +2040,7 @@ package body Exp_Ch3 is
          end if;
 
          if Needs_Finalization (Typ)
-           and then not (Nkind_In (Kind, N_Aggregate, N_Extension_Aggregate))
+           and then Kind not in N_Aggregate | N_Extension_Aggregate
            and then not Is_Build_In_Place_Function_Call (Exp)
          then
             Adj_Call :=
@@ -3243,10 +3243,10 @@ package body Exp_Ch3 is
 
                elsif Ekind (Scope (Id)) = E_Record_Type
                  and then Present (Corresponding_Concurrent_Type (Scope (Id)))
-                 and then Nam_In (Chars (Id), Name_uCPU,
-                                              Name_uDispatching_Domain,
-                                              Name_uPriority,
-                                              Name_uSecondary_Stack_Size)
+                 and then Chars (Id) in Name_uCPU
+                                      | Name_uDispatching_Domain
+                                      | Name_uPriority
+                                      | Name_uSecondary_Stack_Size
                then
                   declare
                      Exp   : Node_Id;
@@ -6736,9 +6736,9 @@ package body Exp_Ch3 is
         and then Building_Static_Dispatch_Tables
         and then Is_Library_Level_Entity (Def_Id)
         and then Is_Library_Level_Tagged_Type (Base_Typ)
-        and then Ekind_In (Base_Typ, E_Record_Type,
-                                     E_Protected_Type,
-                                     E_Task_Type)
+        and then Ekind (Base_Typ) in E_Record_Type
+                                   | E_Protected_Type
+                                   | E_Task_Type
         and then not Has_Dispatch_Table (Base_Typ)
       then
          declare
@@ -6789,7 +6789,7 @@ package body Exp_Ch3 is
         and then not Restriction_Active (No_Secondary_Stack)
         and then (Restriction_Active (No_Implicit_Heap_Allocations)
           or else Restriction_Active (No_Implicit_Task_Allocations))
-        and then not (Ekind_In (Ekind (Typ), E_Array_Type, E_Array_Subtype)
+        and then not (Ekind (Typ) in E_Array_Type | E_Array_Subtype
                       and then (Has_Init_Expression (N)))
       then
          declare
@@ -7597,9 +7597,9 @@ package body Exp_Ch3 is
 
       --  Do not duplicate the work of Process_Range_Expr_In_Decl in Sem_Ch3
 
-      if Nkind_In (Parent (N), N_Constrained_Array_Definition, N_Slice)
-        and then Nkind (Parent (Parent (N))) /= N_Full_Type_Declaration
-        and then Nkind (Parent (Parent (N))) /= N_Object_Declaration
+      if Nkind (Parent (N)) in N_Constrained_Array_Definition | N_Slice
+        and then Nkind (Parent (Parent (N))) not in
+                   N_Full_Type_Declaration | N_Object_Declaration
       then
          Apply_Range_Check (Ran, Typ);
       end if;
@@ -8032,7 +8032,7 @@ package body Exp_Ch3 is
 
       --  See GNAT Pool packages in the Run-Time for more details
 
-      elsif Ekind_In (Def_Id, E_Access_Type, E_General_Access_Type) then
+      elsif Ekind (Def_Id) in E_Access_Type | E_General_Access_Type then
          declare
             Loc        : constant Source_Ptr := Sloc (N);
             Desig_Type : constant Entity_Id  := Designated_Type (Def_Id);
@@ -8698,7 +8698,7 @@ package body Exp_Ch3 is
          --  If the initial value is null or an aggregate, qualify it with the
          --  underlying type in order to provide a proper context.
 
-         if Nkind_In (Expr, N_Aggregate, N_Null) then
+         if Nkind (Expr) in N_Aggregate | N_Null then
             Expr :=
               Make_Qualified_Expression (Loc,
                 Subtype_Mark => New_Occurrence_Of (Under_Typ, Loc),
index 2f6dc3a989f605c0f7f541056cb393f97a4b4e7f..30824c69fea19b687eb22e215a416983818f69d1 100644 (file)
@@ -4149,7 +4149,7 @@ package body Exp_Ch4 is
          --  we avoid never-ending loops expanding them, and we also ensure
          --  the back end never receives nonbinary modular type expressions.
 
-         if Nkind_In (Nkind (N), N_Op_And, N_Op_Or, N_Op_Xor) then
+         if Nkind (N) in N_Op_And | N_Op_Or | N_Op_Xor then
             Set_Left_Opnd (Op_Expr,
               Unchecked_Convert_To (Standard_Unsigned,
                 New_Copy_Tree (Left_Opnd (N))));
@@ -4532,11 +4532,11 @@ package body Exp_Ch4 is
          --  lifetime of the object must be associated with the named access
          --  type. Use the finalization-related attributes of this type.
 
-         if Nkind_In (Parent (N), N_Type_Conversion,
-                                  N_Unchecked_Type_Conversion)
-           and then Ekind_In (Etype (Parent (N)), E_Access_Subtype,
-                                                  E_Access_Type,
-                                                  E_General_Access_Type)
+         if Nkind (Parent (N)) in N_Type_Conversion
+                                | N_Unchecked_Type_Conversion
+           and then Ekind (Etype (Parent (N))) in E_Access_Subtype
+                                                | E_Access_Type
+                                                | E_General_Access_Type
          then
             Rel_Typ := Etype (Parent (N));
          else
@@ -5084,8 +5084,8 @@ package body Exp_Ch4 is
                                 New_Occurrence_Of
                                   (Entity (Nam), Sloc (Nam)), T);
 
-                        elsif Nkind_In (Nam, N_Indexed_Component,
-                                             N_Selected_Component)
+                        elsif Nkind (Nam) in N_Indexed_Component
+                                           | N_Selected_Component
                           and then Is_Entity_Name (Prefix (Nam))
                         then
                            Decls :=
@@ -5355,7 +5355,7 @@ package body Exp_Ch4 is
       --  to which it applies has a static predicate aspect, do not expand,
       --  because it will be converted to the proper predicate form later.
 
-      if Ekind_In (Current_Scope, E_Function, E_Procedure)
+      if Ekind (Current_Scope) in E_Function | E_Procedure
         and then Is_Predicate_Function (Current_Scope)
       then
          In_Predicate := True;
@@ -6224,8 +6224,8 @@ package body Exp_Ch4 is
                --  to consider???
 
                loop
-                  if Nkind_In (Obj_Ref, N_Type_Conversion,
-                                        N_Unchecked_Type_Conversion)
+                  if Nkind (Obj_Ref) in
+                       N_Type_Conversion | N_Unchecked_Type_Conversion
                   then
                      Obj_Ref := Expression (Obj_Ref);
                   else
@@ -7081,9 +7081,9 @@ package body Exp_Ch4 is
                return;
 
             elsif Nkind (Parnt) = N_Attribute_Reference
-              and then Nam_In (Attribute_Name (Parnt), Name_Address,
-                                                       Name_Bit,
-                                                       Name_Size)
+              and then Attribute_Name (Parnt) in Name_Address
+                                               | Name_Bit
+                                               | Name_Size
               and then Prefix (Parnt) = Child
             then
                return;
@@ -8440,13 +8440,12 @@ package body Exp_Ch4 is
       --  records because there may be padding or undefined fields.
 
       elsif Unnest_Subprogram_Mode
-        and then Ekind_In (Typl, E_Class_Wide_Type,
-                                 E_Class_Wide_Subtype,
-                                 E_Access_Subprogram_Type,
-                                 E_Access_Protected_Subprogram_Type,
-                                 E_Anonymous_Access_Protected_Subprogram_Type,
-                                 E_Access_Subprogram_Type,
-                                 E_Exception_Type)
+        and then Ekind (Typl) in E_Class_Wide_Type
+                               | E_Class_Wide_Subtype
+                               | E_Access_Subprogram_Type
+                               | E_Access_Protected_Subprogram_Type
+                               | E_Anonymous_Access_Protected_Subprogram_Type
+                               | E_Exception_Type
         and then Present (Equivalent_Type (Typl))
         and then Is_Record_Type (Equivalent_Type (Typl))
       then
@@ -8759,7 +8758,7 @@ package body Exp_Ch4 is
          --  too tricky to combine the overflow check at the parent level.
 
          if not Ovflo
-           and then Nkind_In (Parent (N), N_Op_Divide, N_Op_Multiply)
+           and then Nkind (Parent (N)) in N_Op_Divide | N_Op_Multiply
          then
             declare
                P : constant Node_Id := Parent (N);
@@ -9792,13 +9791,12 @@ package body Exp_Ch4 is
 
       if Is_Elementary_Type (Typ)
         and then Sloc (Entity (N)) = Standard_Location
-        and then not (Ekind_In (Typ, E_Class_Wide_Type,
-                                E_Class_Wide_Subtype,
-                                E_Access_Subprogram_Type,
-                                E_Access_Protected_Subprogram_Type,
-                                E_Anonymous_Access_Protected_Subprogram_Type,
-                                E_Access_Subprogram_Type,
-                                E_Exception_Type)
+        and then not (Ekind (Typ) in E_Class_Wide_Type
+                              | E_Class_Wide_Subtype
+                              | E_Access_Subprogram_Type
+                              | E_Access_Protected_Subprogram_Type
+                              | E_Anonymous_Access_Protected_Subprogram_Type
+                              | E_Exception_Type
                         and then Present (Equivalent_Type (Typ))
                         and then Is_Record_Type (Equivalent_Type (Typ)))
       then
@@ -9978,7 +9976,7 @@ package body Exp_Ch4 is
 
          --  Special case the negation of a binary operation
 
-         elsif Nkind_In (Opnd, N_Op_And, N_Op_Or, N_Op_Xor)
+         elsif Nkind (Opnd) in N_Op_And | N_Op_Or | N_Op_Xor
            and then Safe_In_Place_Array_Op
                       (Name (Parent (N)), Left_Opnd (Opnd), Right_Opnd (Opnd))
          then
@@ -11153,9 +11151,9 @@ package body Exp_Ch4 is
             --  since these are additional cases that do can appear on
             --  procedure actuals.
 
-            elsif Nkind_In (Par, N_Type_Conversion,
-                                 N_Parameter_Association,
-                                 N_Qualified_Expression)
+            elsif Nkind (Par) in N_Type_Conversion
+                               | N_Parameter_Association
+                               | N_Qualified_Expression
             then
                Par := Parent (Par);
 
@@ -11885,7 +11883,7 @@ package body Exp_Ch4 is
 
       function Has_Extra_Accessibility (Id : Entity_Id) return Boolean is
       begin
-         if Is_Formal (Id) or else Ekind_In (Id, E_Constant, E_Variable) then
+         if Is_Formal (Id) or else Ekind (Id) in E_Constant | E_Variable then
             return Present (Effective_Extra_Accessibility (Id));
          else
             return False;
@@ -12135,9 +12133,9 @@ package body Exp_Ch4 is
                       or else Attribute_Name (Original_Node (N)) = Name_Access)
          then
             if not Comes_From_Source (N)
-              and then Nkind_In (Parent (N), N_Function_Call,
-                                             N_Parameter_Association,
-                                             N_Procedure_Call_Statement)
+              and then Nkind (Parent (N)) in N_Function_Call
+                                           | N_Parameter_Association
+                                           | N_Procedure_Call_Statement
               and then Is_Interface (Designated_Type (Target_Type))
               and then Is_Class_Wide_Type (Designated_Type (Target_Type))
             then
@@ -12752,7 +12750,7 @@ package body Exp_Ch4 is
 
             exit when No (Comp);
 
-            exit when Ekind_In (Comp, E_Discriminant, E_Component)
+            exit when Ekind (Comp) in E_Discriminant | E_Component
               and then not (
 
               --  Skip inherited components
@@ -13530,13 +13528,9 @@ package body Exp_Ch4 is
            --  value and unary negation. Unary "+" is omitted since it is a
            --  no-op and thus can't overflow.
 
-           and then Nkind_In (Operand, N_Op_Abs,
-                                       N_Op_Add,
-                                       N_Op_Divide,
-                                       N_Op_Expon,
-                                       N_Op_Minus,
-                                       N_Op_Multiply,
-                                       N_Op_Subtract);
+           and then Nkind (Operand) in
+                      N_Op_Abs   | N_Op_Add      | N_Op_Divide | N_Op_Expon |
+                      N_Op_Minus | N_Op_Multiply | N_Op_Subtract;
    end Integer_Promotion_Possible;
 
    ------------------------------
@@ -14746,9 +14740,9 @@ package body Exp_Ch4 is
       --  transient object.
 
    begin
-      pragma Assert (Nkind_In (Expr, N_Case_Expression,
-                                     N_Expression_With_Actions,
-                                     N_If_Expression));
+      pragma Assert (Nkind (Expr) in N_Case_Expression
+                                   | N_Expression_With_Actions
+                                   | N_If_Expression);
 
       --  When the context is a Boolean evaluation, all three nodes capture the
       --  result of their computation in a local temporary:
@@ -14815,7 +14809,7 @@ package body Exp_Ch4 is
       --      <or>
       --    Hook := Obj_Id'Unrestricted_Access;
 
-      if Ekind_In (Obj_Id, E_Constant, E_Variable)
+      if Ekind (Obj_Id) in E_Constant | E_Variable
         and then Present (Last_Aggregate_Assignment (Obj_Id))
       then
          Hook_Insert := Last_Aggregate_Assignment (Obj_Id);
@@ -14949,7 +14943,7 @@ package body Exp_Ch4 is
          elsif Is_Entity_Name (Op) then
             return Is_Unaliased (Op);
 
-         elsif Nkind_In (Op, N_Indexed_Component, N_Selected_Component) then
+         elsif Nkind (Op) in N_Indexed_Component | N_Selected_Component then
             return Is_Unaliased (Prefix (Op));
 
          elsif Nkind (Op) = N_Slice then
index 8482f3007358cd56a71328b208163bf012f9a316..309297b59098b9cadf453dbeb7a3593a555be801 100644 (file)
@@ -1452,17 +1452,14 @@ package body Exp_Ch5 is
       L_Prefix_Comp : constant Boolean :=
         --  True if the left-hand side is a slice of a component or slice
         Nkind (Name (N)) = N_Slice
-        and then Nkind_In (Prefix (Name (N)),
-                           N_Selected_Component,
-                           N_Indexed_Component,
-                           N_Slice);
+          and then Nkind (Prefix (Name (N))) in
+                     N_Selected_Component | N_Indexed_Component | N_Slice;
       R_Prefix_Comp : constant Boolean :=
         --  Likewise for the right-hand side
         Nkind (Expression (N)) = N_Slice
-        and then Nkind_In (Prefix (Expression (N)),
-                           N_Selected_Component,
-                           N_Indexed_Component,
-                           N_Slice);
+          and then Nkind (Prefix (Expression (N))) in
+                     N_Selected_Component | N_Indexed_Component | N_Slice;
+
    begin
       --  Determine whether Copy_Bitfield is appropriate (will work, and will
       --  be more efficient than component-by-component copy). Copy_Bitfield
@@ -1899,8 +1896,8 @@ package body Exp_Ch5 is
          --  We know the underlying type is a record, but its current view
          --  may be private. We must retrieve the usable record declaration.
 
-         if Nkind_In (Decl, N_Private_Type_Declaration,
-                            N_Private_Extension_Declaration)
+         if Nkind (Decl) in N_Private_Type_Declaration
+                          | N_Private_Extension_Declaration
            and then Present (Full_View (R_Typ))
          then
             RDef := Type_Definition (Declaration_Node (Full_View (R_Typ)));
@@ -2260,7 +2257,7 @@ package body Exp_Ch5 is
       --  Since P is going to be evaluated more than once, any subscripts
       --  in P must have their evaluation forced.
 
-      if Nkind_In (Lhs, N_Indexed_Component, N_Selected_Component)
+      if Nkind (Lhs) in N_Indexed_Component | N_Selected_Component
         and then Is_Ref_To_Bit_Packed_Array (Prefix (Lhs))
       then
          declare
@@ -2296,8 +2293,7 @@ package body Exp_Ch5 is
             loop
                Set_Analyzed (Exp, False);
 
-               if Nkind_In (Exp, N_Indexed_Component,
-                                 N_Selected_Component)
+               if Nkind (Exp) in N_Indexed_Component | N_Selected_Component
                then
                   Exp := Prefix (Exp);
                else
@@ -2865,8 +2861,8 @@ package body Exp_Ch5 is
             Actual_Rhs : Node_Id := Rhs;
 
          begin
-            while Nkind_In (Actual_Rhs, N_Type_Conversion,
-                                        N_Qualified_Expression)
+            while Nkind (Actual_Rhs) in
+                    N_Type_Conversion | N_Qualified_Expression
             loop
                Actual_Rhs := Expression (Actual_Rhs);
             end loop;
@@ -2940,7 +2936,7 @@ package body Exp_Ch5 is
                --  Skip this if left-hand side is an array or record component
                --  and elementary component validity checks are suppressed.
 
-               if Nkind_In (Lhs, N_Selected_Component, N_Indexed_Component)
+               if Nkind (Lhs) in N_Selected_Component | N_Indexed_Component
                  and then not Validity_Check_Components
                then
                   null;
@@ -3791,9 +3787,9 @@ package body Exp_Ch5 is
                      Else_Expr : constant Node_Id := Expression (Else_Stm);
 
                   begin
-                     if Nkind_In (Then_Expr, N_Expanded_Name, N_Identifier)
+                     if Nkind (Then_Expr) in N_Expanded_Name | N_Identifier
                           and then
-                        Nkind_In (Else_Expr, N_Expanded_Name, N_Identifier)
+                        Nkind (Else_Expr) in N_Expanded_Name | N_Identifier
                      then
                         if Entity (Then_Expr) = Standard_True
                           and then Entity (Else_Expr) = Standard_False
index a7cfb6538d31bb6a96cdbfa123a33eb68b801800..b8efa5f399098e55e5b0a6b6a78bc385fda064df 100644 (file)
@@ -661,8 +661,8 @@ package body Exp_Ch6 is
         and then not Scope_Suppress.Suppress (Accessibility_Check)
         and then
           (Is_Class_Wide_Type (Etype (Exp))
-            or else Nkind_In (Exp, N_Type_Conversion,
-                                   N_Unchecked_Type_Conversion)
+            or else Nkind (Exp) in
+                      N_Type_Conversion | N_Unchecked_Type_Conversion
             or else (Is_Entity_Name (Exp)
                       and then Is_Formal (Entity (Exp)))
             or else Scope_Depth (Enclosing_Dynamic_Scope (Etype (Exp))) >
@@ -1070,9 +1070,9 @@ package body Exp_Ch6 is
       Actual : Node_Id;
 
    begin
-      pragma Assert (Nkind_In (Subp_Call, N_Entry_Call_Statement,
-                                          N_Function_Call,
-                                          N_Procedure_Call_Statement));
+      pragma Assert (Nkind (Subp_Call) in N_Entry_Call_Statement
+                                        | N_Function_Call
+                                        | N_Procedure_Call_Statement);
 
       Formal := First_Formal_With_Extras (Subp_Id);
       Actual := First_Actual (Subp_Call);
@@ -1106,9 +1106,9 @@ package body Exp_Ch6 is
       Actual : Node_Id;
 
    begin
-      pragma Assert (Nkind_In (Subp_Call, N_Entry_Call_Statement,
-                                          N_Function_Call,
-                                          N_Procedure_Call_Statement));
+      pragma Assert (Nkind (Subp_Call) in N_Entry_Call_Statement
+                                        | N_Function_Call
+                                        | N_Procedure_Call_Statement);
 
       Formal := First_Formal_With_Extras (Subp_Id);
       Actual := First_Actual (Subp_Call);
@@ -2180,7 +2180,7 @@ package body Exp_Ch6 is
          loop
             Set_Analyzed (Pfx, False);
             exit when
-              not Nkind_In (Pfx, N_Selected_Component, N_Indexed_Component);
+              Nkind (Pfx) not in N_Selected_Component | N_Indexed_Component;
             Pfx := Prefix (Pfx);
          end loop;
       end Reset_Packed_Prefix;
@@ -2603,8 +2603,8 @@ package body Exp_Ch6 is
                   --  root type.
 
                   elsif
-                    Nkind_In (Parent (Subp), N_Private_Extension_Declaration,
-                                             N_Full_Type_Declaration)
+                    Nkind (Parent (Subp)) in N_Private_Extension_Declaration
+                                           | N_Full_Type_Declaration
                   then
                      Subp_Decl := Parent (Subp);
 
@@ -2678,9 +2678,9 @@ package body Exp_Ch6 is
             (Access_Subprogram_Wrapper (Etype (Name (N))));
 
    begin
-      pragma Assert (Nkind_In (N, N_Entry_Call_Statement,
-                                  N_Function_Call,
-                                  N_Procedure_Call_Statement));
+      pragma Assert (Nkind (N) in N_Entry_Call_Statement
+                                | N_Function_Call
+                                | N_Procedure_Call_Statement);
 
       --  Check that this is not the call in the body of the wrapper.
 
@@ -3287,7 +3287,7 @@ package body Exp_Ch6 is
 
       if Ada_Version >= Ada_2012
         and then
-           Nkind_In (Call_Node, N_Procedure_Call_Statement, N_Function_Call)
+           Nkind (Call_Node) in N_Procedure_Call_Statement | N_Function_Call
         and then Present (Parameter_Associations (Call_Node))
       then
          Expand_Put_Call_With_Symbol (Call_Node);
@@ -3587,8 +3587,8 @@ package body Exp_Ch6 is
                   --  as out parameter actuals on calls to stream procedures.
 
                   Act_Prev := Prev;
-                  while Nkind_In (Act_Prev, N_Type_Conversion,
-                                            N_Unchecked_Type_Conversion)
+                  while Nkind (Act_Prev) in N_Type_Conversion
+                                          | N_Unchecked_Type_Conversion
                   loop
                      Act_Prev := Expression (Act_Prev);
                   end loop;
@@ -3670,9 +3670,7 @@ package body Exp_Ch6 is
             --  constant declaration defines the accessibility level of X'Old".
 
             elsif Nkind (Prev_Orig) = N_Attribute_Reference
-              and then Nam_In (Attribute_Name (Prev_Orig),
-                               Name_Old,
-                               Name_Loop_Entry)
+              and then Attribute_Name (Prev_Orig) in Name_Old | Name_Loop_Entry
               and then Is_Entity_Name (Prev)
               and then Present (Entity (Prev))
               and then Is_Object (Entity (Prev))
@@ -3935,9 +3933,8 @@ package body Exp_Ch6 is
 
                   when others =>
                      if Nkind (Prev) = N_Expression_With_Actions
-                       and then Nkind_In (Original_Node (Prev),
-                                           N_If_Expression,
-                                           N_Case_Expression)
+                       and then Nkind (Original_Node (Prev)) in
+                                  N_If_Expression | N_Case_Expression
                      then
                         declare
                            Decl : Node_Id;
@@ -3978,10 +3975,9 @@ package body Exp_Ch6 is
                                  if Nkind (Expression (Assn)) =
                                       N_Expression_With_Actions
                                    and then
-                                     Nkind_In
-                                       (Original_Node (Expression (Assn)),
-                                         N_Case_Expression,
-                                         N_If_Expression)
+                                     Nkind
+                                       (Original_Node (Expression (Assn))) in
+                                         N_Case_Expression | N_If_Expression
                                  then
                                     Insert_Level_Assign (Expression (Assn));
 
@@ -4014,8 +4010,8 @@ package body Exp_Ch6 is
 
                               Cond := First (Actions (Branch));
                               loop
-                                 exit when Nkind_In (Cond, N_Case_Statement,
-                                                           N_If_Statement);
+                                 exit when Nkind (Cond) in
+                                             N_Case_Statement | N_If_Statement;
 
                                  Next (Cond);
 
@@ -4199,7 +4195,7 @@ package body Exp_Ch6 is
             then
                null;
 
-            elsif Nkind_In (Prev, N_Allocator, N_Attribute_Reference) then
+            elsif Nkind (Prev) in N_Allocator | N_Attribute_Reference then
                null;
 
             else
@@ -4231,8 +4227,8 @@ package body Exp_Ch6 is
 
                begin
                   Nod := Actual;
-                  while Nkind_In (Nod, N_Indexed_Component,
-                                       N_Selected_Component)
+                  while Nkind (Nod) in
+                    N_Indexed_Component | N_Selected_Component
                   loop
                      Set_Analyzed (Nod, False);
                      Nod := Prefix (Nod);
@@ -4371,7 +4367,7 @@ package body Exp_Ch6 is
       --  "accessibility level determined by the point of call" (AI05-0234)
       --  passed in to it, then pass it in.
 
-      if Ekind_In (Subp, E_Function, E_Operator, E_Subprogram_Type)
+      if Ekind (Subp) in E_Function | E_Operator | E_Subprogram_Type
         and then
           Present (Extra_Accessibility_Of_Result (Ultimate_Alias (Subp)))
       then
@@ -4666,7 +4662,7 @@ package body Exp_Ch6 is
       --  and reanalyzed (see Expand_Protected_Subprogram_Call).
 
       elsif Is_Protected_Type (Scope (Subp))
-         and then Ekind_In (Subp, E_Procedure, E_Function)
+         and then Ekind (Subp) in E_Procedure | E_Function
       then
          null;
 
@@ -4944,7 +4940,7 @@ package body Exp_Ch6 is
          return;
       end if;
 
-      if Ekind_In (Subp, E_Function, E_Procedure) then
+      if Ekind (Subp) in E_Function | E_Procedure then
 
          --  We perform a simple optimization on calls for To_Address by
          --  replacing them with an unchecked conversion. Not only is this
@@ -5161,14 +5157,14 @@ package body Exp_Ch6 is
          --  intermediate result after its use.
 
          elsif Is_Build_In_Place_Function_Call (Call_Node)
-           and then Nkind_In (Parent (Unqual_Conv (Call_Node)),
-                              N_Attribute_Reference,
-                              N_Function_Call,
-                              N_Indexed_Component,
-                              N_Object_Renaming_Declaration,
-                              N_Procedure_Call_Statement,
-                              N_Selected_Component,
-                              N_Slice)
+           and then Nkind (Parent (Unqual_Conv (Call_Node))) in
+                      N_Attribute_Reference
+                    | N_Function_Call
+                    | N_Indexed_Component
+                    | N_Object_Renaming_Declaration
+                    | N_Procedure_Call_Statement
+                    | N_Selected_Component
+                    | N_Slice
            and then
              (Ekind (Current_Scope) /= E_Loop
                or else Nkind (Parent (Call_Node)) /= N_Function_Call
@@ -6737,7 +6733,7 @@ package body Exp_Ch6 is
       --  For a procedure, we add a return for all possible syntactic ends of
       --  the subprogram.
 
-      if Ekind_In (Spec_Id, E_Procedure, E_Generic_Procedure) then
+      if Ekind (Spec_Id) in E_Procedure | E_Generic_Procedure then
          Add_Return (Spec_Id, Statements (HSS));
 
          if Present (Exception_Handlers (HSS)) then
@@ -6969,7 +6965,7 @@ package body Exp_Ch6 is
       --  Call the _Postconditions procedure if the related subprogram has
       --  contract assertions that need to be verified on exit.
 
-      if Ekind_In (Scope_Id, E_Entry, E_Entry_Family, E_Procedure)
+      if Ekind (Scope_Id) in E_Entry | E_Entry_Family | E_Procedure
         and then Present (Postconditions_Proc (Scope_Id))
       then
          Insert_Action (N,
@@ -7719,8 +7715,8 @@ package body Exp_Ch6 is
       if Present (Utyp)
         and then Is_Tagged_Type (Utyp)
         and then not Is_Class_Wide_Type (Utyp)
-        and then (Nkind_In (Exp, N_Type_Conversion,
-                                 N_Unchecked_Type_Conversion)
+        and then (Nkind (Exp) in
+                      N_Type_Conversion | N_Unchecked_Type_Conversion
                     or else (Is_Entity_Name (Exp)
                                and then Is_Formal (Entity (Exp))))
       then
@@ -7871,8 +7867,8 @@ package body Exp_Ch6 is
                end if;
 
             elsif Nkind (Discrim_Source) = N_Identifier
-              and then Nkind_In (Original_Node (Discrim_Source),
-                                 N_Aggregate, N_Extension_Aggregate)
+              and then Nkind (Original_Node (Discrim_Source)) in
+                         N_Aggregate | N_Extension_Aggregate
             then
                Discrim_Source := Original_Node (Discrim_Source);
 
@@ -8354,9 +8350,9 @@ package body Exp_Ch6 is
       --  in an expression context.
 
       if not Is_List_Member (N)
-        or else Nkind_In (Context, N_Function_Call,
-                                   N_If_Expression,
-                                   N_Indexed_Component)
+        or else Nkind (Context) in N_Function_Call
+                                 | N_If_Expression
+                                 | N_Indexed_Component
       then
          --  In Ada 2012 the call may be a function call in an expression
          --  (since OUT and IN OUT parameters are now allowed for such calls).
@@ -8434,8 +8430,8 @@ package body Exp_Ch6 is
          --  corresponding statement list.
 
          else
-            pragma Assert (Nkind_In (Context, N_Entry_Call_Alternative,
-                                              N_Triggering_Alternative));
+            pragma Assert (Nkind (Context) in N_Entry_Call_Alternative
+                                            | N_Triggering_Alternative);
 
             if Is_Non_Empty_List (Statements (Context)) then
                Insert_List_Before_And_Analyze
@@ -8591,7 +8587,7 @@ package body Exp_Ch6 is
       --  type whose result subtype is inherently limited. Later this test
       --  may be revised to allow composite nonlimited types.
 
-      if Ekind_In (E, E_Function, E_Generic_Function)
+      if Ekind (E) in E_Function | E_Generic_Function
         or else (Ekind (E) = E_Subprogram_Type
                   and then Etype (E) /= Standard_Void_Type)
       then
@@ -8745,9 +8741,9 @@ package body Exp_Ch6 is
       --  Step past qualification or unchecked conversion (the latter can occur
       --  in cases of calls to 'Input).
 
-      if Nkind_In (Func_Call, N_Qualified_Expression,
-                              N_Type_Conversion,
-                              N_Unchecked_Type_Conversion)
+      if Nkind (Func_Call) in N_Qualified_Expression
+                            | N_Type_Conversion
+                            | N_Unchecked_Type_Conversion
       then
          Func_Call := Expression (Func_Call);
       end if;
@@ -8868,8 +8864,8 @@ package body Exp_Ch6 is
 
          Temp_Init := Relocate_Node (Allocator);
 
-         if Nkind_In (Function_Call, N_Type_Conversion,
-                                     N_Unchecked_Type_Conversion)
+         if Nkind (Function_Call) in
+              N_Type_Conversion | N_Unchecked_Type_Conversion
          then
             Temp_Init := Unchecked_Convert_To (Acc_Type, Temp_Init);
          end if;
@@ -8914,8 +8910,8 @@ package body Exp_Ch6 is
       --  that the full types will be compatible, but the types not visibly
       --  compatible.
 
-      elsif Nkind_In (Function_Call, N_Type_Conversion,
-                                     N_Unchecked_Type_Conversion)
+      elsif Nkind (Function_Call)
+              in N_Type_Conversion | N_Unchecked_Type_Conversion
       then
          Ref_Func_Call := Unchecked_Convert_To (Acc_Type, Ref_Func_Call);
       end if;
@@ -9379,7 +9375,7 @@ package body Exp_Ch6 is
 
             begin
                while Present (N)
-                 and then Nkind_In (N, N_Attribute_Reference, N_Pragma)
+                 and then Nkind (N) in N_Attribute_Reference | N_Pragma
                loop
                   Analyze (N);
                   D := N;
@@ -9601,8 +9597,8 @@ package body Exp_Ch6 is
       Set_Etype (Def_Id, Ptr_Typ);
       Set_Is_Known_Non_Null (Def_Id);
 
-      if Nkind_In (Function_Call, N_Type_Conversion,
-                                  N_Unchecked_Type_Conversion)
+      if Nkind (Function_Call) in N_Type_Conversion
+                                | N_Unchecked_Type_Conversion
       then
          Res_Decl :=
            Make_Object_Declaration (Loc,
@@ -10250,7 +10246,7 @@ package body Exp_Ch6 is
          --  Mark the label of a source or internally generated block or
          --  loop.
 
-         if Nkind_In (P, N_Block_Statement, N_Loop_Statement) then
+         if Nkind (P) in N_Block_Statement | N_Loop_Statement then
             Set_Sec_Stack_Needed_For_Return (Entity (Identifier (P)));
 
          --  Mark the enclosing function
@@ -10297,18 +10293,18 @@ package body Exp_Ch6 is
          --  Recurse to handle case of multiple levels of qualification and/or
          --  conversion.
 
-         if Nkind_In (Expr, N_Qualified_Expression,
-                            N_Type_Conversion,
-                            N_Unchecked_Type_Conversion)
+         if Nkind (Expr) in N_Qualified_Expression
+                          | N_Type_Conversion
+                          | N_Unchecked_Type_Conversion
          then
             return Unqual_BIP_Function_Call (Expression (Expr));
 
          --  Recurse to handle case of multiple levels of references and
          --  explicit dereferences.
 
-         elsif Nkind_In (Expr, N_Attribute_Reference,
-                               N_Explicit_Dereference,
-                               N_Reference)
+         elsif Nkind (Expr) in N_Attribute_Reference
+                             | N_Explicit_Dereference
+                             | N_Reference
          then
             return Unqual_BIP_Function_Call (Prefix (Expr));
 
@@ -10316,7 +10312,7 @@ package body Exp_Ch6 is
 
          elsif Nkind (Expr) = N_Identifier
            and then Present (Entity (Expr))
-           and then Ekind_In (Entity (Expr), E_Constant, E_Variable)
+           and then Ekind (Entity (Expr)) in E_Constant | E_Variable
            and then Nkind (Parent (Entity (Expr))) =
                       N_Object_Renaming_Declaration
            and then Present (Renamed_Object (Entity (Expr)))
@@ -10329,7 +10325,7 @@ package body Exp_Ch6 is
          elsif not On_Object_Declaration
            and then Nkind (Expr) = N_Identifier
            and then Present (Entity (Expr))
-           and then Ekind_In (Entity (Expr), E_Constant, E_Variable)
+           and then Ekind (Entity (Expr)) in E_Constant | E_Variable
            and then Nkind (Parent (Entity (Expr))) = N_Object_Declaration
            and then Present (Expression (Parent (Entity (Expr))))
          then
index bd7a1e4bdedf8cf3401594238a281c770b6d1759..07640bf61652f4db43c1efe70a648cdf2c2a3433 100644 (file)
@@ -1343,8 +1343,8 @@ package body Exp_Ch7 is
             --  Treat use clauses as declarations and insert directly in front
             --  of them.
 
-            if Nkind_In (Insertion_Node, N_Use_Package_Clause,
-                                         N_Use_Type_Clause)
+            if Nkind (Insertion_Node) in
+                 N_Use_Package_Clause | N_Use_Type_Clause
             then
                Insert_List_Before_And_Analyze (Insertion_Node, Actions);
             else
@@ -2050,10 +2050,8 @@ package body Exp_Ch7 is
                --  freeze node, the body must be inserted directly after the
                --  construct.
 
-               if Nkind_In (Last_Top_Level_Ctrl_Construct,
-                              N_Freeze_Entity,
-                              N_Package_Declaration,
-                              N_Package_Body)
+               if Nkind (Last_Top_Level_Ctrl_Construct) in
+                    N_Freeze_Entity | N_Package_Declaration | N_Package_Body
                then
                   Finalizer_Insert_Nod := Last_Top_Level_Ctrl_Construct;
                end if;
@@ -2845,11 +2843,8 @@ package body Exp_Ch7 is
 
                Result := Next (Stmt);
                while Present (Result) loop
-                  if not Nkind_In (Result, N_Call_Marker,
-                                           N_Raise_Program_Error)
-                  then
-                     exit;
-                  end if;
+                  exit when Nkind (Result) not in
+                              N_Call_Marker | N_Raise_Program_Error;
 
                   Next (Result);
                end loop;
@@ -3045,7 +3040,7 @@ package body Exp_Ch7 is
          --  Insert the counter after all initialization has been done. The
          --  place of insertion depends on the context.
 
-         if Ekind_In (Obj_Id, E_Constant, E_Variable) then
+         if Ekind (Obj_Id) in E_Constant | E_Variable then
 
             --  The object is initialized by a build-in-place function call.
             --  The counter insertion point is after the function call.
@@ -3270,7 +3265,7 @@ package body Exp_Ch7 is
                end;
             end if;
 
-            if Ekind_In (Obj_Id, E_Constant, E_Variable)
+            if Ekind (Obj_Id) in E_Constant | E_Variable
               and then Present (Status_Flag_Or_Transient_Decl (Obj_Id))
             then
                --  Temporaries created for the purpose of "exporting" a
@@ -4361,7 +4356,7 @@ package body Exp_Ch7 is
          if Is_Subprogram (E) then
             return True;
 
-         elsif Ekind_In (E, E_Block, E_Loop)
+         elsif Ekind (E) in E_Block | E_Loop
            and then Contains_Subprogram (E)
          then
             return True;
@@ -4393,7 +4388,7 @@ package body Exp_Ch7 is
 
       Ftyp := Etype (Fent);
 
-      if Nkind_In (Arg, N_Type_Conversion, N_Unchecked_Type_Conversion) then
+      if Nkind (Arg) in N_Type_Conversion | N_Unchecked_Type_Conversion then
          Atyp := Entity (Subtype_Mark (Arg));
       else
          Atyp := Etype (Arg);
@@ -4414,7 +4409,7 @@ package body Exp_Ch7 is
       --  Make_Init_Call, set the target type to the type of the formal
       --  directly, to avoid spurious typing problems.
 
-      elsif Nkind_In (Arg, N_Unchecked_Type_Conversion, N_Type_Conversion)
+      elsif Nkind (Arg) in N_Unchecked_Type_Conversion | N_Type_Conversion
         and then not Is_Class_Wide_Type (Atyp)
       then
          Set_Subtype_Mark (Arg, New_Occurrence_Of (Ftyp, Sloc (Arg)));
@@ -4633,12 +4628,12 @@ package body Exp_Ch7 is
 
       function Is_Package_Or_Subprogram (Id : Entity_Id) return Boolean is
       begin
-         return Ekind_In (Id, E_Entry,
-                              E_Entry_Family,
-                              E_Function,
-                              E_Package,
-                              E_Procedure,
-                              E_Subprogram_Body);
+         return Ekind (Id) in E_Entry
+                            | E_Entry_Family
+                            | E_Function
+                            | E_Package
+                            | E_Procedure
+                            | E_Subprogram_Body;
       end Is_Package_Or_Subprogram;
 
       --  Local variables
@@ -4711,11 +4706,12 @@ package body Exp_Ch7 is
    ----------------------------
 
    procedure Expand_Cleanup_Actions (N : Node_Id) is
-      pragma Assert (Nkind_In (N, N_Block_Statement,
-                                  N_Entry_Body,
-                                  N_Extended_Return_Statement,
-                                  N_Subprogram_Body,
-                                  N_Task_Body));
+      pragma Assert
+        (Nkind (N) in N_Block_Statement
+                    | N_Entry_Body
+                    | N_Extended_Return_Statement
+                    | N_Subprogram_Body
+                    | N_Task_Body);
 
       Scop : constant Entity_Id := Current_Scope;
 
@@ -5305,9 +5301,8 @@ package body Exp_Ch7 is
                --  of the alternative.
 
                if Nkind (Parent (Curr)) = N_Entry_Call_Alternative
-                 and then Nkind_In (Parent (Parent (Curr)),
-                                    N_Conditional_Entry_Call,
-                                    N_Timed_Entry_Call)
+                 and then Nkind (Parent (Parent (Curr))) in
+                            N_Conditional_Entry_Call | N_Timed_Entry_Call
                then
                   return Parent (Parent (Curr));
 
@@ -5648,7 +5643,7 @@ package body Exp_Ch7 is
                --      <or>
                --    Hook := Obj_Id'Unrestricted_Access;
 
-               if Ekind_In (Obj_Id, E_Constant, E_Variable)
+               if Ekind (Obj_Id) in E_Constant | E_Variable
                  and then Present (Last_Aggregate_Assignment (Obj_Id))
                then
                   Hook_Insert := Last_Aggregate_Assignment (Obj_Id);
@@ -9012,10 +9007,9 @@ package body Exp_Ch7 is
          Par : Node_Id := Parent (N);
 
       begin
-         while not (Nkind_In (Par, N_Handled_Sequence_Of_Statements,
-                                   N_Loop_Statement,
-                                   N_Package_Specification)
-                      or else Nkind (Par) in N_Proper_Body)
+         while Nkind (Par) not in
+           N_Handled_Sequence_Of_Statements | N_Loop_Statement |
+           N_Package_Specification          | N_Proper_Body
          loop
             pragma Assert (Present (Par));
             Par := Parent (Par);
@@ -9102,12 +9096,12 @@ package body Exp_Ch7 is
             --  Prevent the search from going too far because transient blocks
             --  are bounded by packages and subprogram scopes.
 
-            elsif Ekind_In (Scop, E_Entry,
-                                  E_Entry_Family,
-                                  E_Function,
-                                  E_Package,
-                                  E_Procedure,
-                                  E_Subprogram_Body)
+            elsif Ekind (Scop) in E_Entry
+                                | E_Entry_Family
+                                | E_Function
+                                | E_Package
+                                | E_Procedure
+                                | E_Subprogram_Body
             then
                exit;
             end if;
@@ -9398,7 +9392,7 @@ package body Exp_Ch7 is
          Manage_SS =>
            Uses_Sec_Stack (Curr_S)
              and then Nkind (N) = N_Object_Declaration
-             and then Ekind_In (Encl_S, E_Package, E_Package_Body)
+             and then Ekind (Encl_S) in E_Package | E_Package_Body
              and then Is_Library_Level_Entity (Encl_S));
       Pop_Scope;
 
index 4498be5c817d491c414f96f371cdb3e9f1bb34cb..630d62f459e775a02a383a0d46393743f07c5ef6 100644 (file)
@@ -125,7 +125,7 @@ package body Exp_Ch8 is
          if Modify_Tree_For_C then
             return True;
 
-         elsif Nkind_In (Nam, N_Indexed_Component, N_Slice) then
+         elsif Nkind (Nam) in N_Indexed_Component | N_Slice then
             if Is_Packed (Etype (Prefix (Nam))) then
                return True;
 
index 26de2c32b2783ad90117937c16907e1c508f9279..9cf90d1c0c185573564ce6cd64dff7216df9b1fe 100644 (file)
@@ -1248,9 +1248,8 @@ package body Exp_Ch9 is
                      --  and the environment task is our effective master,
                      --  so nothing to mark.
 
-                     if Nkind_In (Par, N_Block_Statement,
-                                       N_Subprogram_Body,
-                                       N_Task_Body)
+                     if Nkind (Par) in
+                          N_Block_Statement | N_Subprogram_Body | N_Task_Body
                      then
                         Set_Is_Task_Master (Par);
                         exit;
@@ -1460,8 +1459,8 @@ package body Exp_Ch9 is
 
          Prag := Pre_Post_Conditions (Items);
          while Present (Prag) loop
-            if Nam_In (Pragma_Name_Unmapped (Prag),
-                       Name_Postcondition, Name_Precondition)
+            if Pragma_Name_Unmapped (Prag) in Name_Postcondition
+                                            | Name_Precondition
               and then Is_Checked (Prag)
             then
                Has_Pragma := True;
@@ -3185,10 +3184,8 @@ package body Exp_Ch9 is
                  and then ((Nkind (N) = N_Simple_Return_Statement
                              and then N /= Last (Stmts))
                             or else Nkind (N) = N_Extended_Return_Statement
-                            or else (Nkind_In (N, N_Raise_Constraint_Error,
-                                                  N_Raise_Program_Error,
-                                                  N_Raise_Statement,
-                                                  N_Raise_Storage_Error)
+                            or else (Nkind (N) in
+                                       N_Raise_xxx_Error | N_Raise_Statement
                                       and then Comes_From_Source (N)))
                then
                   Wrap_Statement (N);
@@ -3537,9 +3534,8 @@ package body Exp_Ch9 is
       while Present (Context)
         and then Nkind (Context) /= N_Compilation_Unit
       loop
-         if Nkind_In (Context, N_Block_Statement,
-                               N_Subprogram_Body,
-                               N_Task_Body)
+         if Nkind (Context) in
+              N_Block_Statement | N_Subprogram_Body | N_Task_Body
          then
             Set_Is_Task_Master (Context);
             exit;
@@ -3595,15 +3591,15 @@ package body Exp_Ch9 is
                if Nkind (Context) = N_Discriminant_Specification then
                   Ctx := Parent (Ctx);
                else
-                  while Nkind_In (Ctx, N_Component_Declaration,
-                                       N_Component_List)
+                  while Nkind (Ctx) in
+                          N_Component_Declaration | N_Component_List
                   loop
                      Ctx := Parent (Ctx);
                   end loop;
                end if;
 
-               if Nkind_In (Ctx, N_Private_Type_Declaration,
-                                 N_Private_Extension_Declaration)
+               if Nkind (Ctx) in N_Private_Type_Declaration
+                               | N_Private_Extension_Declaration
                then
                   Context := Parent (Full_View (Defining_Identifier (Ctx)));
                end if;
@@ -5575,7 +5571,7 @@ package body Exp_Ch9 is
          --    _object : prot_typVP := prot_typV (_O);
          --    subtype Jnn is <Type of Index> range Low .. High;
 
-         if Nkind_In (Decl, N_Full_Type_Declaration, N_Object_Declaration) then
+         if Nkind (Decl) in N_Full_Type_Declaration | N_Object_Declaration then
             Set_Debug_Info_Needed (Defining_Identifier (Decl));
 
          --  Declaration for the Protection object, discriminals, privals, and
@@ -6188,7 +6184,7 @@ package body Exp_Ch9 is
          if Is_Static_Expression (N) then
             return True;
          elsif Ada_Version >= Ada_2020
-           and then Nkind_In (N, N_Selected_Component, N_Indexed_Component)
+           and then Nkind (N) in N_Selected_Component | N_Indexed_Component
            and then Statically_Names_Object (N)
          then
             --  Restriction relaxed in Ada2020 to allow statically named
@@ -7130,8 +7126,8 @@ package body Exp_Ch9 is
 
       if Nkind (Ecall) = N_Block_Statement then
          Ecall := First (Statements (Handled_Statement_Sequence (Ecall)));
-         while not Nkind_In (Ecall, N_Procedure_Call_Statement,
-                                    N_Entry_Call_Statement)
+         while Nkind (Ecall) not in
+                 N_Procedure_Call_Statement | N_Entry_Call_Statement
          loop
             Next (Ecall);
          end loop;
@@ -7144,9 +7140,8 @@ package body Exp_Ch9 is
          if Ada_Version >= Ada_2005
            and then
              (No (Original_Node (Ecall))
-               or else not Nkind_In (Original_Node (Ecall),
-                                     N_Delay_Relative_Statement,
-                                     N_Delay_Until_Statement))
+               or else Nkind (Original_Node (Ecall)) not in
+                         N_Delay_Relative_Statement | N_Delay_Until_Statement)
          then
             Extract_Dispatching_Call (Ecall, Call_Ent, Obj, Actuals, Formals);
 
@@ -10108,8 +10103,7 @@ package body Exp_Ch9 is
 
          Acc_Ent := N;
          while Present (Acc_Ent)
-           and then not Nkind_In (Acc_Ent, N_Accept_Statement,
-                                           N_Entry_Body)
+           and then Nkind (Acc_Ent) not in N_Accept_Statement | N_Entry_Body
          loop
             Acc_Ent := Parent (Acc_Ent);
          end loop;
@@ -12523,7 +12517,7 @@ package body Exp_Ch9 is
       begin
          Ent := First_Entity (Tasktyp);
          while Present (Ent) loop
-            if Ekind_In (Ent, E_Entry, E_Entry_Family) then
+            if Ekind (Ent) in E_Entry | E_Entry_Family then
                Build_Contract_Wrapper (Ent, N);
             end if;
 
@@ -12713,8 +12707,8 @@ package body Exp_Ch9 is
 
       if Nkind (E_Call) = N_Block_Statement then
          E_Call := First (Statements (Handled_Statement_Sequence (E_Call)));
-         while not Nkind_In (E_Call, N_Procedure_Call_Statement,
-                                     N_Entry_Call_Statement)
+         while Nkind (E_Call) not in
+                 N_Procedure_Call_Statement | N_Entry_Call_Statement
          loop
             Next (E_Call);
          end loop;
@@ -13417,12 +13411,12 @@ package body Exp_Ch9 is
 
       Context := Parent (N);
       while Present (Context) loop
-         if Nkind_In (Context, N_Entry_Body,
-                               N_Extended_Return_Statement,
-                               N_Package_Body,
-                               N_Package_Declaration,
-                               N_Subprogram_Body,
-                               N_Task_Body)
+         if Nkind (Context) in N_Entry_Body
+                             | N_Extended_Return_Statement
+                             | N_Package_Body
+                             | N_Package_Declaration
+                             | N_Subprogram_Body
+                             | N_Task_Body
          then
             exit;
 
@@ -13551,7 +13545,7 @@ package body Exp_Ch9 is
    begin
       First_Op := First (D);
       while Present (First_Op)
-        and then not Nkind_In (First_Op, N_Subprogram_Body, N_Entry_Body)
+        and then Nkind (First_Op) not in N_Subprogram_Body | N_Entry_Body
       loop
          Next (First_Op);
       end loop;
@@ -14029,8 +14023,8 @@ package body Exp_Ch9 is
       --  of this type should have been removed during semantic analysis.
 
       Pdec := Parent (Ptyp);
-      while not Nkind_In (Pdec, N_Protected_Type_Declaration,
-                                N_Single_Protected_Declaration)
+      while Nkind (Pdec) not in
+              N_Protected_Type_Declaration | N_Single_Protected_Declaration
       loop
          Next (Pdec);
       end loop;
@@ -14461,8 +14455,8 @@ package body Exp_Ch9 is
       --  this type should have been removed during semantic analysis.
 
       Tdec := Parent (Ttyp);
-      while not Nkind_In (Tdec, N_Task_Type_Declaration,
-                                N_Single_Task_Declaration)
+      while Nkind (Tdec) not in
+              N_Task_Type_Declaration | N_Single_Task_Declaration
       loop
          Next (Tdec);
       end loop;
@@ -14811,8 +14805,8 @@ package body Exp_Ch9 is
 
       Next_Op := Next (N);
       while Present (Next_Op)
-        and then not Nkind_In (Next_Op,
-           N_Subprogram_Body, N_Entry_Body, N_Expression_Function)
+        and then Nkind (Next_Op) not in
+                   N_Subprogram_Body | N_Entry_Body | N_Expression_Function
       loop
          Next (Next_Op);
       end loop;
@@ -14830,14 +14824,13 @@ package body Exp_Ch9 is
    begin
       Stmt := First (Stats);
       while Nkind (Stmt) /= N_Empty
-        and then (Nkind_In (Stmt, N_Null_Statement, N_Label)
+        and then (Nkind (Stmt) in N_Null_Statement | N_Label
                    or else
                      (Nkind (Stmt) = N_Pragma
                        and then
-                         Nam_In (Pragma_Name_Unmapped (Stmt),
-                                 Name_Unreferenced,
-                                 Name_Unmodified,
-                                 Name_Warnings)))
+                         Pragma_Name_Unmapped (Stmt) in Name_Unreferenced
+                                                      | Name_Unmodified
+                                                      | Name_Warnings))
       loop
          Next (Stmt);
       end loop;
index fb79cb5804bf6451d51cbd51acc00105a9beadeb..b973fb68ad319f9a451aeda9798888dd66561263 100644 (file)
@@ -424,7 +424,7 @@ package body Exp_Dbug is
                   --  anyway, so the renaming entity will be available in
                   --  debuggers.
 
-                  exit when not Ekind_In (Sel_Id, E_Component, E_Discriminant);
+                  exit when Ekind (Sel_Id) not in E_Component | E_Discriminant;
 
                   First_Bit := Normalized_First_Bit (Sel_Id);
                   Enable :=
@@ -839,11 +839,11 @@ package body Exp_Dbug is
 
       --  Case of interface name being used
 
-      if Ekind_In (E, E_Constant,
-                      E_Exception,
-                      E_Function,
-                      E_Procedure,
-                      E_Variable)
+      if Ekind (E) in E_Constant
+                    | E_Exception
+                    | E_Function
+                    | E_Procedure
+                    | E_Variable
         and then Present (Interface_Name (E))
         and then No (Address_Clause (E))
         and then not Has_Suffix
@@ -874,7 +874,7 @@ package body Exp_Dbug is
          if Is_Generic_Instance (E)
            and then Is_Subprogram (E)
            and then not Is_Compilation_Unit (Scope (E))
-           and then Ekind_In (Scope (E), E_Package, E_Package_Body)
+           and then Ekind (Scope (E)) in E_Package | E_Package_Body
            and then Present (Related_Instance (Scope (E)))
          then
             E := Related_Instance (Scope (E));
index 89f206ed09ff2653ad4611b21497fc3951dca15f..1a41d794bfd1c5e25f8adba5dcbfb09a19a1de90 100644 (file)
@@ -389,8 +389,8 @@ package body Exp_Disp is
             --  Handle full type declarations and derivations of library level
             --  tagged types
 
-            elsif Nkind_In (D, N_Full_Type_Declaration,
-                               N_Derived_Type_Definition)
+            elsif Nkind (D) in
+                    N_Full_Type_Declaration | N_Derived_Type_Definition
               and then Is_Library_Level_Tagged_Type (Defining_Entity (D))
               and then Ekind (Defining_Entity (D)) /= E_Record_Subtype
               and then not Is_Private_Type (Defining_Entity (D))
@@ -1223,9 +1223,8 @@ package body Exp_Disp is
          --  the corresponding object or parameter declaration
 
          elsif Nkind (Controlling_Tag) = N_Identifier
-           and then Nkind_In (Parent (Entity (Controlling_Tag)),
-                              N_Object_Declaration,
-                              N_Parameter_Specification)
+           and then Nkind (Parent (Entity (Controlling_Tag))) in
+                      N_Object_Declaration | N_Parameter_Specification
          then
             Set_SCIL_Controlling_Tag (SCIL_Node,
               Parent (Entity (Controlling_Tag)));
@@ -1235,9 +1234,8 @@ package body Exp_Disp is
 
          elsif Nkind (Controlling_Tag) = N_Explicit_Dereference
             and then Nkind (Prefix (Controlling_Tag)) = N_Identifier
-            and then Nkind_In (Parent (Entity (Prefix (Controlling_Tag))),
-                               N_Object_Declaration,
-                               N_Parameter_Specification)
+            and then Nkind (Parent (Entity (Prefix (Controlling_Tag)))) in
+                       N_Object_Declaration | N_Parameter_Specification
          then
             Set_SCIL_Controlling_Tag (SCIL_Node,
               Parent (Entity (Prefix (Controlling_Tag))));
@@ -8562,7 +8560,7 @@ package body Exp_Disp is
 
       --  Propagate the value to the wrapped subprogram (if one is present)
 
-      if Ekind_In (Prim, E_Function, E_Procedure)
+      if Ekind (Prim) in E_Function | E_Procedure
         and then Is_Primitive_Wrapper (Prim)
         and then Present (Wrapped_Entity (Prim))
         and then Is_Dispatching_Operation (Wrapped_Entity (Prim))
@@ -8595,7 +8593,7 @@ package body Exp_Disp is
 
       --  Propagate the value to the wrapped subprogram (if one is present)
 
-      if Ekind_In (Prim, E_Function, E_Procedure)
+      if Ekind (Prim) in E_Function | E_Procedure
         and then Is_Primitive_Wrapper (Prim)
         and then Present (Wrapped_Entity (Prim))
         and then Is_Dispatching_Operation (Wrapped_Entity (Prim))
@@ -8732,7 +8730,7 @@ package body Exp_Disp is
             --  If the DTC_Entity attribute is already set we can also output
             --  the name of the interface covered by this primitive (if any).
 
-            if Ekind_In (Alias (Prim), E_Function, E_Procedure)
+            if Ekind (Alias (Prim)) in E_Function | E_Procedure
               and then Present (DTC_Entity (Alias (Prim)))
               and then Is_Interface (Scope (DTC_Entity (Alias (Prim))))
             then
index 12dcbae5fe8d191f3372822de054c855d976c31c..04ad92bd51d16e3a79560f5b8d68e439fef416c5 100644 (file)
@@ -138,7 +138,7 @@ package body Exp_Intr is
                Ent : Entity_Id := Current_Scope;
             begin
                while Present (Ent) loop
-                  exit when not Ekind_In (Ent, E_Block, E_Loop);
+                  exit when Ekind (Ent) not in E_Block | E_Loop;
                   Ent := Scope (Ent);
                end loop;
 
@@ -627,9 +627,9 @@ package body Exp_Intr is
       elsif Nam = Name_Generic_Dispatching_Constructor then
          Expand_Dispatching_Constructor_Call (N);
 
-      elsif Nam_In (Nam, Name_Import_Address,
-                         Name_Import_Largest_Value,
-                         Name_Import_Value)
+      elsif Nam in Name_Import_Address
+                 | Name_Import_Largest_Value
+                 | Name_Import_Value
       then
          Expand_Import_Call (N);
 
@@ -663,19 +663,19 @@ package body Exp_Intr is
       elsif Nam = Name_To_Pointer then
          Expand_To_Pointer (N);
 
-      elsif Nam_In (Nam, Name_File,
-                         Name_Line,
-                         Name_Source_Location,
-                         Name_Enclosing_Entity,
-                         Name_Compilation_ISO_Date,
-                         Name_Compilation_Date,
-                         Name_Compilation_Time)
+      elsif Nam in Name_File
+                 | Name_Line
+                 | Name_Source_Location
+                 | Name_Enclosing_Entity
+                 | Name_Compilation_ISO_Date
+                 | Name_Compilation_Date
+                 | Name_Compilation_Time
       then
          Expand_Source_Info (N, Nam);
 
-         --  If we have a renaming, expand the call to the original operation,
-         --  which must itself be intrinsic, since renaming requires matching
-         --  conventions and this has already been checked.
+      --  If we have a renaming, expand the call to the original operation,
+      --  which must itself be intrinsic, since renaming requires matching
+      --  conventions and this has already been checked.
 
       elsif Present (Alias (E)) then
          Expand_Intrinsic_Call (N, Alias (E));
@@ -683,10 +683,10 @@ package body Exp_Intr is
       elsif Nkind (N) in N_Binary_Op then
          Expand_Binary_Operator_Call (N);
 
-         --  The only other case is where an external name was specified, since
-         --  this is the only way that an otherwise unrecognized name could
-         --  escape the checking in Sem_Prag. Nothing needs to be done in such
-         --  a case, since we pass such a call to the back end unchanged.
+      --  The only other case is where an external name was specified, since
+      --  this is the only way that an otherwise unrecognized name could
+      --  escape the checking in Sem_Prag. Nothing needs to be done in such
+      --  a case, since we pass such a call to the back end unchanged.
 
       else
          null;
index 6d5cf62af0748d995d349d7a444aa70e533a6595..b95bd327ae20b88c48cbaae82d55b298f66b0892 100644 (file)
@@ -469,7 +469,7 @@ package body Exp_Pakd is
         or else
            (Nkind (Aexp) = N_Indexed_Component
              and then Is_Entity_Name (Prefix (Aexp)))
-        or else Nkind_In (Aexp, N_Explicit_Dereference, N_Function_Call)
+        or else Nkind (Aexp) in N_Explicit_Dereference | N_Function_Call
       then
          Set_Analyzed (Aexp);
       end if;
index bfedae5c376e5bf257faf03ac7f74f57e3033cdf..81e4330cef1fa7bc89491b5f26aa1a27519035d5 100644 (file)
@@ -520,7 +520,7 @@ package body Exp_Prag is
                --  that the failure is not at the point of occurrence of the
                --  pragma, unlike the other Check cases.
 
-               elsif Nam_In (Nam, Name_Precondition, Name_Postcondition) then
+               elsif Nam in Name_Precondition | Name_Postcondition then
                   Get_Name_String (Nam);
                   Insert_Str_In_Name_Buffer ("failed ", 1);
                   Add_Str_To_Name_Buffer (" from ");
index 9bcf522e891815ad3e93b5bce7b20ca28ed57ee5..80b49a70cce7bd3360f23ac7c64e665d1d8ead44 100644 (file)
@@ -645,8 +645,8 @@ package body Exp_Put_Image is
             --  with no components there is no need to handle it.
 
             while Present (Item) loop
-               if Nkind_In (Item, N_Component_Declaration,
-                                  N_Discriminant_Specification)
+               if Nkind (Item) in
+                    N_Component_Declaration | N_Discriminant_Specification
                  and then
                    ((Chars (Defining_Identifier (Item)) = Name_uParent
                        and then not Is_Interface
index adce44a6ae431f72f75aa90dc978fa5ab1b9b590..fa4aeb6a03818618c8b96ab1cafe0f0fbc7d4e5b 100644 (file)
@@ -372,7 +372,7 @@ package body Exp_Smem is
          return False;
 
       else
-         if Ekind_In (Formal, E_Out_Parameter, E_In_Out_Parameter) then
+         if Ekind (Formal) in E_Out_Parameter | E_In_Out_Parameter then
             Insert_Node := Call;
             return True;
          else
@@ -477,7 +477,7 @@ package body Exp_Smem is
             return False;
          end if;
 
-      elsif Nkind_In (P, N_Indexed_Component, N_Selected_Component)
+      elsif Nkind (P) in N_Indexed_Component | N_Selected_Component
         and then N = Prefix (P)
       then
          return On_Lhs_Of_Assignment (P);
index fc2338f8b0274f540e735998f26780bc7705fd04..b640843c2c3f5bb00559142901f3e977ca259b68 100644 (file)
@@ -291,12 +291,12 @@ package body Exp_Tss is
                   then
                      exit;
 
-                  elsif Ekind_In (Etype (E1),
-                          E_Anonymous_Access_Subprogram_Type,
-                          E_Anonymous_Access_Protected_Subprogram_Type)
-                    and then Ekind_In (Etype (E2),
-                               E_Anonymous_Access_Subprogram_Type,
-                               E_Anonymous_Access_Protected_Subprogram_Type)
+                  elsif Ekind (Etype (E1)) in
+                          E_Anonymous_Access_Subprogram_Type |
+                          E_Anonymous_Access_Protected_Subprogram_Type
+                    and then Ekind (Etype (E2)) in
+                               E_Anonymous_Access_Subprogram_Type |
+                               E_Anonymous_Access_Protected_Subprogram_Type
                     and then not Conforming_Types
                                    (Etype (E1), Etype (E2), Fully_Conformant)
                   then
index e530a94f32e5e499d1eee221b8a7d0bff2b7a4b3..29fe2e59061afb39b0ade6133da9b53e093a59b0 100644 (file)
@@ -546,8 +546,8 @@ package body Exp_Unst is
 
                   --  Attribute or indexed component case
 
-                  elsif Nkind_In (N, N_Attribute_Reference,
-                                     N_Indexed_Component)
+                  elsif Nkind (N) in
+                          N_Attribute_Reference | N_Indexed_Component
                   then
                      Note_Uplevel_Bound (Prefix (N), Ref);
 
@@ -601,8 +601,8 @@ package body Exp_Unst is
 
                   --  Explicit dereference and selected component case
 
-                  elsif Nkind_In (N, N_Explicit_Dereference,
-                                     N_Selected_Component)
+                  elsif Nkind (N) in
+                          N_Explicit_Dereference | N_Selected_Component
                   then
                      Note_Uplevel_Bound (Prefix (N), Ref);
 
@@ -786,7 +786,7 @@ package body Exp_Unst is
                then
                   return;
 
-               elsif Ekind_In (Callee, E_Entry, E_Entry_Family) then
+               elsif Ekind (Callee) in E_Entry | E_Entry_Family then
                   return;
                end if;
 
@@ -1271,9 +1271,9 @@ package body Exp_Unst is
                         --  references to global declarations.
 
                        and then
-                         (Ekind_In (Ent, E_Constant,
-                                         E_Loop_Parameter,
-                                         E_Variable)
+                         (Ekind (Ent) in E_Constant
+                                       | E_Loop_Parameter
+                                       | E_Variable
 
                            --  Formals are interesting, but not if being used
                            --  as mere names of parameters for name notation
@@ -2131,9 +2131,9 @@ package body Exp_Unst is
                                  --  N_Loop_Parameter_Specification or to
                                  --  an N_Iterator_Specification.
 
-                                 if Nkind_In
-                                      (Ins, N_Iterator_Specification,
-                                            N_Loop_Parameter_Specification)
+                                 if Nkind (Ins) in
+                                      N_Iterator_Specification |
+                                      N_Loop_Parameter_Specification
                                  then
                                     --  Quantified expression are rewritten as
                                     --  loops during expansion.
@@ -2366,9 +2366,8 @@ package body Exp_Unst is
                --  processing this dereference
 
                if Opt.Modify_Tree_For_C
-                 and then Nkind_In (Parent (UPJ.Ref),
-                            N_Type_Conversion,
-                            N_Unchecked_Type_Conversion)
+                 and then Nkind (Parent (UPJ.Ref)) in
+                            N_Type_Conversion | N_Unchecked_Type_Conversion
                then
                   Force_Evaluation (UPJ.Ref, Mode => Strict);
                end if;
@@ -2554,7 +2553,7 @@ package body Exp_Unst is
 
       function Search_Subprograms (N : Node_Id) return Traverse_Result is
       begin
-         if Nkind_In (N, N_Subprogram_Body, N_Subprogram_Body_Stub) then
+         if Nkind (N) in N_Subprogram_Body | N_Subprogram_Body_Stub then
             declare
                Spec_Id : constant Entity_Id := Unique_Defining_Entity (N);
 
index 0bbab9cd74e063e1493a190ee1c93eb1e301a408..0f8505f1ad7527342ee518206d07e3bfbf900e43 100644 (file)
@@ -5064,7 +5064,7 @@ package body Exp_Util is
    -----------------------------------------
 
    procedure Expand_Static_Predicates_In_Choices (N : Node_Id) is
-      pragma Assert (Nkind_In (N, N_Case_Statement_Alternative, N_Variant));
+      pragma Assert (Nkind (N) in N_Case_Statement_Alternative | N_Variant);
 
       Choices : constant List_Id := Discrete_Choices (N);
 
@@ -5842,7 +5842,7 @@ package body Exp_Util is
    begin
       S := Scop;
       while Present (S) loop
-         if Ekind_In (S, E_Entry, E_Entry_Family, E_Function, E_Procedure)
+         if Ekind (S) in E_Entry | E_Entry_Family | E_Function | E_Procedure
            and then Present (Protection_Object (S))
          then
             return Protection_Object (S);
@@ -5920,8 +5920,8 @@ package body Exp_Util is
          Par := N;
          Top := N;
          while Present (Par) loop
-            if Nkind_In (Original_Node (Par), N_Case_Expression,
-                                              N_If_Expression)
+            if Nkind (Original_Node (Par)) in
+                 N_Case_Expression | N_If_Expression
             then
                Top := Par;
 
@@ -5942,13 +5942,13 @@ package body Exp_Util is
          Par := Top;
          while Present (Par) loop
             if Is_List_Member (Par)
-              and then not Nkind_In (Par, N_Component_Association,
-                                          N_Discriminant_Association,
-                                          N_Parameter_Association,
-                                          N_Pragma_Argument_Association)
-              and then not Nkind_In (Parent (Par), N_Function_Call,
-                                                   N_Procedure_Call_Statement,
-                                                   N_Entry_Call_Statement)
+              and then Nkind (Par) not in N_Component_Association
+                                        | N_Discriminant_Association
+                                        | N_Parameter_Association
+                                        | N_Pragma_Argument_Association
+              and then Nkind (Parent (Par)) not in N_Function_Call
+                                                 | N_Procedure_Call_Statement
+                                                 | N_Entry_Call_Statement
 
             then
                return Par;
@@ -5971,7 +5971,7 @@ package body Exp_Util is
             --  Keep climbing past various operators
 
             if Nkind (Parent (Par)) in N_Op
-              or else Nkind_In (Parent (Par), N_And_Then, N_Or_Else)
+              or else Nkind (Parent (Par)) in N_And_Then | N_Or_Else
             then
                Par := Parent (Par);
             else
@@ -6009,11 +6009,11 @@ package body Exp_Util is
 
          while Present (Par) loop
             if Par = Wrapped_Node
-              or else Nkind_In (Par, N_Assignment_Statement,
-                                     N_Object_Declaration,
-                                     N_Pragma,
-                                     N_Procedure_Call_Statement,
-                                     N_Simple_Return_Statement)
+              or else Nkind (Par) in N_Assignment_Statement
+                                   | N_Object_Declaration
+                                   | N_Pragma
+                                   | N_Procedure_Call_Statement
+                                   | N_Simple_Return_Statement
             then
                return Par;
 
@@ -6276,10 +6276,9 @@ package body Exp_Util is
             --  Deal with conversions, qualifications, and expressions with
             --  actions.
 
-            while Nkind_In (Cond,
-                    N_Type_Conversion,
-                    N_Qualified_Expression,
-                    N_Expression_With_Actions)
+            while Nkind (Cond) in N_Type_Conversion
+                                | N_Qualified_Expression
+                                | N_Expression_With_Actions
             loop
                Cond := Expression (Cond);
             end loop;
@@ -6289,7 +6288,7 @@ package body Exp_Util is
 
          --  Deal with AND THEN and AND cases
 
-         if Nkind_In (Cond, N_And_Then, N_Op_And) then
+         if Nkind (Cond) in N_And_Then | N_Op_And then
 
             --  Don't ever try to invert a condition that is of the form of an
             --  AND or AND THEN (since we are not doing sufficiently general
@@ -6365,10 +6364,9 @@ package body Exp_Util is
 
             return;
 
-         elsif Nkind_In (Cond,
-                 N_Type_Conversion,
-                 N_Qualified_Expression,
-                 N_Expression_With_Actions)
+         elsif Nkind (Cond) in N_Type_Conversion
+                             | N_Qualified_Expression
+                             | N_Expression_With_Actions
          then
             Cond := Expression (Cond);
 
@@ -7265,7 +7263,7 @@ package body Exp_Util is
                --  actions should be inserted outside the complete record
                --  declaration.
 
-               elsif Nkind_In (Parent (P), N_Variant, N_Record_Definition) then
+               elsif Nkind (Parent (P)) in N_Variant | N_Record_Definition then
                   null;
 
                --  Do not insert freeze nodes within the loop generated for
@@ -7653,8 +7651,8 @@ package body Exp_Util is
          P := Parent (P);
 
          if Is_List_Member (P) then
-            exit when Nkind_In (Parent (P), N_Package_Specification,
-                                            N_Subprogram_Body);
+            exit when Nkind (Parent (P)) in
+                        N_Package_Specification | N_Subprogram_Body;
 
             --  Special handling for handled sequence of statements, we must
             --  insert in the statements not the exception handlers!
@@ -7874,8 +7872,8 @@ package body Exp_Util is
             if Nkind (Result) = N_Explicit_Dereference then
                Result := Prefix (Result);
 
-            elsif Nkind_In (Result, N_Type_Conversion,
-                                    N_Unchecked_Type_Conversion)
+            elsif Nkind (Result) in
+                    N_Type_Conversion | N_Unchecked_Type_Conversion
             then
                Result := Expression (Result);
 
@@ -8125,7 +8123,7 @@ package body Exp_Util is
 
                if Nkind (N) = N_Identifier
                  and then Present (Entity (N))
-                 and then Ekind_In (Entity (N), E_Constant, E_Variable)
+                 and then Ekind (Entity (N)) in E_Constant | E_Variable
                then
                   Ren_Obj := Entity (N);
                   return Abandon;
@@ -8332,7 +8330,7 @@ package body Exp_Util is
       end if;
 
       return
-        Ekind_In (Obj_Id, E_Constant, E_Variable)
+        Ekind (Obj_Id) in E_Constant | E_Variable
           and then Needs_Finalization (Desig)
           and then Requires_Transient_Scope (Desig)
           and then Nkind (Rel_Node) /= N_Simple_Return_Statement
@@ -8758,7 +8756,7 @@ package body Exp_Util is
          return Is_Ref_To_Bit_Packed_Array (Renamed_Object (Entity (N)));
       end if;
 
-      if Nkind_In (N, N_Indexed_Component, N_Selected_Component) then
+      if Nkind (N) in N_Indexed_Component | N_Selected_Component then
          if Is_Bit_Packed_Array (Etype (Prefix (N))) then
             Result := True;
          else
@@ -8800,7 +8798,7 @@ package body Exp_Util is
       then
          return True;
 
-      elsif Nkind_In (N, N_Indexed_Component, N_Selected_Component) then
+      elsif Nkind (N) in N_Indexed_Component | N_Selected_Component then
          return Is_Ref_To_Bit_Packed_Slice (Prefix (N));
 
       else
@@ -8818,7 +8816,7 @@ package body Exp_Util is
    begin
       if Kind = N_Object_Renaming_Declaration then
          return True;
-      elsif Nkind_In (Kind, N_Indexed_Component, N_Selected_Component) then
+      elsif Kind in N_Indexed_Component | N_Selected_Component then
          return Is_Renamed_Object (Pnod);
       else
          return False;
@@ -8976,7 +8974,7 @@ package body Exp_Util is
 
       --  True if volatile component
 
-      elsif Nkind_In (N, N_Indexed_Component, N_Selected_Component) then
+      elsif Nkind (N) in N_Indexed_Component | N_Selected_Component then
          if (Is_Entity_Name (Prefix (N))
               and then Has_Volatile_Components (Entity (Prefix (N))))
            or else (Present (Etype (Prefix (N)))
@@ -11005,7 +11003,7 @@ package body Exp_Util is
          =>
             --  Check the "then statements" for elsif parts and if statements
 
-            if Nkind_In (N, N_Elsif_Part, N_If_Statement)
+            if Nkind (N) in N_Elsif_Part | N_If_Statement
               and then not Is_Empty_List (Then_Statements (N))
               and then not Are_Wrapped (Then_Statements (N))
               and then Requires_Cleanup_Actions
@@ -11022,9 +11020,8 @@ package body Exp_Util is
             --  Check the "else statements" for conditional entry calls, if
             --  statements and selective accepts.
 
-            if Nkind_In (N, N_Conditional_Entry_Call,
-                            N_If_Statement,
-                            N_Selective_Accept)
+            if Nkind (N) in
+                 N_Conditional_Entry_Call | N_If_Statement | N_Selective_Accept
               and then not Is_Empty_List (Else_Statements (N))
               and then not Are_Wrapped (Else_Statements (N))
               and then Requires_Cleanup_Actions
@@ -11556,7 +11553,7 @@ package body Exp_Util is
          --  by the expression it renames, which would defeat the purpose of
          --  removing the side effect.
 
-         if Nkind_In (Exp, N_Selected_Component, N_Indexed_Component)
+         if Nkind (Exp) in N_Selected_Component | N_Indexed_Component
            and then Has_Non_Standard_Rep (Etype (Prefix (Exp)))
          then
             null;
@@ -11983,8 +11980,8 @@ package body Exp_Util is
                --  and view swaps, the parent type is taken from the formal
                --  parameter of the subprogram being called.
 
-               if Nkind_In (Context, N_Function_Call,
-                                     N_Procedure_Call_Statement)
+               if Nkind (Context) in
+                    N_Function_Call | N_Procedure_Call_Statement
                  and then No (Type_Map.Get (Entity (Name (Context))))
                then
                   New_Ref :=
@@ -12150,9 +12147,8 @@ package body Exp_Util is
       Lib_Level : Boolean) return Boolean
    is
       At_Lib_Level : constant Boolean :=
-                       Lib_Level
-                         and then Nkind_In (N, N_Package_Body,
-                                               N_Package_Specification);
+        Lib_Level
+          and then Nkind (N) in N_Package_Body | N_Package_Specification;
       --  N is at the library level if the top-most context is a package and
       --  the path taken to reach N does not include nonpackage constructs.
 
@@ -12529,8 +12525,8 @@ package body Exp_Util is
 
       if (Nkind (Pexp) = N_Assignment_Statement
            and then Expression (Pexp) = Exp)
-        or else Nkind_In (Pexp, N_Object_Declaration,
-                                N_Object_Renaming_Declaration)
+        or else Nkind (Pexp)
+                  in N_Object_Declaration | N_Object_Renaming_Declaration
       then
          return True;
 
@@ -12786,10 +12782,9 @@ package body Exp_Util is
                Set_Entity_Current_Value (Right_Opnd (Cond));
             end if;
 
-         elsif Nkind_In (Cond,
-                 N_Type_Conversion,
-                 N_Qualified_Expression,
-                 N_Expression_With_Actions)
+         elsif Nkind (Cond) in N_Type_Conversion
+                             | N_Qualified_Expression
+                             | N_Expression_With_Actions
          then
             Set_Expression_Current_Value (Expression (Cond));
 
@@ -12862,7 +12857,7 @@ package body Exp_Util is
             if Nkind (N) = N_Subprogram_Body
               and then Address_Taken (Spec_Id)
               and then
-                Ekind_In (Scope (Spec_Id), E_Block, E_Procedure, E_Function)
+                Ekind (Scope (Spec_Id)) in E_Block | E_Procedure | E_Function
             then
                declare
                   Loc   : constant Source_Ptr := Sloc (N);
@@ -13086,7 +13081,7 @@ package body Exp_Util is
          elsif Is_Entity_Name (N) then
             return Ekind (Entity (N)) = E_In_Parameter;
 
-         elsif Nkind_In (N, N_Indexed_Component, N_Selected_Component) then
+         elsif Nkind (N) in N_Indexed_Component | N_Selected_Component then
             return Within_In_Parameter (Prefix (N));
 
          else
@@ -13167,9 +13162,7 @@ package body Exp_Util is
             --  explicit dereference, then the designated object could
             --  be modified by an assignment.
 
-            if Nkind_In (RO, N_Indexed_Component,
-                             N_Explicit_Dereference)
-            then
+            if Nkind (RO) in N_Indexed_Component | N_Explicit_Dereference then
                return False;
 
             --  A selected component must have a safe prefix
@@ -13698,8 +13691,7 @@ package body Exp_Util is
 
       Par := Parent (N);
       while Present (Par) loop
-         if Nkind_In (Original_Node (Par), N_Case_Expression,
-                                           N_If_Expression)
+         if Nkind (Original_Node (Par)) in N_Case_Expression | N_If_Expression
          then
             return True;
 
index ff5418856ec49807dc83cac0099d596ac28942ff..1c177b1702be7bd5342ae131760d71b5ac02fcd0 100644 (file)
@@ -283,11 +283,11 @@ package body Freeze is
 
         and then
           (Present (Interface_Name (Renamed_Subp))
-            or else Nam_In (Chars (Renamed_Subp), Name_Rotate_Left,
-                                                  Name_Rotate_Right,
-                                                  Name_Shift_Left,
-                                                  Name_Shift_Right,
-                                                  Name_Shift_Right_Arithmetic))
+            or else Chars (Renamed_Subp) in Name_Rotate_Left
+                                          | Name_Rotate_Right
+                                          | Name_Shift_Left
+                                          | Name_Shift_Right
+                                          | Name_Shift_Right_Arithmetic)
       then
          Set_Interface_Name (Ent, Interface_Name (Renamed_Subp));
 
@@ -412,7 +412,7 @@ package body Freeze is
       --  as we need to check other conditions for creating a body to inline
       --  in that case, which are controlled in Analyze_Subprogram_Body_Helper.
 
-      if Ekind_In (Old_S, E_Function, E_Procedure)
+      if Ekind (Old_S) in E_Function | E_Procedure
         and then Nkind (Decl) = N_Subprogram_Declaration
         and then not Is_Generic_Instance (Old_S)
         and then not GNATprove_Mode
@@ -1894,8 +1894,8 @@ package body Freeze is
                end if;
 
             elsif Ekind (E) in Task_Kind
-              and then Nkind_In (Parent (E), N_Single_Task_Declaration,
-                                             N_Task_Type_Declaration)
+              and then Nkind (Parent (E)) in
+                         N_Single_Task_Declaration | N_Task_Type_Declaration
             then
                Push_Scope (E);
                Freeze_All (First_Entity (E), After);
@@ -1986,15 +1986,15 @@ package body Freeze is
                   --  current package, but this body does not freeze incomplete
                   --  types that may be declared in this private part.
 
-                  if (Nkind_In (Bod, N_Entry_Body,
-                                     N_Package_Body,
-                                     N_Protected_Body,
-                                     N_Subprogram_Body,
-                                     N_Task_Body)
-                        or else Nkind (Bod) in N_Body_Stub)
+                  if Comes_From_Source (Bod)
+                    and then Nkind (Bod) in N_Entry_Body
+                                          | N_Package_Body
+                                          | N_Protected_Body
+                                          | N_Subprogram_Body
+                                          | N_Task_Body
+                                          | N_Body_Stub
                     and then
                       List_Containing (After) = List_Containing (Parent (E))
-                    and then Comes_From_Source (Bod)
                   then
                      Error_Msg_Sloc := Sloc (Next (After));
                      Error_Msg_NE
@@ -2373,8 +2373,7 @@ package body Freeze is
          begin
             case Nkind (N) is
                when N_Attribute_Reference =>
-                  if Nam_In (Attribute_Name (N), Name_Access,
-                                                 Name_Unchecked_Access)
+                  if Attribute_Name (N) in Name_Access | Name_Unchecked_Access
                     and then Is_Entity_Name (Prefix (N))
                     and then Is_Type (Entity (Prefix (N)))
                     and then Entity (Prefix (N)) = E
@@ -4140,7 +4139,7 @@ package body Freeze is
 
             --  Handle the component and discriminant case
 
-            if Ekind_In (Comp, E_Component, E_Discriminant) then
+            if Ekind (Comp) in E_Component | E_Discriminant then
                declare
                   CC : constant Node_Id := Component_Clause (Comp);
 
@@ -5203,7 +5202,7 @@ package body Freeze is
             --  case, both the body and imported function utilize the same
             --  type.
 
-            if Ekind_In (E, E_Function, E_Generic_Function) then
+            if Ekind (E) in E_Function | E_Generic_Function then
                Stmt :=
                  Make_Simple_Return_Statement (Loc,
                    Expression =>
@@ -5573,10 +5572,9 @@ package body Freeze is
 
                begin
                   while Present (Prag) loop
-                     if Nam_In (Pragma_Name_Unmapped (Prag),
-                                Name_Post,
-                                Name_Postcondition,
-                                Name_Refined_Post)
+                     if Pragma_Name_Unmapped (Prag) in Name_Post
+                                                     | Name_Postcondition
+                                                     | Name_Refined_Post
                      then
                         Exp :=
                           Expression
@@ -5673,7 +5671,7 @@ package body Freeze is
 
             --  Remaining step is to layout objects
 
-            if Ekind_In (E, E_Variable, E_Constant, E_Loop_Parameter)
+            if Ekind (E) in E_Variable | E_Constant | E_Loop_Parameter
               or else Is_Formal (E)
             then
                Layout_Object (E);
@@ -5684,7 +5682,7 @@ package body Freeze is
             --  statement, move them back now directly within the enclosing
             --  statement sequence.
 
-            if Ekind_In (E, E_Constant, E_Variable)
+            if Ekind (E) in E_Constant | E_Variable
               and then not Has_Delayed_Freeze (E)
             then
                Explode_Initialization_Compound_Statement (E);
@@ -6045,7 +6043,7 @@ package body Freeze is
          --  for the case of a private type with record extension (we will do
          --  that later when the full type is frozen).
 
-         elsif Ekind_In (E, E_Record_Type, E_Record_Subtype) then
+         elsif Ekind (E) in E_Record_Type | E_Record_Subtype then
             if not In_Generic_Scope (E) then
                Freeze_Record_Type (E);
             end if;
@@ -6625,9 +6623,9 @@ package body Freeze is
 
                   begin
                      pragma Assert
-                       (Nam_In (Op_Name, Name_Allocate,
-                                         Name_Deallocate,
-                                         Name_Storage_Size));
+                       (Op_Name in Name_Allocate
+                                 | Name_Deallocate
+                                 | Name_Storage_Size);
 
                      Error_Msg_Name_1 := Op_Name;
 
@@ -6639,7 +6637,7 @@ package body Freeze is
 
                      Op := Get_Name_Entity_Id (Op_Name);
                      while Present (Op) loop
-                        if Ekind_In (Op, E_Function, E_Procedure)
+                        if Ekind (Op) in E_Function | E_Procedure
                           and then Scope (Op) = Current_Scope
                         then
                            Formal := First_Entity (Op);
@@ -6770,7 +6768,7 @@ package body Freeze is
             Check_Strict_Alignment (E);
          end if;
 
-         if Ekind_In (E, E_Record_Type, E_Record_Subtype) then
+         if Ekind (E) in E_Record_Type | E_Record_Subtype then
             declare
                RC : constant Node_Id := Get_Record_Representation_Clause (E);
             begin
@@ -7499,7 +7497,7 @@ package body Freeze is
 
                   --  The case we are looking for is an enumeration literal
 
-                  if Nkind_In (N, N_Identifier, N_Character_Literal)
+                  if Nkind (N) in N_Identifier | N_Character_Literal
                     and then Is_Enumeration_Type (Etype (N))
                   then
                      --  If enumeration literal appears directly as the choice,
@@ -7874,8 +7872,8 @@ package body Freeze is
 
          function Clone_Id (Node : Node_Id) return Traverse_Result is
          begin
-            if Nkind_In (Node, N_Iterator_Specification,
-                               N_Loop_Parameter_Specification)
+            if Nkind (Node) in
+                 N_Iterator_Specification | N_Loop_Parameter_Specification
             then
                Set_Defining_Identifier
                  (Node, New_Copy (Defining_Identifier (Node)));
@@ -7966,7 +7964,7 @@ package body Freeze is
 
             --  Check that the enclosing record type can be frozen
 
-            if Ekind_In (Entity (Node), E_Component, E_Discriminant) then
+            if Ekind (Entity (Node)) in E_Component | E_Discriminant then
                Check_And_Freeze_Type (Scope (Entity (Node)));
             end if;
 
@@ -8833,7 +8831,7 @@ package body Freeze is
 
          --  Check attribute Extra_Accessibility_Of_Result
 
-         if Ekind_In (E, E_Function, E_Subprogram_Type)
+         if Ekind (E) in E_Function | E_Subprogram_Type
            and then Needs_Result_Accessibility_Level (E)
            and then No (Extra_Accessibility_Of_Result (E))
          then
@@ -9234,11 +9232,11 @@ package body Freeze is
             --  directly.
 
             if Nkind (Dcopy) = N_Identifier
-              or else Nkind_In (Dcopy, N_Expanded_Name,
-                                       N_Integer_Literal,
-                                       N_Character_Literal,
-                                       N_String_Literal,
-                                       N_Real_Literal)
+              or else Nkind (Dcopy) in N_Expanded_Name
+                                     | N_Integer_Literal
+                                     | N_Character_Literal
+                                     | N_String_Literal
+                                     | N_Real_Literal
               or else (Nkind (Dcopy) = N_Attribute_Reference
                         and then Attribute_Name (Dcopy) = Name_Null_Parameter)
               or else Known_Null (Dcopy)
index 7f3cb66e6f6571623a10ff2d4902cd349bde4be0..54d52baf2720d2ce0aef7af2eb46f246ba0dd1bc 100644 (file)
@@ -370,12 +370,12 @@ package body Ghost is
                --  treated as Ghost when they contain a reference to a Ghost
                --  entity (SPARK RM 6.9(11)).
 
-               elsif Nam_In (Prag_Nam, Name_Global,
-                                       Name_Depends,
-                                       Name_Initializes,
-                                       Name_Refined_Global,
-                                       Name_Refined_Depends,
-                                       Name_Refined_State)
+               elsif Prag_Nam in Name_Global
+                               | Name_Depends
+                               | Name_Initializes
+                               | Name_Refined_Global
+                               | Name_Refined_Depends
+                               | Name_Refined_State
                then
                   return True;
                end if;
@@ -1124,15 +1124,14 @@ package body Ghost is
       --  When the context is a [generic] package declaration, pragma Ghost
       --  resides in the visible declarations.
 
-      if Nkind_In (N, N_Generic_Package_Declaration,
-                      N_Package_Declaration)
+      if Nkind (N) in N_Generic_Package_Declaration | N_Package_Declaration
       then
          Decl := First (Visible_Declarations (Specification (N)));
 
       --  When the context is a package or a subprogram body, pragma Ghost
       --  resides in the declarative part.
 
-      elsif Nkind_In (N, N_Package_Body, N_Subprogram_Body) then
+      elsif Nkind (N) in N_Package_Body | N_Subprogram_Body then
          Decl := First (Declarations (N));
 
       --  Otherwise pragma Ghost appears in the declarations following N
@@ -1363,15 +1362,15 @@ package body Ghost is
       --  A child package or subprogram declaration becomes Ghost when its
       --  parent is Ghost (SPARK RM 6.9(2)).
 
-      elsif Nkind_In (N, N_Generic_Function_Renaming_Declaration,
-                         N_Generic_Package_Declaration,
-                         N_Generic_Package_Renaming_Declaration,
-                         N_Generic_Procedure_Renaming_Declaration,
-                         N_Generic_Subprogram_Declaration,
-                         N_Package_Declaration,
-                         N_Package_Renaming_Declaration,
-                         N_Subprogram_Declaration,
-                         N_Subprogram_Renaming_Declaration)
+      elsif Nkind (N) in N_Generic_Function_Renaming_Declaration
+                       | N_Generic_Package_Declaration
+                       | N_Generic_Package_Renaming_Declaration
+                       | N_Generic_Procedure_Renaming_Declaration
+                       | N_Generic_Subprogram_Declaration
+                       | N_Package_Declaration
+                       | N_Package_Renaming_Declaration
+                       | N_Subprogram_Declaration
+                       | N_Subprogram_Renaming_Declaration
         and then Present (Parent_Spec (N))
       then
          Par_Id := Defining_Entity (Unit (Parent_Spec (N)));
@@ -1569,14 +1568,14 @@ package body Ghost is
       --  ??? could extra formal parameters cause a Ghost leak?
 
       if Mark_Formals
-        and then Nkind_In (N, N_Abstract_Subprogram_Declaration,
-                              N_Formal_Abstract_Subprogram_Declaration,
-                              N_Formal_Concrete_Subprogram_Declaration,
-                              N_Generic_Subprogram_Declaration,
-                              N_Subprogram_Body,
-                              N_Subprogram_Body_Stub,
-                              N_Subprogram_Declaration,
-                              N_Subprogram_Renaming_Declaration)
+        and then Nkind (N) in N_Abstract_Subprogram_Declaration
+                            | N_Formal_Abstract_Subprogram_Declaration
+                            | N_Formal_Concrete_Subprogram_Declaration
+                            | N_Generic_Subprogram_Declaration
+                            | N_Subprogram_Body
+                            | N_Subprogram_Body_Stub
+                            | N_Subprogram_Declaration
+                            | N_Subprogram_Renaming_Declaration
       then
          Param := First (Parameter_Specifications (Specification (N)));
          while Present (Param) loop
@@ -1659,7 +1658,7 @@ package body Ghost is
       --      subject to any Ghost annotation.
 
       else
-         pragma Assert (Nam_In (Mode, Name_Disable, Name_None, No_Name));
+         pragma Assert (Mode in Name_Disable | Name_None | No_Name);
          return None;
       end if;
    end Name_To_Ghost_Mode;
@@ -1678,20 +1677,20 @@ package body Ghost is
       if Is_Body (N)
         or else Is_Declaration (N)
         or else Nkind (N) in N_Generic_Instantiation
-        or else Nkind (N) in N_Push_Pop_xxx_Label
-        or else Nkind (N) in N_Raise_xxx_Error
-        or else Nkind (N) in N_Representation_Clause
-        or else Nkind (N) in N_Statement_Other_Than_Procedure_Call
-        or else Nkind_In (N, N_Call_Marker,
-                             N_Freeze_Entity,
-                             N_Freeze_Generic_Entity,
-                             N_Itype_Reference,
-                             N_Pragma,
-                             N_Procedure_Call_Statement,
-                             N_Use_Package_Clause,
-                             N_Use_Type_Clause,
-                             N_Variable_Reference_Marker,
-                             N_With_Clause)
+                           | N_Push_Pop_xxx_Label
+                           | N_Raise_xxx_Error
+                           | N_Representation_Clause
+                           | N_Statement_Other_Than_Procedure_Call
+                           | N_Call_Marker
+                           | N_Freeze_Entity
+                           | N_Freeze_Generic_Entity
+                           | N_Itype_Reference
+                           | N_Pragma
+                           | N_Procedure_Call_Statement
+                           | N_Use_Package_Clause
+                           | N_Use_Type_Clause
+                           | N_Variable_Reference_Marker
+                           | N_With_Clause
       then
          --  Only ignored Ghost nodes must be recorded in the table
 
@@ -1815,7 +1814,7 @@ package body Ghost is
       --  The Ghost mode of a [generic] freeze node depends on the Ghost mode
       --  of the entity being frozen.
 
-      elsif Nkind_In (N, N_Freeze_Entity, N_Freeze_Generic_Entity) then
+      elsif Nkind (N) in N_Freeze_Entity | N_Freeze_Generic_Entity then
          Set_Ghost_Mode_From_Entity (Entity (N));
 
       --  The Ghost mode of a pragma depends on the associated entity. The
index 365ddd0f669bad4e04f7ab95e4d667d23154fe1d..a9f48ce997e9f4db848b81c75e0074a9bf3046e7 100644 (file)
@@ -1346,8 +1346,7 @@ begin
       --  We can generate code for a package declaration or a subprogram
       --  declaration only if it does not required a body.
 
-      elsif Nkind_In (Main_Unit_Kind, N_Package_Declaration,
-                                      N_Subprogram_Declaration)
+      elsif Main_Unit_Kind in N_Package_Declaration | N_Subprogram_Declaration
         and then
           (not Body_Required (Main_Unit_Node)
              or else Distribution_Stub_Mode = Generate_Caller_Stub_Body)
@@ -1357,8 +1356,8 @@ begin
       --  We can generate code for a generic package declaration of a generic
       --  subprogram declaration only if does not require a body.
 
-      elsif Nkind_In (Main_Unit_Kind, N_Generic_Package_Declaration,
-                                      N_Generic_Subprogram_Declaration)
+      elsif Main_Unit_Kind in
+              N_Generic_Package_Declaration | N_Generic_Subprogram_Declaration
         and then not Body_Required (Main_Unit_Node)
       then
          Back_End_Mode := Generate_Object;
@@ -1366,8 +1365,8 @@ begin
       --  Compilation units that are renamings do not require bodies, so we can
       --  generate code for them.
 
-      elsif Nkind_In (Main_Unit_Kind, N_Package_Renaming_Declaration,
-                                      N_Subprogram_Renaming_Declaration)
+      elsif Main_Unit_Kind in N_Package_Renaming_Declaration |
+                              N_Subprogram_Renaming_Declaration
       then
          Back_End_Mode := Generate_Object;
 
index b08634e78e09f9eae0aad02648946ed93389b219..7293cf24b11da343d7eb0355ef9d5488736de7ef 100644 (file)
@@ -2793,9 +2793,9 @@ package body Inline is
          else
             Decl := Unit_Declaration_Node (Scop);
 
-            if Nkind_In (Decl, N_Subprogram_Declaration,
-                               N_Task_Type_Declaration,
-                               N_Subprogram_Body_Stub)
+            if Nkind (Decl) in N_Subprogram_Declaration
+                             | N_Task_Type_Declaration
+                             | N_Subprogram_Body_Stub
             then
                Decl := Unit_Declaration_Node (Corresponding_Body (Decl));
             end if;
@@ -2968,9 +2968,8 @@ package body Inline is
                and then not GNATprove_Mode)
 
            or else
-             (Nkind_In (A, N_Real_Literal,
-                           N_Integer_Literal,
-                           N_Character_Literal)
+             (Nkind (A) in
+                N_Real_Literal | N_Integer_Literal | N_Character_Literal
                and then not Address_Taken (F))
          then
             if Etype (F) /= Etype (A) then
@@ -3378,10 +3377,10 @@ package body Inline is
                --  and string literals, and attributes that yield a universal
                --  type, because those must be resolved to a specific type.
 
-               if Nkind_In (Expression (N), N_Aggregate,
-                                            N_Character_Literal,
-                                            N_Null,
-                                            N_String_Literal)
+               if Nkind (Expression (N)) in N_Aggregate
+                                          | N_Character_Literal
+                                          | N_Null
+                                          | N_String_Literal
                  or else Yields_Universal_Type (Expression (N))
                then
                   Ret :=
@@ -4234,7 +4233,7 @@ package body Inline is
          then
             Conv := Current_Entity (Id);
 
-         elsif Nkind_In (Id, N_Selected_Component, N_Expanded_Name)
+         elsif Nkind (Id) in N_Selected_Component | N_Expanded_Name
            and then Chars (Selector_Name (Id)) = Name_Unchecked_Conversion
          then
             Conv := Current_Entity (Selector_Name (Id));
@@ -4366,13 +4365,13 @@ package body Inline is
 
       S := First (Stats);
       while Present (S) loop
-         if Nkind_In (S, N_Abort_Statement,
-                         N_Asynchronous_Select,
-                         N_Conditional_Entry_Call,
-                         N_Delay_Relative_Statement,
-                         N_Delay_Until_Statement,
-                         N_Selective_Accept,
-                         N_Timed_Entry_Call)
+         if Nkind (S) in N_Abort_Statement
+                       | N_Asynchronous_Select
+                       | N_Conditional_Entry_Call
+                       | N_Delay_Relative_Statement
+                       | N_Delay_Until_Statement
+                       | N_Selective_Accept
+                       | N_Timed_Entry_Call
          then
             Cannot_Inline
               ("cannot inline & (non-allowed statement)?", S, Subp);
@@ -5112,18 +5111,18 @@ package body Inline is
             end if;
 
             if Present (Item_Id)
-              and then Nam_In (Chars (Item_Id), Name_Contract_Cases,
-                                                Name_Global,
-                                                Name_Depends,
-                                                Name_Postcondition,
-                                                Name_Precondition,
-                                                Name_Refined_Global,
-                                                Name_Refined_Depends,
-                                                Name_Refined_Post,
-                                                Name_Test_Case,
-                                                Name_Unmodified,
-                                                Name_Unreferenced,
-                                                Name_Unused)
+              and then Chars (Item_Id) in Name_Contract_Cases
+                                        | Name_Global
+                                        | Name_Depends
+                                        | Name_Postcondition
+                                        | Name_Precondition
+                                        | Name_Refined_Global
+                                        | Name_Refined_Depends
+                                        | Name_Refined_Post
+                                        | Name_Test_Case
+                                        | Name_Unmodified
+                                        | Name_Unreferenced
+                                        | Name_Unused
             then
                Remove (Item);
             end if;
index 57c434bf9f961cc5329c71a327eb822847d23237..6fbcdceba69e8b1069273ef282685e094148c49a 100644 (file)
@@ -562,7 +562,7 @@ package body Lib.Writ is
          Write_Info_Str (" O");
          Write_Info_Char (OA_Setting (Unit_Num));
 
-         if Ekind_In (Uent, E_Package, E_Package_Body)
+         if Ekind (Uent) in E_Package | E_Package_Body
            and then Present (Finalizer (Uent))
          then
             Write_Info_Str (" PF");
@@ -1220,8 +1220,8 @@ package body Lib.Writ is
             if Nkind (U) = N_Subprogram_Body
               and then Present (Corresponding_Spec (U))
               and then
-                Ekind_In (Corresponding_Spec (U), E_Generic_Procedure,
-                                                  E_Generic_Function)
+                Ekind (Corresponding_Spec (U)) in E_Generic_Procedure
+                                                | E_Generic_Function
             then
                null;
 
index ea5f88f90395fbb8d1a3bb3a9e569d76dbf136d2..269d8eea18f228d15489993c55a67b1bce8d17f8 100644 (file)
@@ -181,11 +181,11 @@ package body SPARK_Specific is
       --  If N is the defining identifier for a subprogram, then return the
       --  enclosing subprogram or package, not this subprogram.
 
-      if Nkind_In (N, N_Defining_Identifier, N_Defining_Operator_Symbol)
-        and then (Ekind (N) in Entry_Kind
-                   or else Ekind (N) = E_Subprogram_Body
-                   or else Ekind (N) in Generic_Subprogram_Kind
-                   or else Ekind (N) in Subprogram_Kind)
+      if Nkind (N) in N_Defining_Identifier | N_Defining_Operator_Symbol
+        and then Ekind (N) in Entry_Kind
+                            | E_Subprogram_Body
+                            | Generic_Subprogram_Kind
+                            | Subprogram_Kind
       then
          Context := Parent (Unit_Declaration_Node (N));
 
index 2c313ea7bd40f7e614ef791896a362e76fa42cf9..ac59ccc094f6ee3c7eb11f4c65c80077ff73e623 100644 (file)
@@ -569,10 +569,9 @@ package body Lib.Xref is
                P := Parent (P);
 
                if Nkind (P) = N_Pragma then
-                  if Nam_In (Pragma_Name_Unmapped (P),
-                             Name_Warnings,
-                             Name_Unmodified,
-                             Name_Unreferenced)
+                  if Pragma_Name_Unmapped (P) in Name_Warnings
+                                               | Name_Unmodified
+                                               | Name_Unreferenced
                   then
                      return False;
                   end if;
@@ -911,7 +910,7 @@ package body Lib.Xref is
             --  since the attribute acts as an anonymous alias of the function
             --  result and not as a real reference to the function.
 
-            elsif Ekind_In (E, E_Function, E_Generic_Function)
+            elsif Ekind (E) in E_Function | E_Generic_Function
               and then Is_Entity_Name (N)
               and then Is_Attribute_Result (Parent (N))
             then
@@ -1006,18 +1005,18 @@ package body Lib.Xref is
 
         and then Typ /= ' '
       then
-         if Nkind_In (N, N_Identifier,
-                         N_Defining_Identifier,
-                         N_Defining_Operator_Symbol,
-                         N_Operator_Symbol,
-                         N_Defining_Character_Literal)
-           or else Nkind (N) in N_Op
+         if Nkind (N) in N_Identifier
+                       | N_Defining_Identifier
+                       | N_Defining_Operator_Symbol
+                       | N_Operator_Symbol
+                       | N_Defining_Character_Literal
+                       | N_Op
            or else (Nkind (N) = N_Character_Literal
                      and then Sloc (Entity (N)) /= Standard_Location)
          then
             Nod := N;
 
-         elsif Nkind_In (N, N_Expanded_Name, N_Selected_Component) then
+         elsif Nkind (N) in N_Expanded_Name | N_Selected_Component then
             Nod := Selector_Name (N);
 
          else
@@ -1135,7 +1134,7 @@ package body Lib.Xref is
             --  reads/writes of private protected components) and not worth the
             --  effort.
 
-            if Ekind_In (Ent, E_Abstract_State, E_Constant, E_Variable)
+            if Ekind (Ent) in E_Abstract_State | E_Constant | E_Variable
               and then Present (Encapsulating_State (Ent))
               and then Is_Single_Concurrent_Object (Encapsulating_State (Ent))
             then
@@ -2314,15 +2313,15 @@ package body Lib.Xref is
                   --  Special handling for access parameters and objects and
                   --  components of an anonymous access type.
 
-                  if Ekind_In (Etype (XE.Key.Ent),
-                               E_Anonymous_Access_Type,
-                               E_Anonymous_Access_Subprogram_Type,
-                               E_Anonymous_Access_Protected_Subprogram_Type)
+                  if Ekind (Etype (XE.Key.Ent)) in
+                               E_Anonymous_Access_Type
+                             | E_Anonymous_Access_Subprogram_Type
+                             | E_Anonymous_Access_Protected_Subprogram_Type
                   then
                      if Is_Formal (XE.Key.Ent)
                        or else
-                         Ekind_In
-                           (XE.Key.Ent, E_Variable, E_Constant, E_Component)
+                         Ekind (XE.Key.Ent) in
+                           E_Variable | E_Constant | E_Component
                      then
                         Ctyp := 'p';
                      end if;
index 6cc05bb40aadd8c1060a3356cb26c6856e5d993c..e39e0b927d2cf5e78aa45b0d93571adeb2516439 100644 (file)
@@ -1265,230 +1265,6 @@ package body Namet is
       return Name_Find (Buf);
    end Name_Find;
 
-   -------------
-   -- Nam_In --
-   -------------
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id;
-      V7 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id;
-      V7 : Name_Id;
-      V8 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8;
-   end Nam_In;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id;
-      V7 : Name_Id;
-      V8 : Name_Id;
-      V9 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8 or else
-             T = V9;
-   end Nam_In;
-
-   function Nam_In
-     (T   : Name_Id;
-      V1  : Name_Id;
-      V2  : Name_Id;
-      V3  : Name_Id;
-      V4  : Name_Id;
-      V5  : Name_Id;
-      V6  : Name_Id;
-      V7  : Name_Id;
-      V8  : Name_Id;
-      V9  : Name_Id;
-      V10 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8 or else
-             T = V9 or else
-             T = V10;
-   end Nam_In;
-
-   function Nam_In
-     (T   : Name_Id;
-      V1  : Name_Id;
-      V2  : Name_Id;
-      V3  : Name_Id;
-      V4  : Name_Id;
-      V5  : Name_Id;
-      V6  : Name_Id;
-      V7  : Name_Id;
-      V8  : Name_Id;
-      V9  : Name_Id;
-      V10 : Name_Id;
-      V11 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1  or else
-             T = V2  or else
-             T = V3  or else
-             T = V4  or else
-             T = V5  or else
-             T = V6  or else
-             T = V7  or else
-             T = V8  or else
-             T = V9  or else
-             T = V10 or else
-             T = V11;
-   end Nam_In;
-
-   function Nam_In
-     (T   : Name_Id;
-      V1  : Name_Id;
-      V2  : Name_Id;
-      V3  : Name_Id;
-      V4  : Name_Id;
-      V5  : Name_Id;
-      V6  : Name_Id;
-      V7  : Name_Id;
-      V8  : Name_Id;
-      V9  : Name_Id;
-      V10 : Name_Id;
-      V11 : Name_Id;
-      V12 : Name_Id) return Boolean
-   is
-   begin
-      return T = V1  or else
-             T = V2  or else
-             T = V3  or else
-             T = V4  or else
-             T = V5  or else
-             T = V6  or else
-             T = V7  or else
-             T = V8  or else
-             T = V9  or else
-             T = V10 or else
-             T = V11 or else
-             T = V12;
-   end Nam_In;
-
    -----------------
    -- Name_Equals --
    -----------------
index 670cdc9e2b6961840dc9de86ea00f84aa2ff8c63..ce7cac1affb171a496c6a035fcb06a5f19d11dfb 100644 (file)
@@ -207,130 +207,6 @@ package Namet is
    pragma Inline (Present);
    --  Determine whether name Nam exists
 
-   ------------------------------
-   -- Name_Id Membership Tests --
-   ------------------------------
-
-   --  The following functions allow a convenient notation for testing whether
-   --  a Name_Id value matches any one of a list of possible values. In each
-   --  case True is returned if the given T argument is equal to any of the V
-   --  arguments. These essentially duplicate the Ada 2012 membership tests,
-   --  but we cannot use the latter (yet) in the compiler front end, because
-   --  of bootstrap considerations
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id;
-      V7 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id;
-      V7 : Name_Id;
-      V8 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T  : Name_Id;
-      V1 : Name_Id;
-      V2 : Name_Id;
-      V3 : Name_Id;
-      V4 : Name_Id;
-      V5 : Name_Id;
-      V6 : Name_Id;
-      V7 : Name_Id;
-      V8 : Name_Id;
-      V9 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T   : Name_Id;
-      V1  : Name_Id;
-      V2  : Name_Id;
-      V3  : Name_Id;
-      V4  : Name_Id;
-      V5  : Name_Id;
-      V6  : Name_Id;
-      V7  : Name_Id;
-      V8  : Name_Id;
-      V9  : Name_Id;
-      V10 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T   : Name_Id;
-      V1  : Name_Id;
-      V2  : Name_Id;
-      V3  : Name_Id;
-      V4  : Name_Id;
-      V5  : Name_Id;
-      V6  : Name_Id;
-      V7  : Name_Id;
-      V8  : Name_Id;
-      V9  : Name_Id;
-      V10 : Name_Id;
-      V11 : Name_Id) return Boolean;
-
-   function Nam_In
-     (T   : Name_Id;
-      V1  : Name_Id;
-      V2  : Name_Id;
-      V3  : Name_Id;
-      V4  : Name_Id;
-      V5  : Name_Id;
-      V6  : Name_Id;
-      V7  : Name_Id;
-      V8  : Name_Id;
-      V9  : Name_Id;
-      V10 : Name_Id;
-      V11 : Name_Id;
-      V12 : Name_Id) return Boolean;
-
-   pragma Inline (Nam_In);
-   --  Inline all above functions
-
    -----------------
    -- Subprograms --
    -----------------
index 874d144bf23bb12e12de7ec9ac8f0408aa1aa331..29eec045caa046180cb32bfbdbcbce06f2117acd 100644 (file)
@@ -991,7 +991,7 @@ package body Nlists is
       N := Node;
       loop
          Next (N);
-         exit when not Nkind_In (N, N_Pragma, N_Null_Statement);
+         exit when Nkind (N) not in N_Pragma | N_Null_Statement;
       end loop;
 
       return N;
index f8b3f3392071c21daf1ab36526c07a827f4cda86..e4298e88f4bc611ec59a23cf04b3bedf8750eded 100644 (file)
@@ -511,7 +511,7 @@ package body Ch10 is
 
       --  Another error from which it is hard to recover
 
-      if Nkind_In (Unit_Node, N_Subprogram_Body_Stub, N_Package_Body_Stub) then
+      if Nkind (Unit_Node) in N_Subprogram_Body_Stub | N_Package_Body_Stub then
          Cunit_Error_Flag := True;
          return Error;
       end if;
@@ -527,10 +527,10 @@ package body Ch10 is
             Unit_Node := Specification (Unit_Node);
          end if;
 
-         if Nkind_In (Unit_Node, N_Package_Declaration,
-                                 N_Subprogram_Declaration,
-                                 N_Subprogram_Body,
-                                 N_Subprogram_Renaming_Declaration)
+         if Nkind (Unit_Node) in N_Package_Declaration
+                               | N_Subprogram_Declaration
+                               | N_Subprogram_Body
+                               | N_Subprogram_Renaming_Declaration
          then
             Unit_Node := Specification (Unit_Node);
 
@@ -541,27 +541,26 @@ package body Ch10 is
             end if;
          end if;
 
-         if Nkind_In (Unit_Node, N_Task_Body,
-                                 N_Protected_Body,
-                                 N_Task_Type_Declaration,
-                                 N_Protected_Type_Declaration,
-                                 N_Single_Task_Declaration,
-                                 N_Single_Protected_Declaration)
+         if Nkind (Unit_Node) in N_Task_Body
+                               | N_Protected_Body
+                               | N_Task_Type_Declaration
+                               | N_Protected_Type_Declaration
+                               | N_Single_Task_Declaration
+                               | N_Single_Protected_Declaration
          then
             Name_Node := Defining_Identifier (Unit_Node);
 
-         elsif Nkind_In (Unit_Node, N_Function_Instantiation,
-                                    N_Function_Specification,
-                                    N_Generic_Function_Renaming_Declaration,
-                                    N_Generic_Package_Renaming_Declaration,
-                                    N_Generic_Procedure_Renaming_Declaration)
-          or else
-               Nkind_In (Unit_Node, N_Package_Body,
-                                    N_Package_Instantiation,
-                                    N_Package_Renaming_Declaration,
-                                    N_Package_Specification,
-                                    N_Procedure_Instantiation,
-                                    N_Procedure_Specification)
+         elsif Nkind (Unit_Node) in N_Function_Instantiation
+                                  | N_Function_Specification
+                                  | N_Generic_Function_Renaming_Declaration
+                                  | N_Generic_Package_Renaming_Declaration
+                                  | N_Generic_Procedure_Renaming_Declaration
+          or else Nkind (Unit_Node) in N_Package_Body
+                                  | N_Package_Instantiation
+                                  | N_Package_Renaming_Declaration
+                                  | N_Package_Specification
+                                  | N_Procedure_Instantiation
+                                  | N_Procedure_Specification
          then
             Name_Node := Defining_Unit_Name (Unit_Node);
 
index 6bdd5d95fec070d6ea73028df4fa17aaed64ff61..78febbf0446dd9ceab36518b60425777a6d95f77 100644 (file)
@@ -324,8 +324,7 @@ package body Ch2 is
               (Identifier_Seen   => Identifier_Seen,
                Association       => Assoc_Node,
                Reserved_Words_OK =>
-                 Nam_In (Prag_Name, Name_Restriction_Warnings,
-                                    Name_Restrictions));
+                 Prag_Name in Name_Restriction_Warnings | Name_Restrictions);
 
             if Arg_Count = 2 and then Import_Check_Required then
                --  Here is where we cancel the SIS active status if this pragma
@@ -444,7 +443,7 @@ package body Ch2 is
          P := P_Pragma;
 
          if Nkind (P) /= N_Error
-           and then Nam_In (Pragma_Name_Unmapped (P), Name_Assert, Name_Debug)
+           and then Pragma_Name_Unmapped (P) in Name_Assert | Name_Debug
          then
             Error_Msg_Name_1 := Pragma_Name_Unmapped (P);
             Error_Msg_N
index d224cc51c02a51ec967c299df9d1e81632b4058c..adaa3e2a8265d0af5ee62ad4a6a9db5131fcaf56 100644 (file)
@@ -123,11 +123,12 @@ package body Ch3 is
 
    procedure Check_Restricted_Expression (N : Node_Id) is
    begin
-      if Nkind_In (N, N_Op_And, N_Op_Or, N_Op_Xor, N_And_Then, N_Or_Else) then
+      if Nkind (N) in N_Op_And | N_Op_Or | N_Op_Xor | N_And_Then | N_Or_Else
+      then
          Check_Restricted_Expression (Left_Opnd (N));
          Check_Restricted_Expression (Right_Opnd (N));
 
-      elsif Nkind_In (N, N_In, N_Not_In)
+      elsif Nkind (N) in N_In | N_Not_In
         and then Paren_Count (N) = 0
       then
          Error_Msg_N ("|this expression must be parenthesized!", N);
@@ -4777,7 +4778,7 @@ package body Ch3 is
             --  Complete declaration of mangled subprogram body, for better
             --  recovery if analysis is attempted.
 
-            if Nkind_In (Decl, N_Subprogram_Body, N_Package_Body, N_Task_Body)
+            if Nkind (Decl) in N_Subprogram_Body | N_Package_Body | N_Task_Body
               and then No (Handled_Statement_Sequence (Decl))
             then
                Set_Handled_Statement_Sequence (Decl,
index 2c74cd7cd86c89459d9923b44779207142c9272e..9815ca1522a489051d59fda49aab879dd77350ea 100644 (file)
@@ -1907,7 +1907,7 @@ package body Ch4 is
                      Logop := P_Logical_Operator;
                      Restore_Scan_State (Scan_State); -- to comma/semicolon
 
-                     if Nkind_In (Logop, N_And_Then, N_Or_Else) then
+                     if Logop in N_And_Then | N_Or_Else then
                         Scan; -- past comma/semicolon
 
                         if Com then
index 49ecb938ef13d0fee0beda626901a65d8373583c..5b002c46f06394b51dfe3f76872ab3be9d4ebee2 100644 (file)
@@ -1307,9 +1307,9 @@ package body Ch5 is
 
       else
          if Style_Check and then Paren_Count (Cond) > 0 then
-            if not Nkind_In (Cond, N_If_Expression,
-                                   N_Case_Expression,
-                                   N_Quantified_Expression)
+            if Nkind (Cond) not in N_If_Expression
+                                 | N_Case_Expression
+                                 | N_Quantified_Expression
               or else Paren_Count (Cond) > 1
             then
                Style.Check_Xtra_Parens (First_Sloc (Cond));
index 0821e68dde1ac0c410136b5d1d945559267d936b..1ff79506b7b09a05c5fe77bb041758f460a14568 100644 (file)
@@ -883,9 +883,9 @@ package body Ch6 is
                      --  with syntactic parentheses.
 
                      if not (Paren_Count (Expr) /= 0
-                              or else Nkind_In (Expr, N_Aggregate,
-                                                      N_Extension_Aggregate,
-                                                      N_Quantified_Expression))
+                              or else Nkind (Expr) in N_Aggregate
+                                                    | N_Extension_Aggregate
+                                                    | N_Quantified_Expression)
                      then
                         Error_Msg
                           ("expression function must be enclosed in "
index 259d15fb0cbf505b31520bd5bd83fc021048b032..265f187206abb089c4660140411639de70e71767 100644 (file)
@@ -169,7 +169,7 @@ function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is
 
    begin
       if Nkind (Expression (Arg)) /= N_Identifier
-        or else not Nam_In (Chars (Argx), Name_On, Name_Off)
+        or else Chars (Argx) not in Name_On | Name_Off
       then
          Error_Msg_Name_2 := Name_On;
          Error_Msg_Name_3 := Name_Off;
index a7c64b87a0f86c71ec45d432b5d6c819253afe5d..1f26075f93e98fdda17767a8af7672a3cf2385d1 100644 (file)
@@ -181,7 +181,7 @@ package body Util is
       if Ada_Version = Ada_95
         and then Warn_On_Ada_2005_Compatibility
       then
-         if Nam_In (Token_Name, Name_Overriding, Name_Synchronized)
+         if Token_Name in Name_Overriding | Name_Synchronized
            or else (Token_Name = Name_Interface
                      and then Prev_Token /= Tok_Pragma)
          then
index ab5625ea837cee50556f36da9610f51b0b4d4740..157965323310e31c0d4e964db7dc12dad8a322eb 100644 (file)
@@ -459,9 +459,9 @@ package body Par_SCO is
 
    function Is_Logical_Operator (N : Node_Id) return Tristate is
    begin
-      if Nkind_In (N, N_And_Then, N_Op_Not, N_Or_Else) then
+      if Nkind (N) in N_And_Then | N_Op_Not | N_Or_Else then
          return True;
-      elsif Nkind_In (N, N_Op_And, N_Op_Or) then
+      elsif Nkind (N) in N_Op_And | N_Op_Or then
          return Unknown;
       else
          return False;
@@ -599,9 +599,9 @@ package body Par_SCO is
             else
                L := Left_Opnd (N);
 
-               if Nkind_In (N, N_Op_Or, N_Or_Else) then
+               if Nkind (N) in N_Op_Or | N_Or_Else then
                   C1 := '|';
-               else pragma Assert (Nkind_In (N, N_Op_And, N_And_Then));
+               else pragma Assert (Nkind (N) in N_Op_And | N_And_Then);
                   C1 := '&';
                end if;
             end if;
@@ -688,9 +688,9 @@ package body Par_SCO is
                --  Doesn't this requirement of using First_Sloc need to be
                --  documented in the spec ???
 
-               if Nkind_In (Parent (N), N_Accept_Alternative,
-                                        N_Delay_Alternative,
-                                        N_Terminate_Alternative)
+               if Nkind (Parent (N)) in N_Accept_Alternative
+                                      | N_Delay_Alternative
+                                      | N_Terminate_Alternative
                then
                   Loc := First_Sloc (N);
                else
index 6bd7573697c86cea31132fbd3b0f85e6452f70a0..c00962d0707a53c8874e034baab9bd0a89d0e282 100644 (file)
@@ -329,12 +329,10 @@ package body Pprint is
                                   (Constraint (Subtype_Indication (N)));
 
                               if List_Length (Ranges) = 1
-                                and then
-                                  Nkind_In
-                                    (First (Ranges),
-                                     N_Range,
-                                     N_Real_Range_Specification,
-                                     N_Signed_Integer_Type_Definition)
+                                and then Nkind (First (Ranges)) in
+                                           N_Range                          |
+                                           N_Real_Range_Specification       |
+                                           N_Signed_Integer_Type_Definition
                               then
                                  if Id = Attribute_First then
                                     return
@@ -765,8 +763,7 @@ package body Pprint is
                --  If argument does not already account for a closing
                --  parenthesis, count one here.
 
-               if not Nkind_In (Right, N_Aggregate,
-                                       N_Quantified_Expression)
+               if Nkind (Right) not in N_Aggregate | N_Quantified_Expression
                then
                   Append_Paren := Append_Paren + 1;
                end if;
index 1b6eb8a8abfddb0a52297804463ebe46f80711f9..dff327221a5ad8e462ddd0ad5d9e82bffd0c8ed4 100644 (file)
@@ -527,9 +527,9 @@ package body Repinfo is
 
                   List_Entities (E, Bytes_Big_Endian, True);
 
-               elsif Ekind_In (E, E_Entry,
-                                  E_Entry_Family,
-                                  E_Subprogram_Type)
+               elsif Ekind (E) in E_Entry
+                                | E_Entry_Family
+                                | E_Subprogram_Type
                then
                   if List_Representation_Info_Mechanisms then
                      List_Subprogram_Info (E);
@@ -558,9 +558,9 @@ package body Repinfo is
 
                --  Note that formals are not annotated so we skip them here
 
-               elsif Ekind_In (E, E_Constant,
-                                  E_Loop_Parameter,
-                                  E_Variable)
+               elsif Ekind (E) in E_Constant
+                                | E_Loop_Parameter
+                                | E_Variable
                then
                   if List_Representation_Info >= 2 then
                      List_Object_Info (E);
@@ -578,12 +578,12 @@ package body Repinfo is
 
                --  Recurse into bodies
 
-               elsif Ekind_In (E, E_Package_Body,
-                                  E_Protected_Body,
-                                  E_Protected_Type,
-                                  E_Subprogram_Body,
-                                  E_Task_Body,
-                                  E_Task_Type)
+               elsif Ekind (E) in E_Package_Body
+                                | E_Protected_Body
+                                | E_Protected_Type
+                                | E_Subprogram_Body
+                                | E_Task_Body
+                                | E_Task_Type
                then
                   List_Entities (E, Bytes_Big_Endian);
 
index 5ba2931cfd9190eb99e48ced12bad5ff30c89f93..c63c881dd527834b7a6c6fadde7b3d073cca5fd1 100644 (file)
@@ -237,7 +237,7 @@ package body Restrict is
 
       --  For type conversion, check converted expression
 
-      elsif Nkind_In (Obj, N_Unchecked_Type_Conversion, N_Type_Conversion) then
+      elsif Nkind (Obj) in N_Unchecked_Type_Conversion | N_Type_Conversion then
          Check_No_Implicit_Aliasing (Expression (Obj));
          return;
 
@@ -746,7 +746,7 @@ package body Restrict is
                            and then Chars (Scope (Ent)) = Name_Ada
                            and then Scope (Scope (Ent)) = Standard_Standard)
                then
-                  if Nkind_In (Expr, N_Identifier, N_Operator_Symbol)
+                  if Nkind (Expr) in N_Identifier | N_Operator_Symbol
                     and then Chars (Ent) = Chars (Expr)
                   then
                      Error_Msg_Node_1 := N;
@@ -763,7 +763,7 @@ package body Restrict is
 
                --  Here if at outer level of entity name in table
 
-               elsif Nkind_In (Expr, N_Identifier, N_Operator_Symbol) then
+               elsif Nkind (Expr) in N_Identifier | N_Operator_Symbol then
                   exit;
 
                --  Here if neither at the outer level
@@ -977,7 +977,7 @@ package body Restrict is
              and then
            OK_No_Use_Of_Entity_Name (Selector_Name (N));
 
-      elsif Nkind_In (N, N_Identifier, N_Operator_Symbol) then
+      elsif Nkind (N) in N_Identifier | N_Operator_Symbol then
          return True;
 
       else
@@ -1258,15 +1258,15 @@ package body Restrict is
 
    function Same_Entity (E1, E2 : Node_Id) return Boolean is
    begin
-      if Nkind_In (E1, N_Identifier, N_Operator_Symbol)
+      if Nkind (E1) in N_Identifier | N_Operator_Symbol
            and then
-         Nkind_In (E2, N_Identifier, N_Operator_Symbol)
+         Nkind (E2) in N_Identifier | N_Operator_Symbol
       then
          return Chars (E1) = Chars (E2);
 
-      elsif Nkind_In (E1, N_Selected_Component, N_Expanded_Name)
+      elsif Nkind (E1) in N_Selected_Component | N_Expanded_Name
               and then
-            Nkind_In (E2, N_Selected_Component, N_Expanded_Name)
+            Nkind (E2) in N_Selected_Component | N_Expanded_Name
       then
          return Same_Unit (Prefix (E1), Prefix (E2))
                   and then
@@ -1285,9 +1285,9 @@ package body Restrict is
       if Nkind (U1) = N_Identifier and then Nkind (U2) = N_Identifier then
          return Chars (U1) = Chars (U2);
 
-      elsif Nkind_In (U1, N_Selected_Component, N_Expanded_Name)
+      elsif Nkind (U1) in N_Selected_Component | N_Expanded_Name
               and then
-            Nkind_In (U2, N_Selected_Component, N_Expanded_Name)
+            Nkind (U2) in N_Selected_Component | N_Expanded_Name
       then
          return Same_Unit (Prefix (U1), Prefix (U2))
                   and then
@@ -1534,13 +1534,13 @@ package body Restrict is
 
       --  Now we need to find the direct name and set Boolean2 flag
 
-      if Nkind_In (Entity, N_Identifier, N_Operator_Symbol) then
+      if Nkind (Entity) in N_Identifier | N_Operator_Symbol then
          Nam := Entity;
 
       else
          pragma Assert (Nkind (Entity) = N_Selected_Component);
          Nam := Selector_Name (Entity);
-         pragma Assert (Nkind_In (Nam, N_Identifier, N_Operator_Symbol));
+         pragma Assert (Nkind (Nam) in N_Identifier | N_Operator_Symbol);
       end if;
 
       Set_Name_Table_Boolean2 (Chars (Nam), True);
index 5cf3b91ecb92b6a0c873decaac3d35b061c64772..76893753df05339b4de90ef3bcc5973e7df2a291 100644 (file)
@@ -904,9 +904,9 @@ package body Rtsfind is
       return
         Nkind (Prf) = N_Identifier
           and then
-            Nam_In (Chars (Prf), Name_Text_IO,
-                                 Name_Wide_Text_IO,
-                                 Name_Wide_Wide_Text_IO)
+            Chars (Prf) in Name_Text_IO
+                         | Name_Wide_Text_IO
+                         | Name_Wide_Wide_Text_IO
           and then Nkind (Sel) = N_Identifier
           and then Chars (Sel) in Text_IO_Package_Name;
    end Is_Text_IO_Special_Unit;
index f7c7287f996a36331fa6b88f289c536e4ca80d00..98ca30d8d75088616dd7245a24b0c13a0cf954f5 100644 (file)
@@ -120,10 +120,9 @@ package body SCIL_LL is
                null;
 
             when N_SCIL_Membership_Test =>
-               pragma Assert (Nkind_In (N, N_Identifier,
-                                           N_And_Then,
-                                           N_Or_Else,
-                                           N_Expression_With_Actions));
+               pragma Assert
+                 (Nkind (N) in N_Identifier | N_And_Then | N_Or_Else |
+                               N_Expression_With_Actions);
                null;
 
             when others =>
index 5474e081393958c12c96909dccbfef565d607241..4429b6bb52db3c0458599a7b0e3ab75b162a381a 100644 (file)
@@ -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
index 1f5ad3e70ee9508d1896bb23cd8ec06f4a3c929b..f77230cef3cd1fe87165a585c3cb8fb783c3540a 100644 (file)
@@ -960,24 +960,24 @@ package body Sem_Aggr is
             if Nkind (Parent (N)) = N_Assignment_Statement
               or else Inside_Init_Proc
               or else (Is_Constrained (Typ)
-                        and then Nkind_In (Parent (N),
-                                           N_Parameter_Association,
-                                           N_Function_Call,
-                                           N_Procedure_Call_Statement,
-                                           N_Generic_Association,
-                                           N_Formal_Object_Declaration,
-                                           N_Simple_Return_Statement,
-                                           N_Object_Declaration,
-                                           N_Component_Declaration,
-                                           N_Parameter_Specification,
-                                           N_Qualified_Expression,
-                                           N_Reference,
-                                           N_Aggregate,
-                                           N_Extension_Aggregate,
-                                           N_Component_Association,
-                                           N_Case_Expression_Alternative,
-                                           N_If_Expression,
-                                           N_Expression_With_Actions))
+                        and then Nkind (Parent (N)) in
+                                   N_Parameter_Association
+                                 | N_Function_Call
+                                 | N_Procedure_Call_Statement
+                                 | N_Generic_Association
+                                 | N_Formal_Object_Declaration
+                                 | N_Simple_Return_Statement
+                                 | N_Object_Declaration
+                                 | N_Component_Declaration
+                                 | N_Parameter_Specification
+                                 | N_Qualified_Expression
+                                 | N_Reference
+                                 | N_Aggregate
+                                 | N_Extension_Aggregate
+                                 | N_Component_Association
+                                 | N_Case_Expression_Alternative
+                                 | N_If_Expression
+                                 | N_Expression_With_Actions)
             then
                Aggr_Resolved :=
                  Resolve_Array_Aggregate
@@ -1424,7 +1424,7 @@ package body Sem_Aggr is
 
                if Is_Character_Type (Component_Typ)
                  and then No (Next_Index (Nxt_Ind))
-                 and then Nkind_In (Expr, N_String_Literal, N_Operator_Symbol)
+                 and then Nkind (Expr) in N_String_Literal | N_Operator_Symbol
                then
                   --  A string literal used in a multidimensional array
                   --  aggregate in place of the final one-dimensional
@@ -1698,8 +1698,8 @@ package body Sem_Aggr is
 
                   if Ada_Version = Ada_83
                     and then Assoc /= First (Component_Associations (N))
-                    and then Nkind_In (Parent (N), N_Assignment_Statement,
-                                                   N_Object_Declaration)
+                    and then Nkind (Parent (N)) in
+                               N_Assignment_Statement | N_Object_Declaration
                   then
                      Error_Msg_N
                        ("(Ada 83) illegal context for OTHERS choice", N);
@@ -3253,9 +3253,9 @@ package body Sem_Aggr is
          --  The ancestor must be a call or an aggregate, but a call may
          --  have been expanded into a temporary, so check original node.
 
-         elsif Nkind_In (Anc, N_Aggregate,
-                              N_Extension_Aggregate,
-                              N_Function_Call)
+         elsif Nkind (Anc) in N_Aggregate
+                            | N_Extension_Aggregate
+                            | N_Function_Call
          then
             return True;
 
@@ -4185,7 +4185,7 @@ package body Sem_Aggr is
          function Has_Expansion_Delayed (Expr : Node_Id) return Boolean is
          begin
             return
-               (Nkind_In (Expr, N_Aggregate, N_Extension_Aggregate)
+               (Nkind (Expr) in N_Aggregate | N_Extension_Aggregate
                  and then Present (Etype (Expr))
                  and then Is_Record_Type (Etype (Expr))
                  and then Expansion_Delayed (Expr))
index 2439169cba956d2b668189b43562ce40f5f053a2..16938e6ab9ea2e520215d9f84522aafd3179ab91 100644 (file)
@@ -786,7 +786,7 @@ package body Sem_Attr is
                (Nkind (Par) = N_Component_Association
                  or else Nkind (Par) in N_Subexpr)
             loop
-               if Nkind_In (Par, N_Aggregate, N_Extension_Aggregate) then
+               if Nkind (Par) in N_Aggregate | N_Extension_Aggregate then
                   if Etype (Par) = Typ then
                      Set_Has_Self_Reference (Par);
 
@@ -988,9 +988,10 @@ package body Sem_Attr is
 
                   if not In_Spec_Expression
                     and then not Has_Completion (Scop)
-                    and then not
-                      Nkind_In (Parent (N), N_Discriminant_Association,
-                                            N_Index_Or_Discriminant_Constraint)
+                    and then
+                      Nkind (Parent (N)) not in
+                        N_Discriminant_Association |
+                        N_Index_Or_Discriminant_Constraint
                   then
                      Error_Msg_N
                        ("current instance attribute must appear alone", N);
@@ -1113,8 +1114,7 @@ package body Sem_Attr is
                   Kill_Current_Values (Ent);
                   exit;
 
-               elsif Nkind_In (PP, N_Selected_Component,
-                                   N_Indexed_Component)
+               elsif Nkind (PP) in N_Selected_Component | N_Indexed_Component
                then
                   PP := Prefix (PP);
 
@@ -1168,10 +1168,10 @@ package body Sem_Attr is
          begin
             --  The "Name" argument of pragma Check denotes a postcondition
 
-            if Nam_In (Nam, Name_Post,
-                            Name_Post_Class,
-                            Name_Postcondition,
-                            Name_Refined_Post)
+            if Nam in Name_Post
+                    | Name_Post_Class
+                    | Name_Postcondition
+                    | Name_Refined_Post
             then
                null;
 
@@ -1317,7 +1317,7 @@ package body Sem_Attr is
 
          Prag := N;
          while Present (Prag) loop
-            if Nkind_In (Prag, N_Aspect_Specification, N_Pragma) then
+            if Nkind (Prag) in N_Aspect_Specification | N_Pragma then
                exit;
 
             --  Prevent the search from going too far
@@ -1332,7 +1332,7 @@ package body Sem_Attr is
          --  The attribute is allowed to appear only in postcondition-like
          --  aspects or pragmas.
 
-         if Nkind_In (Prag, N_Aspect_Specification, N_Pragma) then
+         if Nkind (Prag) in N_Aspect_Specification | N_Pragma then
             if Nkind (Prag) = N_Aspect_Specification then
                Prag_Nam := Chars (Identifier (Prag));
             else
@@ -1348,7 +1348,7 @@ package body Sem_Attr is
             --  Attribute 'Result is allowed to appear in aspect or pragma
             --  [Refined_]Depends (SPARK RM 6.1.5(11)).
 
-            elsif Nam_In (Prag_Nam, Name_Depends, Name_Refined_Depends)
+            elsif Prag_Nam in Name_Depends | Name_Refined_Depends
               and then Aname = Name_Result
             then
                null;
@@ -1361,10 +1361,10 @@ package body Sem_Attr is
             then
                null;
 
-            elsif Nam_In (Prag_Nam, Name_Post,
-                                    Name_Post_Class,
-                                    Name_Postcondition,
-                                    Name_Refined_Post)
+            elsif Prag_Nam in Name_Post
+                            | Name_Post_Class
+                            | Name_Postcondition
+                            | Name_Refined_Post
             then
                null;
 
@@ -1408,14 +1408,14 @@ package body Sem_Attr is
          then
             null;
 
-         elsif not Nkind_In (Subp_Decl, N_Abstract_Subprogram_Declaration,
-                                        N_Entry_Declaration,
-                                        N_Expression_Function,
-                                        N_Generic_Subprogram_Declaration,
-                                        N_Subprogram_Body,
-                                        N_Subprogram_Body_Stub,
-                                        N_Subprogram_Declaration,
-                                        N_Subprogram_Renaming_Declaration)
+         elsif Nkind (Subp_Decl) not in N_Abstract_Subprogram_Declaration
+                                      | N_Entry_Declaration
+                                      | N_Expression_Function
+                                      | N_Generic_Subprogram_Declaration
+                                      | N_Subprogram_Body
+                                      | N_Subprogram_Body_Stub
+                                      | N_Subprogram_Declaration
+                                      | N_Subprogram_Renaming_Declaration
          then
             return;
          end if;
@@ -1905,9 +1905,9 @@ package body Sem_Attr is
             --  the prefix of another attribute. Error is posted on parent.
 
             if Nkind (Parent (N)) = N_Attribute_Reference
-              and then Nam_In (Attribute_Name (Parent (N)), Name_Address,
-                                                            Name_Code_Address,
-                                                            Name_Access)
+              and then Attribute_Name (Parent (N)) in Name_Address
+                                                    | Name_Code_Address
+                                                    | Name_Access
             then
                Error_Msg_Name_1 := Attribute_Name (Parent (N));
                Error_Msg_N ("illegal prefix for % attribute", Parent (N));
@@ -2366,8 +2366,8 @@ package body Sem_Attr is
          --  parameter or component association, which is wrong.
 
          if Is_List_Member (N)
-           and then not Nkind_In (Parent (N), N_Procedure_Call_Statement,
-                                              N_Aggregate)
+           and then Nkind (Parent (N)) not in
+                      N_Procedure_Call_Statement | N_Aggregate
          then
             null;
          else
@@ -2423,8 +2423,8 @@ package body Sem_Attr is
             null;
 
          elsif Is_List_Member (N)
-           and then not Nkind_In (Parent (N), N_Procedure_Call_Statement,
-                                              N_Aggregate)
+           and then Nkind (Parent (N)) not in
+                      N_Procedure_Call_Statement | N_Aggregate
          then
             null;
 
@@ -2662,7 +2662,7 @@ package body Sem_Attr is
          if Nkind (Nod) = N_Identifier then
             return;
 
-         elsif Nkind_In (Nod, N_Selected_Component, N_Expanded_Name) then
+         elsif Nkind (Nod) in N_Selected_Component | N_Expanded_Name then
             Check_Unit_Name (Prefix (Nod));
 
             if Nkind (Selector_Name (Nod)) = N_Identifier then
@@ -3032,7 +3032,7 @@ package body Sem_Attr is
          --  parameterless call. Entry attributes are handled specially below.
 
          if Is_Entity_Name (P)
-           and then not Nam_In (Aname, Name_Count, Name_Caller)
+           and then Aname not in Name_Count | Name_Caller
          then
             Check_Parameterless_Call (P);
          end if;
@@ -3043,7 +3043,7 @@ package body Sem_Attr is
             --  primitive entry wrappers, the attributes Count, and Caller
             --  require a context check
 
-            if Nam_In (Aname, Name_Count, Name_Caller) then
+            if Aname in Name_Count | Name_Caller then
                declare
                   Count : Natural := 0;
                   I     : Interp_Index;
@@ -3341,7 +3341,7 @@ package body Sem_Attr is
       begin
          Check_E0;
 
-         if Nkind_In (P, N_Identifier, N_Expanded_Name) then
+         if Nkind (P) in N_Identifier | N_Expanded_Name then
             Ent := Entity (P);
 
             if not Is_Entry (Ent) then
@@ -3411,7 +3411,7 @@ package body Sem_Attr is
          Check_E0;
 
          if Nkind (P) = N_Attribute_Reference
-           and then Nam_In (Attribute_Name (P), Name_Elab_Body, Name_Elab_Spec)
+           and then Attribute_Name (P) in Name_Elab_Body | Name_Elab_Spec
          then
             null;
 
@@ -3598,7 +3598,7 @@ package body Sem_Attr is
       begin
          Check_E0;
 
-         if Nkind_In (P, N_Identifier, N_Expanded_Name) then
+         if Nkind (P) in N_Identifier | N_Expanded_Name then
             Ent := Entity (P);
 
             if Ekind (Ent) /= E_Entry then
@@ -3664,10 +3664,10 @@ package body Sem_Attr is
                exit;
 
             elsif Ekind (Scope (Ent)) in Task_Kind
-              and then not Ekind_In (S, E_Block,
-                                        E_Entry,
-                                        E_Entry_Family,
-                                        E_Loop)
+              and then Ekind (S) not in E_Block
+                                      | E_Entry
+                                      | E_Entry_Family
+                                      | E_Loop
             then
                Error_Attr ("Attribute % cannot appear in inner unit", N);
 
@@ -4538,12 +4538,13 @@ package body Sem_Attr is
             --  that the pragma appears in an appropriate loop location.
 
             if Nkind (Original_Node (Stmt)) = N_Pragma
-              and then Nam_In (Pragma_Name_Unmapped (Original_Node (Stmt)),
-                               Name_Loop_Invariant,
-                               Name_Loop_Variant,
-                               Name_Assert,
-                               Name_Assert_And_Cut,
-                               Name_Assume)
+              and then
+                Pragma_Name_Unmapped (Original_Node (Stmt))
+                  in Name_Loop_Invariant
+                   | Name_Loop_Variant
+                   | Name_Assert
+                   | Name_Assert_And_Cut
+                   | Name_Assume
             then
                Encl_Prag := Original_Node (Stmt);
 
@@ -4606,7 +4607,7 @@ package body Sem_Attr is
 
             if Ekind (Scop) = E_Loop and then Scop = Loop_Id then
                exit;
-            elsif Ekind_In (Scop, E_Block, E_Loop, E_Return_Statement) then
+            elsif Ekind (Scop) in E_Block | E_Loop | E_Return_Statement then
                null;
             else
                Error_Attr
@@ -5000,8 +5001,7 @@ package body Sem_Attr is
                --  another attribute 'Old.
 
                if Nkind (Nod) = N_Attribute_Reference
-                 and then Nam_In (Attribute_Name (Nod), Name_Old,
-                                                        Name_Result)
+                 and then Attribute_Name (Nod) in Name_Old | Name_Result
                then
                   Error_Msg_Name_1 := Attribute_Name (Nod);
                   Error_Msg_Name_2 := Name_Old;
@@ -5146,7 +5146,7 @@ package body Sem_Attr is
             then
                Pref_Id := Entity (Name (P));
 
-               if Ekind_In (Spec_Id, E_Function, E_Generic_Function)
+               if Ekind (Spec_Id) in E_Function | E_Generic_Function
                  and then Pref_Id = Spec_Id
                then
                   Error_Msg_Warn := SPARK_Mode /= On;
@@ -5432,7 +5432,7 @@ package body Sem_Attr is
 
             elsif Nkind (Subp_Spec) = N_Function_Specification
               and then Present (Generic_Parent (Subp_Spec))
-              and then Ekind_In (Pref_Id, E_Generic_Function, E_Function)
+              and then Ekind (Pref_Id) in E_Generic_Function | E_Function
             then
                if Generic_Parent (Subp_Spec) = Pref_Id then
                   return True;
@@ -5538,7 +5538,7 @@ package body Sem_Attr is
                --  functions, or the prefix must be generic and the spec
                --  must be nongeneric (i.e. it must denote an instance).
 
-               if (Ekind_In (Pref_Id, E_Function, E_Generic_Function)
+               if (Ekind (Pref_Id) in E_Function | E_Generic_Function
                     and then Ekind (Pref_Id) = Ekind (Spec_Id))
                  or else
                    (Ekind (Pref_Id) = E_Generic_Function
@@ -6615,7 +6615,7 @@ package body Sem_Attr is
                   Negative := False;
                end if;
 
-               if not Nkind_In (Expr, N_Integer_Literal, N_Real_Literal) then
+               if Nkind (Expr) not in N_Integer_Literal | N_Real_Literal then
                   Error_Attr
                     ("named number for % attribute must be simple literal", N);
                end if;
@@ -7814,8 +7814,7 @@ package body Sem_Attr is
                begin
                   --  P'Enum_Rep case
 
-                  if Ekind_In (Entity (P), E_Constant,
-                                           E_Enumeration_Literal)
+                  if Ekind (Entity (P)) in E_Constant | E_Enumeration_Literal
                   then
                      Enum_Expr := P;
 
@@ -8111,7 +8110,7 @@ package body Sem_Attr is
 
       --  Second foldable possibility is an array object (RM 4.9(8))
 
-      elsif Ekind_In (P_Entity, E_Variable, E_Constant)
+      elsif Ekind (P_Entity) in E_Variable | E_Constant
         and then Is_Array_Type (Etype (P_Entity))
         and then (not Is_Generic_Type (Etype (P_Entity)))
       then
@@ -10482,10 +10481,10 @@ package body Sem_Attr is
       --  An exception is the GNAT attribute Constrained_Array which is
       --  defined to be a static attribute in all cases.
 
-      if Nkind_In (N, N_Integer_Literal,
-                      N_Real_Literal,
-                      N_Character_Literal,
-                      N_String_Literal)
+      if Nkind (N) in N_Integer_Literal
+                    | N_Real_Literal
+                    | N_Character_Literal
+                    | N_String_Literal
         or else (Is_Entity_Name (N)
                   and then Ekind (Entity (N)) = E_Enumeration_Literal)
       then
@@ -10592,8 +10591,8 @@ package body Sem_Attr is
 
             if Is_Record_Type (Current_Scope)
               and then
-                Nkind_In (Parent (N), N_Discriminant_Association,
-                                      N_Index_Or_Discriminant_Constraint)
+                Nkind (Parent (N)) in N_Discriminant_Association
+                                    | N_Index_Or_Discriminant_Constraint
             then
                Indic := Parent (Parent (N));
                while Present (Indic)
@@ -10656,14 +10655,12 @@ package body Sem_Attr is
 
          begin
             loop
-               if Nkind_In (PP, N_Selected_Component,
-                                N_Indexed_Component)
-               then
+               if Nkind (PP) in N_Selected_Component | N_Indexed_Component then
                   PP := Prefix (PP);
 
                elsif Comes_From_Source (PP)
-                 and then Nkind_In (PP, N_Type_Conversion,
-                                        N_Unchecked_Type_Conversion)
+                 and then Nkind (PP) in N_Type_Conversion
+                                      | N_Unchecked_Type_Conversion
                  and then Is_Array_Type (Etype (PP))
                then
                   return False;
@@ -10671,9 +10668,8 @@ package body Sem_Attr is
                elsif Comes_From_Source (PP)
                  and then Nkind (PP) = N_Qualified_Expression
                  and then Is_Array_Type (Etype (PP))
-                 and then Nkind_In (Original_Node (Expression (PP)),
-                             N_Aggregate,
-                             N_Extension_Aggregate)
+                 and then Nkind (Original_Node (Expression (PP))) in
+                            N_Aggregate | N_Extension_Aggregate
                then
                   return False;
 
@@ -10793,7 +10789,7 @@ package body Sem_Attr is
             --  test, which breaks several filed tests???
 
             if Ekind (Typ) = E_Anonymous_Access_Type
-              and then Nkind_In (Parent (N), N_Op_Eq, N_Op_Ne)
+              and then Nkind (Parent (N)) in N_Op_Eq | N_Op_Ne
               and then False
             then
                Error_Msg_N ("need unique type to resolve 'Access", N);
@@ -10894,10 +10890,10 @@ package body Sem_Attr is
                --  also be accessibility checks on those, this is where the
                --  checks can eventually be centralized ???
 
-               if Ekind_In (Btyp, E_Access_Protected_Subprogram_Type,
-                                  E_Access_Subprogram_Type,
-                                  E_Anonymous_Access_Protected_Subprogram_Type,
-                                  E_Anonymous_Access_Subprogram_Type)
+               if Ekind (Btyp) in E_Access_Protected_Subprogram_Type
+                                | E_Access_Subprogram_Type
+                                | E_Anonymous_Access_Protected_Subprogram_Type
+                                | E_Anonymous_Access_Subprogram_Type
                then
                   --  Deal with convention mismatch
 
@@ -11413,8 +11409,8 @@ package body Sem_Attr is
                end if;
             end if;
 
-            if Ekind_In (Btyp, E_Access_Protected_Subprogram_Type,
-                               E_Anonymous_Access_Protected_Subprogram_Type)
+            if Ekind (Btyp) in E_Access_Protected_Subprogram_Type
+                             | E_Anonymous_Access_Protected_Subprogram_Type
             then
                if Is_Entity_Name (P)
                  and then not Is_Protected_Type (Scope (Entity (P)))
@@ -11451,8 +11447,8 @@ package body Sem_Attr is
                   Check_Internal_Protected_Use (N, Entity (P));
                end if;
 
-            elsif Ekind_In (Btyp, E_Access_Subprogram_Type,
-                                  E_Anonymous_Access_Subprogram_Type)
+            elsif Ekind (Btyp) in E_Access_Subprogram_Type
+                                | E_Anonymous_Access_Subprogram_Type
               and then Ekind (Etype (N)) = E_Access_Protected_Subprogram_Type
             then
                Error_Msg_F ("context requires a non-protected subprogram", P);
@@ -11594,7 +11590,7 @@ package body Sem_Attr is
                     and then Comes_From_Source (Subp_Id)
                     and then Comes_From_Source (N)
                     and then In_Open_Scopes (Scop)
-                    and then Ekind_In (Scop, E_Block, E_Procedure, E_Function)
+                    and then Ekind (Scop) in E_Block | E_Procedure | E_Function
                     and then not Has_Completion (Subp_Id)
                     and then No (Elaboration_Entity (Subp_Id))
                     and then Nkind (Subp_Decl) = N_Subprogram_Declaration
index 77f212c2c157141087c6961574d66abecb7024dc..4a16c124823e7766a54aa335d2ada09862e47b45 100644 (file)
@@ -711,11 +711,11 @@ package body Sem_Aux is
 
    begin
       pragma Assert
-        (Nkind_In (N, N_Aspect_Specification,
-                      N_Attribute_Definition_Clause,
-                      N_Enumeration_Representation_Clause,
-                      N_Pragma,
-                      N_Record_Representation_Clause));
+        (Nkind (N) in N_Aspect_Specification
+                    | N_Attribute_Definition_Clause
+                    | N_Enumeration_Representation_Clause
+                    | N_Pragma
+                    | N_Record_Representation_Clause);
 
       Item := First_Rep_Item (E);
       while Present (Item) loop
@@ -877,13 +877,9 @@ package body Sem_Aux is
 
    function Is_Body (N : Node_Id) return Boolean is
    begin
-      return
-        Nkind (N) in N_Body_Stub
-          or else Nkind_In (N, N_Entry_Body,
-                               N_Package_Body,
-                               N_Protected_Body,
-                               N_Subprogram_Body,
-                               N_Task_Body);
+      return Nkind (N) in
+        N_Body_Stub       | N_Entry_Body | N_Package_Body | N_Protected_Body |
+        N_Subprogram_Body | N_Task_Body;
    end Is_Body;
 
    ---------------------
@@ -1072,8 +1068,7 @@ package body Sem_Aux is
          Kind := Nkind (Original_Node (Parent (E)));
 
          return
-           Nkind_In (Kind, N_Formal_Object_Declaration,
-                           N_Formal_Type_Declaration)
+           Kind in N_Formal_Object_Declaration | N_Formal_Type_Declaration
              or else Is_Formal_Subprogram (E)
              or else
                (Ekind (E) = E_Package
index 8d785af9f6df170440572ced7e26c9ad2969bf2f..be1e67e57c6d2bfd4e4e396244e2f806b0dbd313 100644 (file)
@@ -793,8 +793,8 @@ package body Sem_Cat is
          if Ekind (E) in Subprogram_Kind then
             Declaration := Unit_Declaration_Node (E);
 
-            if Nkind_In (Declaration, N_Subprogram_Body,
-                                      N_Subprogram_Renaming_Declaration)
+            if Nkind (Declaration) in
+                 N_Subprogram_Body | N_Subprogram_Renaming_Declaration
             then
                Specification := Corresponding_Spec (Declaration);
             end if;
@@ -1003,7 +1003,7 @@ package body Sem_Cat is
       --  Body of RCI unit does not need validation
 
       if Is_Remote_Call_Interface (E)
-        and then Nkind_In (N, N_Package_Body, N_Subprogram_Body)
+        and then Nkind (N) in N_Package_Body | N_Subprogram_Body
       then
          return;
       end if;
@@ -1506,8 +1506,8 @@ package body Sem_Cat is
 
             null;
 
-         elsif Ekind_In (Param_Type, E_Anonymous_Access_Type,
-                                     E_Anonymous_Access_Subprogram_Type)
+         elsif Ekind (Param_Type) in E_Anonymous_Access_Type
+                                   | E_Anonymous_Access_Subprogram_Type
          then
             --  From RM E.2.2(14), no anonymous access parameter other than
             --  controlling ones may be used (because an anonymous access
@@ -1583,9 +1583,9 @@ package body Sem_Cat is
                  ("limited type not allowed in rci unit", Parent (E));
                Explain_Limited_Type (E, Parent (E));
 
-            elsif Ekind_In (E, E_Generic_Function,
-                               E_Generic_Package,
-                               E_Generic_Procedure)
+            elsif Ekind (E) in E_Generic_Function
+                             | E_Generic_Package
+                             | E_Generic_Procedure
             then
                Error_Msg_N ("generic declaration not allowed in rci unit",
                  Parent (E));
index c79bd5897037338bdb6a3b29a495f9fe2f466b0d..76b68a190c046960c156813dc6c2b960e408d84f 100644 (file)
@@ -413,8 +413,8 @@ package body Sem_Ch10 is
 
                elsif Nkind (Cont_Item) = N_Pragma
                  and then
-                   Nam_In (Pragma_Name_Unmapped (Cont_Item),
-                           Name_Elaborate, Name_Elaborate_All)
+                   Pragma_Name_Unmapped (Cont_Item)
+                     in Name_Elaborate | Name_Elaborate_All
                  and then not Used_Type_Or_Elab
                then
                   Prag_Unit :=
@@ -724,8 +724,8 @@ package body Sem_Ch10 is
 
             --  Verify that the library unit is a package declaration
 
-            if not Nkind_In (Unit (Lib_Unit), N_Package_Declaration,
-                                              N_Generic_Package_Declaration)
+            if Nkind (Unit (Lib_Unit)) not in
+                 N_Package_Declaration | N_Generic_Package_Declaration
             then
                Error_Msg_N
                  ("no legal package declaration for package body", N);
@@ -952,8 +952,8 @@ package body Sem_Ch10 is
       --  Analyze the contract of a [generic] subprogram that acts as a
       --  compilation unit after all compilation pragmas have been analyzed.
 
-      if Nkind_In (Unit_Node, N_Generic_Subprogram_Declaration,
-                              N_Subprogram_Declaration)
+      if Nkind (Unit_Node) in
+           N_Generic_Subprogram_Declaration | N_Subprogram_Declaration
       then
          Analyze_Entry_Or_Subprogram_Contract (Defining_Entity (Unit_Node));
       end if;
@@ -998,10 +998,10 @@ package body Sem_Ch10 is
       --  next compilation, which is either the main unit or some other unit
       --  in the context.
 
-      if Nkind_In (Unit_Node, N_Package_Declaration,
-                              N_Package_Renaming_Declaration,
-                              N_Subprogram_Declaration)
-        or else Nkind (Unit_Node) in N_Generic_Declaration
+      if Nkind (Unit_Node) in N_Package_Declaration
+                            | N_Package_Renaming_Declaration
+                            | N_Subprogram_Declaration
+                            | N_Generic_Declaration
         or else (Nkind (Unit_Node) = N_Subprogram_Body
                   and then Acts_As_Spec (Unit_Node))
       then
@@ -1149,9 +1149,9 @@ package body Sem_Ch10 is
          --  are triggered by these subprograms.
 
          if GNATprove_Mode
-           and then Nkind_In (Unit_Node, N_Function_Instantiation,
-                                         N_Procedure_Instantiation,
-                                         N_Subprogram_Body)
+           and then Nkind (Unit_Node) in N_Function_Instantiation
+                                       | N_Procedure_Instantiation
+                                       | N_Subprogram_Body
          then
             declare
                Spec : Node_Id;
@@ -1190,10 +1190,10 @@ package body Sem_Ch10 is
       --  units manufactured by the compiler never need elab checks.
 
       if Comes_From_Source (N)
-        and then Nkind_In (Unit_Node, N_Package_Declaration,
-                                      N_Generic_Package_Declaration,
-                                      N_Subprogram_Declaration,
-                                      N_Generic_Subprogram_Declaration)
+        and then Nkind (Unit_Node) in N_Package_Declaration
+                                    | N_Generic_Package_Declaration
+                                    | N_Subprogram_Declaration
+                                    | N_Generic_Subprogram_Declaration
       then
          declare
             Loc  : constant Source_Ptr       := Sloc (N);
@@ -1478,10 +1478,10 @@ package body Sem_Ch10 is
                --  Verify that the illegal contexts given in 10.1.2 (18/2) are
                --  properly rejected, including renaming declarations.
 
-               if not Nkind_In (Ukind, N_Package_Declaration,
-                                       N_Subprogram_Declaration)
-                 and then Ukind not in N_Generic_Declaration
-                 and then Ukind not in N_Generic_Instantiation
+               if Ukind not in N_Package_Declaration
+                             | N_Subprogram_Declaration
+                             | N_Generic_Declaration
+                             | N_Generic_Instantiation
                then
                   Error_Msg_N ("limited with_clause not allowed here", Item);
 
@@ -1536,10 +1536,9 @@ package body Sem_Ch10 is
                         if Item /= It
                           and then Nkind (It) = N_With_Clause
                           and then not Limited_Present (It)
-                          and then
-                            Nkind_In (Unit (Library_Unit (It)),
-                                      N_Package_Declaration,
-                                      N_Package_Renaming_Declaration)
+                          and then Nkind (Unit (Library_Unit (It))) in
+                                     N_Package_Declaration |
+                                     N_Package_Renaming_Declaration
                         then
                            if Nkind (Unit (Library_Unit (It))) =
                                                       N_Package_Declaration
@@ -2022,9 +2021,8 @@ package body Sem_Ch10 is
       --  Verify that the identifier for the stub is unique within this
       --  declarative part.
 
-      if Nkind_In (Parent (N), N_Block_Statement,
-                               N_Package_Body,
-                               N_Subprogram_Body)
+      if Nkind (Parent (N)) in
+           N_Block_Statement | N_Package_Body | N_Subprogram_Body
       then
          Decl := First (Declarations (Parent (N)));
          while Present (Decl) and then Decl /= N loop
@@ -2361,8 +2359,7 @@ package body Sem_Ch10 is
                Remove_Scope;
             end if;
 
-            if Nkind_In (Unit (Lib_Spec), N_Package_Body,
-                                          N_Subprogram_Body)
+            if Nkind (Unit (Lib_Spec)) in N_Package_Body | N_Subprogram_Body
             then
                Remove_Context (Library_Unit (Lib_Spec));
             end if;
@@ -2655,9 +2652,8 @@ package body Sem_Ch10 is
          if Nkind (Nam) = N_Selected_Component
            and then Nkind (Prefix (Nam)) = N_Identifier
            and then Chars (Prefix (Nam)) = Name_Gnat
-           and then Nam_In (Chars (Selector_Name (Nam)),
-                            Name_Most_Recent_Exception,
-                            Name_Exception_Traces)
+           and then Chars (Selector_Name (Nam))
+                      in Name_Most_Recent_Exception | Name_Exception_Traces
          then
             Check_Restriction (No_Exception_Propagation, N);
             Special_Exception_Package_Used := True;
@@ -2967,7 +2963,7 @@ package body Sem_Ch10 is
    --  Start of processing for Check_Private_Child_Unit
 
    begin
-      if Nkind_In (Lib_Unit, N_Package_Body, N_Subprogram_Body) then
+      if Nkind (Lib_Unit) in N_Package_Body | N_Subprogram_Body then
          Curr_Unit := Defining_Entity (Unit (Library_Unit (N)));
          Par_Lib   := Curr_Unit;
 
@@ -3074,7 +3070,7 @@ package body Sem_Ch10 is
 
                elsif Curr_Private
                  or else Private_Present (Item)
-                 or else Nkind_In (Lib_Unit, N_Package_Body, N_Subunit)
+                 or else Nkind (Lib_Unit) in N_Package_Body | N_Subunit
                  or else (Nkind (Lib_Unit) = N_Subprogram_Body
                            and then not Acts_As_Spec (Parent (Lib_Unit)))
                then
@@ -3101,11 +3097,9 @@ package body Sem_Ch10 is
       Kind : constant Node_Kind := Nkind (Par);
 
    begin
-      if Nkind_In (Kind, N_Package_Body,
-                         N_Subprogram_Body,
-                         N_Task_Body,
-                         N_Protected_Body)
-        and then Nkind_In (Parent (Par), N_Compilation_Unit, N_Subunit)
+      if Kind in
+           N_Package_Body | N_Subprogram_Body | N_Task_Body | N_Protected_Body
+        and then Nkind (Parent (Par)) in N_Compilation_Unit | N_Subunit
       then
          null;
 
@@ -3202,11 +3196,11 @@ package body Sem_Ch10 is
       --  on a child unit implies that the implicit with on the parent is also
       --  private.
 
-      if Nkind_In (Unit (N), N_Generic_Package_Declaration,
-                             N_Package_Declaration,
-                             N_Generic_Subprogram_Declaration,
-                             N_Subprogram_Declaration,
-                             N_Subprogram_Body)
+      if Nkind (Unit (N)) in N_Generic_Package_Declaration
+                           | N_Package_Declaration
+                           | N_Generic_Subprogram_Declaration
+                           | N_Subprogram_Declaration
+                           | N_Subprogram_Body
       then
          Set_Private_Present (Withn, Private_Present (Item));
       end if;
@@ -3715,10 +3709,10 @@ package body Sem_Ch10 is
          Install_Siblings (Defining_Entity (Unit (Library_Unit (N))), N);
       end if;
 
-      if Nkind_In (Lib_Unit, N_Generic_Package_Declaration,
-                             N_Generic_Subprogram_Declaration,
-                             N_Package_Declaration,
-                             N_Subprogram_Declaration)
+      if Nkind (Lib_Unit) in N_Generic_Package_Declaration
+                           | N_Generic_Subprogram_Declaration
+                           | N_Package_Declaration
+                           | N_Subprogram_Declaration
       then
          if Is_Child_Spec (Lib_Unit) then
             Lib_Parent := Defining_Entity (Unit (Parent_Spec (Lib_Unit)));
@@ -3908,9 +3902,8 @@ package body Sem_Ch10 is
          elsif Private_Present (Parent (Item))
             or else Curr_Private
             or else Private_Present (Item)
-            or else Nkind_In (Unit (Parent (Item)), N_Package_Body,
-                                                    N_Subprogram_Body,
-                                                    N_Subunit)
+            or else Nkind (Unit (Parent (Item))) in
+                      N_Package_Body | N_Subprogram_Body | N_Subunit
          then
             --  Current unit is private, of descendant of a private unit
 
@@ -4068,9 +4061,8 @@ package body Sem_Ch10 is
             then
                if not Private_Present (Item)
                  or else Private_Present (N)
-                 or else Nkind_In (Unit (N), N_Package_Body,
-                                             N_Subprogram_Body,
-                                             N_Subunit)
+                 or else Nkind (Unit (N)) in
+                           N_Package_Body | N_Subprogram_Body | N_Subunit
                then
                   Install_Limited_With_Clause (Item);
                end if;
@@ -4162,9 +4154,9 @@ package body Sem_Ch10 is
       end if;
 
       if Ekind (P_Name) = E_Generic_Package
-        and then not Nkind_In (Lib_Unit, N_Generic_Subprogram_Declaration,
-                                         N_Generic_Package_Declaration)
-        and then Nkind (Lib_Unit) not in N_Generic_Renaming_Declaration
+        and then Nkind (Lib_Unit) not in N_Generic_Subprogram_Declaration
+                                       | N_Generic_Package_Declaration
+                                       | N_Generic_Renaming_Declaration
       then
          Error_Msg_N
            ("child of a generic package must be a generic unit", Lib_Unit);
@@ -4627,17 +4619,17 @@ package body Sem_Ch10 is
                --  Save for subsequent examination of import pragmas.
 
                if Comes_From_Source (Decl)
-                 and then (Nkind_In (Decl, N_Subprogram_Declaration,
-                                           N_Subprogram_Renaming_Declaration,
-                                           N_Generic_Subprogram_Declaration))
+                 and then (Nkind (Decl) in N_Subprogram_Declaration
+                                         | N_Subprogram_Renaming_Declaration
+                                         | N_Generic_Subprogram_Declaration)
                then
                   Append_Elmt (Defining_Entity (Decl), Subp_List);
 
                --  Package declaration of generic package declaration. We need
                --  to recursively examine nested declarations.
 
-               elsif Nkind_In (Decl, N_Package_Declaration,
-                                     N_Generic_Package_Declaration)
+               elsif Nkind (Decl) in N_Package_Declaration
+                                   | N_Generic_Package_Declaration
                then
                   Check_Declarations (Specification (Decl));
 
@@ -4657,14 +4649,14 @@ package body Sem_Ch10 is
             Decl := First (Private_Declarations (Spec));
             while Present (Decl) loop
                if Comes_From_Source (Decl)
-                 and then (Nkind_In (Decl, N_Subprogram_Declaration,
-                                           N_Subprogram_Renaming_Declaration,
-                                           N_Generic_Subprogram_Declaration))
+                 and then Nkind (Decl) in N_Subprogram_Declaration
+                                        | N_Subprogram_Renaming_Declaration
+                                        | N_Generic_Subprogram_Declaration
                then
                   Append_Elmt (Defining_Entity (Decl), Subp_List);
 
-               elsif Nkind_In (Decl, N_Package_Declaration,
-                                     N_Generic_Package_Declaration)
+               elsif Nkind (Decl) in N_Package_Declaration
+                                   | N_Generic_Package_Declaration
                then
                   Check_Declarations (Specification (Decl));
 
@@ -4899,8 +4891,8 @@ package body Sem_Ch10 is
             --  corresponding spec, otherwise follow pointer to parent spec.
 
             if Present (Library_Unit (Aux_Unit))
-              and then Nkind_In (Unit (Aux_Unit),
-                                 N_Package_Body, N_Subprogram_Body)
+              and then Nkind (Unit (Aux_Unit)) in
+                         N_Package_Body | N_Subprogram_Body
             then
                if Aux_Unit = Library_Unit (Aux_Unit) then
 
@@ -5551,7 +5543,7 @@ package body Sem_Ch10 is
       E1 : constant Entity_Id := Defining_Entity (Unit (U1));
       E2 : Entity_Id;
    begin
-      if Nkind_In (Unit (U2), N_Package_Body, N_Subprogram_Body) then
+      if Nkind (Unit (U2)) in N_Package_Body | N_Subprogram_Body then
          E2 := Defining_Entity (Unit (Library_Unit (U2)));
          return Is_Ancestor_Package (E1, E2);
       else
@@ -6058,12 +6050,12 @@ package body Sem_Ch10 is
 
             --  Types
 
-            elsif Nkind_In (Decl, N_Full_Type_Declaration,
-                                  N_Incomplete_Type_Declaration,
-                                  N_Private_Extension_Declaration,
-                                  N_Private_Type_Declaration,
-                                  N_Protected_Type_Declaration,
-                                  N_Task_Type_Declaration)
+            elsif Nkind (Decl) in N_Full_Type_Declaration
+                                | N_Incomplete_Type_Declaration
+                                | N_Private_Extension_Declaration
+                                | N_Private_Type_Declaration
+                                | N_Protected_Type_Declaration
+                                | N_Task_Type_Declaration
             then
                Def_Id := Defining_Entity (Decl);
 
@@ -6082,8 +6074,8 @@ package body Sem_Ch10 is
                      (Nkind (Def) = N_Derived_Type_Definition
                         and then Present (Record_Extension_Part (Def)));
 
-               elsif Nkind_In (Decl, N_Incomplete_Type_Declaration,
-                                     N_Private_Type_Declaration)
+               elsif Nkind (Decl) in N_Incomplete_Type_Declaration
+                                   | N_Private_Type_Declaration
                then
                   Is_Tagged := Tagged_Present (Decl);
 
@@ -6365,7 +6357,7 @@ package body Sem_Ch10 is
       then
          Set_Body_Needed_For_SAL (Unit_Name);
 
-      elsif Ekind_In (Unit_Name, E_Generic_Procedure, E_Generic_Function) then
+      elsif Ekind (Unit_Name) in E_Generic_Procedure | E_Generic_Function then
          Set_Body_Needed_For_SAL (Unit_Name);
 
       elsif Is_Subprogram (Unit_Name)
index ea7f3641ada4702b5bc63a920cb9904d3453ee3d..940c93b946c5e42c31059ee1eb23d7945db11ec7 100644 (file)
@@ -433,7 +433,7 @@ package body Sem_Ch11 is
 
       if ((Is_Subprogram (Current_Scope) or else Is_Entry (Current_Scope))
            and then Chars (Current_Scope) /= Name_uPostconditions)
-         or else Ekind_In (Current_Scope, E_Block, E_Task_Type)
+         or else Ekind (Current_Scope) in E_Block | E_Task_Type
       then
          Warn_On_Useless_Assignments (Current_Scope);
       end if;
@@ -537,7 +537,7 @@ package body Sem_Ch11 is
             --  Skip past null statements and pragmas
 
             while Present (P)
-              and then Nkind_In (P, N_Null_Statement, N_Pragma)
+              and then Nkind (P) in N_Null_Statement | N_Pragma
             loop
                P := Prev (P);
             end loop;
@@ -594,11 +594,9 @@ package body Sem_Ch11 is
 
       if No (Exception_Id) then
          P := Parent (N);
-         while not Nkind_In (P, N_Exception_Handler,
-                                N_Subprogram_Body,
-                                N_Package_Body,
-                                N_Task_Body,
-                                N_Entry_Body)
+         while Nkind (P) not in
+                 N_Exception_Handler | N_Subprogram_Body | N_Package_Body |
+                 N_Task_Body         | N_Entry_Body
          loop
             P := Parent (P);
          end loop;
index e09a7ac1e3fd34c2ff999427b85f85ccd64a2bbe..cbf27e216eedf9518bd1d055c41daf581bc28d2f 100644 (file)
@@ -1573,9 +1573,9 @@ package body Sem_Ch12 is
                         (Defining_Unit_Name (Specification (Analyzed_Formal)));
 
                when N_Formal_Package_Declaration =>
-                  exit when Nkind_In (Kind, N_Formal_Package_Declaration,
-                                            N_Generic_Package_Declaration,
-                                            N_Package_Declaration);
+                  exit when Kind in N_Formal_Package_Declaration
+                                  | N_Generic_Package_Declaration
+                                  | N_Package_Declaration;
 
                when N_Use_Package_Clause
                   | N_Use_Type_Clause
@@ -1589,10 +1589,10 @@ package body Sem_Ch12 is
 
                   exit when
                     Kind not in N_Formal_Subprogram_Declaration
-                      and then not Nkind_In (Kind, N_Subprogram_Declaration,
-                                                   N_Freeze_Entity,
-                                                   N_Null_Statement,
-                                                   N_Itype_Reference)
+                      and then Kind not in N_Subprogram_Declaration
+                                         | N_Freeze_Entity
+                                         | N_Null_Statement
+                                         | N_Itype_Reference
                       and then Chars (Defining_Identifier (Formal)) =
                                Chars (Defining_Identifier (Analyzed_Formal));
             end case;
@@ -2103,10 +2103,10 @@ package body Sem_Ch12 is
 
                            S := Current_Scope;
                            while Present (S) loop
-                              if Ekind_In (S, E_Block,
-                                              E_Function,
-                                              E_Loop,
-                                              E_Procedure)
+                              if Ekind (S) in E_Block
+                                            | E_Function
+                                            | E_Loop
+                                            | E_Procedure
                               then
                                  Needs_Freezing := False;
                                  exit;
@@ -2250,9 +2250,9 @@ package body Sem_Ch12 is
       if Nkind (Def) = N_Constrained_Array_Definition then
          DSS := First (Discrete_Subtype_Definitions (Def));
          while Present (DSS) loop
-            if Nkind_In (DSS, N_Subtype_Indication,
-                              N_Range,
-                              N_Attribute_Reference)
+            if Nkind (DSS) in N_Subtype_Indication
+                            | N_Range
+                            | N_Attribute_Reference
             then
                Error_Msg_N ("only a subtype mark is allowed in a formal", DSS);
             end if;
@@ -5032,7 +5032,7 @@ package body Sem_Ch12 is
          while Present (S) and then S /= Standard_Standard loop
             if Is_Generic_Instance (S)
               and then (In_Package_Body (S)
-                         or else Ekind_In (S, E_Procedure, E_Function))
+                         or else Ekind (S) in E_Procedure | E_Function)
             then
                --  We still have to remove the entities of the enclosing
                --  instance from direct visibility.
@@ -5201,7 +5201,7 @@ package body Sem_Ch12 is
                Set_Is_Generic_Instance (Inst, True);
 
                if In_Package_Body (Inst)
-                 or else Ekind_In (S, E_Procedure, E_Function)
+                 or else Ekind (S) in E_Procedure | E_Function
                then
                   E := First_Entity (Instances (J));
                   while Present (E) loop
@@ -5974,7 +5974,7 @@ package body Sem_Ch12 is
       if Nkind (Assoc) /= Nkind (N) then
          return Assoc;
 
-      elsif Nkind_In (Assoc, N_Aggregate, N_Extension_Aggregate) then
+      elsif Nkind (Assoc) in N_Aggregate | N_Extension_Aggregate then
          return Assoc;
 
       else
@@ -5994,11 +5994,11 @@ package body Sem_Ch12 is
 
          if (Nkind (Assoc) = N_Identifier or else Nkind (Assoc) in N_Op)
            and then Present (Associated_Node (Assoc))
-           and then (Nkind_In (Associated_Node (Assoc), N_Function_Call,
-                                                        N_Explicit_Dereference,
-                                                        N_Integer_Literal,
-                                                        N_Real_Literal,
-                                                        N_String_Literal))
+           and then Nkind (Associated_Node (Assoc)) in N_Function_Call
+                                                     | N_Explicit_Dereference
+                                                     | N_Integer_Literal
+                                                     | N_Real_Literal
+                                                     | N_String_Literal
          then
             Assoc := Associated_Node (Assoc);
          end if;
@@ -6506,9 +6506,9 @@ package body Sem_Ch12 is
          if Kind = N_Formal_Type_Declaration then
             return;
 
-         elsif Nkind_In (Kind, N_Formal_Object_Declaration,
-                               N_Formal_Package_Declaration)
-           or else Kind in N_Formal_Subprogram_Declaration
+         elsif Kind in N_Formal_Object_Declaration
+                     | N_Formal_Package_Declaration
+                     | N_Formal_Subprogram_Declaration
          then
             null;
 
@@ -6701,9 +6701,8 @@ package body Sem_Ch12 is
          --  If the formal entity comes from a formal declaration, it was
          --  defaulted in the formal package, and no check is needed on it.
 
-         elsif Nkind_In (Original_Node (Parent (E2)),
-                         N_Formal_Object_Declaration,
-                         N_Formal_Type_Declaration)
+         elsif Nkind (Original_Node (Parent (E2))) in
+                 N_Formal_Object_Declaration | N_Formal_Type_Declaration
          then
             --  If the formal is a tagged type the corresponding class-wide
             --  type has been generated as well, and it must be skipped.
@@ -7958,11 +7957,11 @@ package body Sem_Ch12 is
 
       --  Special casing for identifiers and other entity names and operators
 
-      if Nkind_In (New_N, N_Character_Literal,
-                          N_Expanded_Name,
-                          N_Identifier,
-                          N_Operator_Symbol)
-        or else Nkind (New_N) in N_Op
+      if Nkind (New_N) in N_Character_Literal
+                        | N_Expanded_Name
+                        | N_Identifier
+                        | N_Operator_Symbol
+                        | N_Op
       then
          if not Instantiating then
 
@@ -8006,10 +8005,9 @@ package body Sem_Ch12 is
                end if;
 
             elsif No (Ent)
-              or else
-                not Nkind_In (Ent, N_Defining_Identifier,
-                                   N_Defining_Character_Literal,
-                                   N_Defining_Operator_Symbol)
+              or else Nkind (Ent) not in N_Defining_Identifier
+                                       | N_Defining_Character_Literal
+                                       | N_Defining_Operator_Symbol
               or else No (Scope (Ent))
               or else
                 (Scope (Ent) = Current_Instantiated_Parent.Gen_Id
@@ -8176,9 +8174,9 @@ package body Sem_Ch12 is
                   then
                      Set_Entity (New_N, Entity (Name (Assoc)));
 
-                  elsif Nkind_In (Assoc, N_Defining_Identifier,
-                                         N_Defining_Character_Literal,
-                                         N_Defining_Operator_Symbol)
+                  elsif Nkind (Assoc) in N_Defining_Identifier
+                                       | N_Defining_Character_Literal
+                                       | N_Defining_Operator_Symbol
                     and then Expander_Active
                   then
                      --  Inlining case: we are copying a tree that contains
@@ -8387,7 +8385,7 @@ package body Sem_Ch12 is
             Set_Assignment_OK (Name (New_N), True);
          end if;
 
-      elsif Nkind_In (N, N_Aggregate, N_Extension_Aggregate) then
+      elsif Nkind (N) in N_Aggregate | N_Extension_Aggregate then
          if not Instantiating then
             Set_Associated_Node (N, New_N);
 
@@ -8507,7 +8505,7 @@ package body Sem_Ch12 is
          --  Do not copy Comment or Ident pragmas their content is relevant to
          --  the generic unit, not to the instantiating unit.
 
-         if Nam_In (Pragma_Name_Unmapped (N), Name_Comment, Name_Ident) then
+         if Pragma_Name_Unmapped (N) in Name_Comment | Name_Ident then
             New_N := Make_Null_Statement (Sloc (N));
 
          --  Do not copy pragmas generated from aspects because the pragmas do
@@ -8527,7 +8525,7 @@ package body Sem_Ch12 is
             Copy_Descendants;
          end if;
 
-      elsif Nkind_In (N, N_Integer_Literal, N_Real_Literal) then
+      elsif Nkind (N) in N_Integer_Literal | N_Real_Literal then
 
          --  No descendant fields need traversing
 
@@ -9226,10 +9224,10 @@ package body Sem_Ch12 is
 
       else
          Inst := Next (Decl);
-         while not Nkind_In (Inst, N_Formal_Package_Declaration,
-                                   N_Function_Instantiation,
-                                   N_Package_Instantiation,
-                                   N_Procedure_Instantiation)
+         while Nkind (Inst) not in N_Formal_Package_Declaration
+                                 | N_Function_Instantiation
+                                 | N_Package_Instantiation
+                                 | N_Procedure_Instantiation
          loop
             Next (Inst);
          end loop;
@@ -9522,7 +9520,7 @@ package body Sem_Ch12 is
          while Present (P)
            and then Nkind (Parent (P)) /= N_Compilation_Unit
          loop
-            if Nkind_In (P, N_Package_Body, N_Subprogram_Body) then
+            if Nkind (P) in N_Package_Body | N_Subprogram_Body then
                if Nkind (Parent (P)) = N_Subunit then
                   return Corresponding_Stub (Parent (P));
                else
@@ -9620,8 +9618,8 @@ package body Sem_Ch12 is
                   --  the current scope as well.
 
                   elsif Present (Next (N))
-                    and then Nkind_In (Next (N), N_Subprogram_Body,
-                                                 N_Package_Body)
+                    and then Nkind (Next (N)) in N_Subprogram_Body
+                                               | N_Package_Body
                     and then Comes_From_Source (Next (N))
                   then
                      null;
@@ -9835,8 +9833,8 @@ package body Sem_Ch12 is
 
       Must_Delay :=
         (Gen_Unit = Act_Unit
-          and then (Nkind_In (Gen_Unit, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+          and then (Nkind (Gen_Unit) in N_Generic_Package_Declaration
+                                      | N_Package_Declaration
                      or else (Gen_Unit = Body_Unit
                                and then True_Sloc (N, Act_Unit) <
                                           Sloc (Orig_Body)))
@@ -9907,7 +9905,7 @@ package body Sem_Ch12 is
             --  Freeze package enclosing instance of inner generic after
             --  instance of enclosing generic.
 
-            elsif Nkind_In (Parent (N), N_Package_Body, N_Subprogram_Body)
+            elsif Nkind (Parent (N)) in N_Package_Body | N_Subprogram_Body
               and then In_Same_Declarative_Part
                          (Parent (Freeze_Node (Par)), Parent (N))
             then
@@ -10910,10 +10908,10 @@ package body Sem_Ch12 is
          end if;
 
          if (Present (Act_E) and then Is_Overloadable (Act_E))
-           or else Nkind_In (Act, N_Attribute_Reference,
-                                  N_Indexed_Component,
-                                  N_Character_Literal,
-                                  N_Explicit_Dereference)
+           or else Nkind (Act) in N_Attribute_Reference
+                                | N_Indexed_Component
+                                | N_Character_Literal
+                                | N_Explicit_Dereference
          then
             return;
          end if;
@@ -11012,10 +11010,10 @@ package body Sem_Ch12 is
          Nam := Actual;
 
       elsif Present (Default_Name (Formal)) then
-         if not Nkind_In (Default_Name (Formal), N_Attribute_Reference,
-                                                 N_Selected_Component,
-                                                 N_Indexed_Component,
-                                                 N_Character_Literal)
+         if Nkind (Default_Name (Formal)) not in N_Attribute_Reference
+                                               | N_Selected_Component
+                                               | N_Indexed_Component
+                                               | N_Character_Literal
            and then Present (Entity (Default_Name (Formal)))
          then
             Nam := New_Occurrence_Of (Entity (Default_Name (Formal)), Loc);
@@ -11588,8 +11586,8 @@ package body Sem_Ch12 is
 
       if Ada_Version >= Ada_2005
         and then Present (Actual_Decl)
-        and then Nkind_In (Actual_Decl, N_Formal_Object_Declaration,
-                                        N_Object_Declaration)
+        and then Nkind (Actual_Decl) in N_Formal_Object_Declaration
+                                      | N_Object_Declaration
         and then Nkind (Analyzed_Formal) = N_Formal_Object_Declaration
         and then not Has_Null_Exclusion (Actual_Decl)
         and then Has_Null_Exclusion (Analyzed_Formal)
@@ -12652,8 +12650,8 @@ package body Sem_Ch12 is
                                  Root_Type (Act_T)))
 
            or else
-             (Ekind_In (Gen_T, E_Anonymous_Access_Subprogram_Type,
-                               E_Anonymous_Access_Type)
+             (Ekind (Gen_T) in E_Anonymous_Access_Subprogram_Type
+                             | E_Anonymous_Access_Type
                and then Ekind (Act_T) = Ekind (Gen_T)
                and then Subtypes_Statically_Match
                           (Designated_Type (Gen_T), Designated_Type (Act_T)));
@@ -14052,8 +14050,8 @@ package body Sem_Ch12 is
             Set_Generic_Parent_Type (Decl_Node, Ancestor);
          end if;
 
-      elsif Nkind_In (Def, N_Formal_Private_Type_Definition,
-                           N_Formal_Incomplete_Type_Definition)
+      elsif Nkind (Def) in N_Formal_Private_Type_Definition
+                         | N_Formal_Incomplete_Type_Definition
       then
          Set_Generic_Parent_Type (Decl_Node, A_Gen_T);
       end if;
@@ -14204,8 +14202,8 @@ package body Sem_Ch12 is
             --  For a subprogram instantiation, omit instantiations intrinsic
             --  operations (Unchecked_Conversions, etc.) that have no bodies.
 
-            elsif Nkind_In (Decl, N_Function_Instantiation,
-                                  N_Procedure_Instantiation)
+            elsif Nkind (Decl) in N_Function_Instantiation
+                                | N_Procedure_Instantiation
               and then not Is_Intrinsic_Subprogram (Entity (Name (Decl)))
             then
                Append_Elmt (Decl, Previous_Instances);
@@ -14447,10 +14445,10 @@ package body Sem_Ch12 is
                                           (Last (Visible_Declarations
                                             (Specification (Info.Act_Decl))));
                               begin
-                                 while Nkind_In (Decl,
-                                   N_Null_Statement,
-                                   N_Pragma,
-                                   N_Subprogram_Renaming_Declaration)
+                                 while Nkind (Decl) in
+                                   N_Null_Statement                  |
+                                   N_Pragma                          |
+                                   N_Subprogram_Renaming_Declaration
                                  loop
                                     Decl := Prev (Decl);
                                  end loop;
@@ -15169,9 +15167,9 @@ package body Sem_Ch12 is
          --  explicitly now, in order to remain consistent with the view of the
          --  parent type.
 
-         if Ekind_In (Typ, E_Private_Type,
-                           E_Limited_Private_Type,
-                           E_Record_Type_With_Private)
+         if Ekind (Typ) in E_Private_Type
+                         | E_Limited_Private_Type
+                         | E_Record_Type_With_Private
          then
             Dep_Elmt := First_Elmt (Private_Dependents (Typ));
             while Present (Dep_Elmt) loop
@@ -15658,9 +15656,9 @@ package body Sem_Ch12 is
             --  preserve in this case, since the expansion will be redone in
             --  the instance.
 
-            if not Nkind_In (E, N_Defining_Character_Literal,
-                                N_Defining_Identifier,
-                                N_Defining_Operator_Symbol)
+            if Nkind (E) not in N_Defining_Character_Literal
+                              | N_Defining_Identifier
+                              | N_Defining_Operator_Symbol
             then
                Set_Associated_Node (N, Empty);
                Set_Etype (N, Empty);
@@ -15751,7 +15749,7 @@ package body Sem_Ch12 is
          --  its value. Otherwise the folding will happen in any instantiation.
 
          elsif Nkind (Parent (N)) = N_Selected_Component
-           and then Nkind_In (Parent (N2), N_Integer_Literal, N_Real_Literal)
+           and then Nkind (Parent (N2)) in N_Integer_Literal | N_Real_Literal
          then
             if Present (Entity (Original_Node (Parent (N2))))
               and then Is_Global (Entity (Original_Node (Parent (N2))))
@@ -16053,12 +16051,12 @@ package body Sem_Ch12 is
             --  global references within their aspects due to the timing of
             --  annotation analysis.
 
-            if Nkind_In (Nod, N_Generic_Package_Declaration,
-                              N_Generic_Subprogram_Declaration,
-                              N_Package_Body,
-                              N_Package_Body_Stub,
-                              N_Subprogram_Body,
-                              N_Subprogram_Body_Stub)
+            if Nkind (Nod) in N_Generic_Package_Declaration
+                            | N_Generic_Subprogram_Declaration
+                            | N_Package_Body
+                            | N_Package_Body_Stub
+                            | N_Subprogram_Body
+                            | N_Subprogram_Body_Stub
             then
                --  Since the capture of global references is done on the
                --  unanalyzed generic template, there is no information around
@@ -16248,7 +16246,7 @@ package body Sem_Ch12 is
                --  constant folding which will be repeated in the instance.
                --  Is this still needed???
 
-               elsif Nkind_In (N2, N_Integer_Literal, N_Real_Literal)
+               elsif Nkind (N2) in N_Integer_Literal | N_Real_Literal
                  and then Is_Entity_Name (Original_Node (N2))
                then
                   Set_Associated_Node (N, Original_Node (N2));
@@ -16350,9 +16348,9 @@ package body Sem_Ch12 is
 
                --  The operator was folded into a literal
 
-               elsif Nkind_In (N2, N_Integer_Literal,
-                                   N_Real_Literal,
-                                   N_String_Literal)
+               elsif Nkind (N2) in N_Integer_Literal
+                                 | N_Real_Literal
+                                 | N_String_Literal
                then
                   if Present (Original_Node (N2))
                     and then Nkind (Original_Node (N2)) = Nkind (N)
@@ -16462,12 +16460,12 @@ package body Sem_Ch12 is
 
          --  Aggregates
 
-         elsif Nkind_In (N, N_Aggregate, N_Extension_Aggregate) then
+         elsif Nkind (N) in N_Aggregate | N_Extension_Aggregate then
             Save_References_In_Aggregate (N);
 
          --  Character literals, operator symbols
 
-         elsif Nkind_In (N, N_Character_Literal, N_Operator_Symbol) then
+         elsif Nkind (N) in N_Character_Literal | N_Operator_Symbol then
             Save_References_In_Char_Lit_Or_Op_Symbol (N);
 
          --  Defining identifiers
index 6927d54fc5fb3ab7394a67962d859b0c6be5f1d1..30cade8d63ba59fb80fe68a4fec03b48de2040a1 100644 (file)
@@ -985,7 +985,7 @@ package body Sem_Ch13 is
             function Find_Type (N : Node_Id) return Traverse_Result is
             begin
                if N = Typ
-                 or else (Nkind_In (N, N_Identifier, N_Expanded_Name)
+                 or else (Nkind (N) in N_Identifier | N_Expanded_Name
                            and then Present (Entity (N))
                            and then Entity (N) = Typ)
                then
@@ -1587,11 +1587,11 @@ package body Sem_Ch13 is
          --    package body Pack is
          --       pragma Prag;
 
-         if Nkind_In (N, N_Entry_Body,
-                         N_Package_Body,
-                         N_Protected_Body,
-                         N_Subprogram_Body,
-                         N_Task_Body)
+         if Nkind (N) in N_Entry_Body
+                       | N_Package_Body
+                       | N_Protected_Body
+                       | N_Subprogram_Body
+                       | N_Task_Body
          then
             Decls := Declarations (N);
 
@@ -1611,8 +1611,8 @@ package body Sem_Ch13 is
          --    package Pack is
          --       pragma Prag;
 
-         elsif Nkind_In (N, N_Generic_Package_Declaration,
-                            N_Package_Declaration)
+         elsif Nkind (N) in N_Generic_Package_Declaration
+                          | N_Package_Declaration
          then
             Decls := Visible_Declarations (Specification (N));
 
@@ -2098,10 +2098,9 @@ package body Sem_Ch13 is
                   begin
                      while Present (Disc) loop
                         if Chars (Expr) = Chars (Disc)
-                          and then Ekind_In
-                            (Etype (Disc),
-                             E_Anonymous_Access_Subprogram_Type,
-                             E_Anonymous_Access_Type)
+                          and then Ekind (Etype (Disc)) in
+                            E_Anonymous_Access_Subprogram_Type |
+                            E_Anonymous_Access_Type
                         then
                            Set_Has_Implicit_Dereference (E);
                            Set_Has_Implicit_Dereference (Disc);
@@ -2169,7 +2168,7 @@ package body Sem_Ch13 is
                begin
                   --  The relaxed parameter is a formal parameter
 
-                  if Nkind_In (Param, N_Identifier, N_Expanded_Name) then
+                  if Nkind (Param) in N_Identifier | N_Expanded_Name then
                      Analyze (Param);
 
                      declare
@@ -2203,7 +2202,7 @@ package body Sem_Ch13 is
                      begin
                         if Present (Pref)
                           and then
-                            Nkind_In (Pref, N_Identifier, N_Expanded_Name)
+                            Nkind (Pref) in N_Identifier | N_Expanded_Name
                           and then
                             Entity (Pref) = Subp_Id
                         then
@@ -2586,11 +2585,11 @@ package body Sem_Ch13 is
             begin
                --  Check valid declarations for 'Yield
 
-               if (Nkind_In (N, N_Abstract_Subprogram_Declaration,
-                                N_Entry_Declaration,
-                                N_Generic_Subprogram_Declaration,
-                                N_Subprogram_Declaration)
-                     or else Nkind (N) in N_Formal_Subprogram_Declaration)
+               if Nkind (N) in N_Abstract_Subprogram_Declaration
+                             | N_Entry_Declaration
+                             | N_Generic_Subprogram_Declaration
+                             | N_Subprogram_Declaration
+                             | N_Formal_Subprogram_Declaration
                  and then not Within_Protected_Type (E)
                then
                   null;
@@ -3243,8 +3242,7 @@ package body Sem_Ch13 is
                   | Aspect_Interrupt_Priority
                   | Aspect_Priority
                =>
-                  if Nkind_In (N, N_Subprogram_Body,
-                                  N_Subprogram_Declaration)
+                  if Nkind (N) in N_Subprogram_Body | N_Subprogram_Declaration
                   then
                      --  Analyze the aspect expression
 
@@ -3434,8 +3432,8 @@ package body Sem_Ch13 is
                      Context := Instance_Spec (Context);
                   end if;
 
-                  if Nkind_In (Context, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+                  if Nkind (Context) in N_Generic_Package_Declaration
+                                      | N_Package_Declaration
                   then
                      Make_Aitem_Pragma
                        (Pragma_Argument_Associations => New_List (
@@ -3661,8 +3659,8 @@ package body Sem_Ch13 is
                      Context := Instance_Spec (Context);
                   end if;
 
-                  if Nkind_In (Context, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+                  if Nkind (Context) in N_Generic_Package_Declaration
+                                      | N_Package_Declaration
                   then
                      Make_Aitem_Pragma
                        (Pragma_Argument_Associations => New_List (
@@ -3709,8 +3707,8 @@ package body Sem_Ch13 is
                      Context := Instance_Spec (Context);
                   end if;
 
-                  if Nkind_In (Context, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+                  if Nkind (Context) in N_Generic_Package_Declaration
+                                      | N_Package_Declaration
                   then
                      Make_Aitem_Pragma
                        (Pragma_Argument_Associations => New_List (
@@ -3811,8 +3809,8 @@ package body Sem_Ch13 is
                --  Part_Of
 
                when Aspect_Part_Of =>
-                  if Nkind_In (N, N_Object_Declaration,
-                                  N_Package_Instantiation)
+                  if Nkind (N) in N_Object_Declaration
+                                | N_Package_Instantiation
                     or else Is_Single_Concurrent_Type_Declaration (N)
                   then
                      Make_Aitem_Pragma
@@ -4204,7 +4202,7 @@ package body Sem_Ch13 is
 
                   if Class_Present (Aspect)
                     and then Is_Concurrent_Type (Current_Scope)
-                    and then Ekind_In (E, E_Entry, E_Function, E_Procedure)
+                    and then Ekind (E) in E_Entry | E_Function | E_Procedure
                   then
                      Error_Msg_Name_1 := Original_Aspect_Pragma_Name (Aspect);
                      Error_Msg_N
@@ -4449,8 +4447,8 @@ package body Sem_Ch13 is
 
                   if A_Id in Library_Unit_Aspects
                     and then
-                      Nkind_In (N, N_Package_Declaration,
-                                   N_Generic_Package_Declaration)
+                      Nkind (N) in N_Package_Declaration
+                                 | N_Generic_Package_Declaration
                     and then Nkind (Parent (N)) /= N_Compilation_Unit
 
                     --  Aspect is legal on a local instantiation of a library-
@@ -4672,7 +4670,7 @@ package body Sem_Ch13 is
             --  When delay is not required and the context is a package or a
             --  subprogram body, insert the pragma in the body declarations.
 
-            elsif Nkind_In (N, N_Package_Body, N_Subprogram_Body) then
+            elsif Nkind (N) in N_Package_Body | N_Subprogram_Body then
                if No (Declarations (N)) then
                   Set_Declarations (N, New_List);
                end if;
@@ -6000,7 +5998,7 @@ package body Sem_Ch13 is
             if Ignore_Rep_Clauses then
                Set_Address_Taken (U_Ent);
 
-               if Ekind_In (U_Ent, E_Variable, E_Constant) then
+               if Ekind (U_Ent) in E_Variable | E_Constant then
                   Record_Rep_Item (U_Ent, N);
                end if;
 
@@ -6079,7 +6077,7 @@ package body Sem_Ch13 is
 
             --  Case of address clause for an object
 
-            elsif Ekind_In (U_Ent, E_Constant, E_Variable) then
+            elsif Ekind (U_Ent) in E_Constant | E_Variable then
                declare
                   Expr  : constant Node_Id := Expression (N);
                   O_Ent : Entity_Id;
@@ -7183,7 +7181,7 @@ package body Sem_Ch13 is
                   Nam);
                return;
 
-            elsif not Ekind_In (U_Ent, E_Access_Type, E_General_Access_Type)
+            elsif Ekind (U_Ent) not in E_Access_Type | E_General_Access_Type
             then
                Error_Msg_N
                  ("storage pool can only be given for access types", Nam);
@@ -7586,10 +7584,10 @@ package body Sem_Ch13 is
          while Present (Decl) loop
             DeclO := Original_Node (Decl);
             if Comes_From_Source (DeclO)
-              and not Nkind_In (DeclO, N_Pragma,
-                                       N_Use_Package_Clause,
-                                       N_Use_Type_Clause,
-                                       N_Implicit_Label_Declaration)
+              and Nkind (DeclO) not in N_Pragma
+                                     | N_Use_Package_Clause
+                                     | N_Use_Type_Clause
+                                     | N_Implicit_Label_Declaration
             then
                Error_Msg_N
                  ("this declaration not allowed in machine code subprogram",
@@ -7618,9 +7616,8 @@ package body Sem_Ch13 is
                null;
 
             elsif Comes_From_Source (StmtO)
-              and then not Nkind_In (StmtO, N_Pragma,
-                                            N_Label,
-                                            N_Code_Statement)
+              and then Nkind (StmtO) not in
+                         N_Pragma | N_Label | N_Code_Statement
             then
                Error_Msg_N
                  ("this statement is not allowed in machine code subprogram",
@@ -9142,7 +9139,7 @@ package body Sem_Ch13 is
 
          --  Identifier (other than static expression) case
 
-         else pragma Assert (Nkind_In (N, N_Expanded_Name, N_Identifier));
+         else pragma Assert (Nkind (N) in N_Expanded_Name | N_Identifier);
 
             --  Type case
 
@@ -10001,11 +9998,10 @@ package body Sem_Ch13 is
                -------------------------------------
 
                function Reset_Quantified_Variable_Scope
-                 (N : Node_Id) return Traverse_Result
-               is
+                 (N : Node_Id) return Traverse_Result is
                begin
-                  if Nkind_In (N, N_Iterator_Specification,
-                                  N_Loop_Parameter_Specification)
+                  if Nkind (N) in N_Iterator_Specification
+                                | N_Loop_Parameter_Specification
                   then
                      Set_Scope (Defining_Identifier (N),
                        Predicate_Function (Typ));
@@ -10983,12 +10979,12 @@ package body Sem_Ch13 is
 
                --  Otherwise look at the identifier and see if it is OK
 
-               if Ekind_In (Ent, E_Named_Integer, E_Named_Real)
+               if Ekind (Ent) in E_Named_Integer | E_Named_Real
                  or else Is_Type (Ent)
                then
                   return;
 
-               elsif Ekind_In (Ent, E_Constant, E_In_Parameter) then
+               elsif Ekind (Ent) in E_Constant | E_In_Parameter then
 
                   --  This is the case where we must have Ent defined before
                   --  U_Ent. Clearly if they are in different units this
@@ -11070,10 +11066,10 @@ package body Sem_Ch13 is
                Check_Expr_Constants (Prefix (Nod));
 
             when N_Attribute_Reference =>
-               if Nam_In (Attribute_Name (Nod), Name_Address,
-                                                Name_Access,
-                                                Name_Unchecked_Access,
-                                                Name_Unrestricted_Access)
+               if Attribute_Name (Nod) in Name_Address
+                                        | Name_Access
+                                        | Name_Unchecked_Access
+                                        | Name_Unrestricted_Access
                then
                   Check_At_Constant_Address (Prefix (Nod));
 
@@ -11292,7 +11288,7 @@ package body Sem_Ch13 is
             --  record, both at location zero. This seems a bit strange, but
             --  it seems to happen in some circumstances, perhaps on an error.
 
-            if Nam_In (Chars (C1_Ent), Name_uTag, Name_uTag) then
+            if Chars (C1_Ent) = Name_uTag then
                return;
             end if;
 
@@ -11687,7 +11683,7 @@ package body Sem_Ch13 is
             Parent_Last_Bit := UI_From_Int (System_Address_Size - 1);
             Pcomp := First_Entity (Tagged_Parent);
             while Present (Pcomp) loop
-               if Ekind_In (Pcomp, E_Discriminant, E_Component) then
+               if Ekind (Pcomp) in E_Discriminant | E_Component then
                   if Component_Bit_Offset (Pcomp) /= No_Uint
                     and then Known_Static_Esize (Pcomp)
                   then
@@ -11919,7 +11915,7 @@ package body Sem_Ch13 is
             --  This latter test is repeated recursively up the variant tree.
 
             Main_Component_Loop : while Present (C1_Ent) loop
-               if not Ekind_In (C1_Ent, E_Component, E_Discriminant) then
+               if Ekind (C1_Ent) not in E_Component | E_Discriminant then
                   goto Continue_Main_Component_Loop;
                end if;
 
@@ -11950,8 +11946,8 @@ package body Sem_Ch13 is
                   --  but be careful not to flag a non-girder discriminant
                   --  and the girder discriminant it renames as overlapping.
 
-                  if Nkind_In (Clist, N_Full_Type_Declaration,
-                                      N_Private_Type_Declaration)
+                  if Nkind (Clist) in N_Full_Type_Declaration
+                                    | N_Private_Type_Declaration
                   then
                      if Has_Discriminants (Defining_Identifier (Clist)) then
                         C2_Ent :=
@@ -12306,7 +12302,7 @@ package body Sem_Ch13 is
             --  The subprogram is inherited (implicitly declared), it does not
             --  override and does not cover a primitive of an interface.
 
-            if Ekind_In (Subp_Id, E_Function, E_Procedure)
+            if Ekind (Subp_Id) in E_Function | E_Procedure
               and then Present (Alias (Subp_Id))
               and then No (Interface_Alias (Subp_Id))
               and then No (Overridden_Operation (Subp_Id))
@@ -13062,9 +13058,8 @@ package body Sem_Ch13 is
             return Entity (Rep_Item);
 
          else
-            pragma Assert (Nkind_In (Rep_Item,
-                                     N_Attribute_Definition_Clause,
-                                     N_Pragma));
+            pragma Assert
+              (Nkind (Rep_Item) in N_Attribute_Definition_Clause | N_Pragma);
             return Entity (Name (Rep_Item));
          end if;
       end Rep_Item_Entity;
@@ -13488,7 +13483,7 @@ package body Sem_Ch13 is
       --  20. A call to a predefined boolean logical operator, where each
       --  operand is predicate-static.
 
-      elsif (Nkind_In (Expr, N_Op_And, N_Op_Or, N_Op_Xor)
+      elsif (Nkind (Expr) in N_Op_And | N_Op_Or | N_Op_Xor
               and then Is_Predicate_Static (Left_Opnd (Expr), Nam)
               and then Is_Predicate_Static (Right_Opnd (Expr), Nam))
         or else
@@ -14352,7 +14347,7 @@ package body Sem_Ch13 is
          --  A self-referential aspect is illegal if it forces freezing the
          --  entity before the corresponding pragma has been analyzed.
 
-         if Nkind_In (N, N_Attribute_Definition_Clause, N_Pragma)
+         if Nkind (N) in N_Attribute_Definition_Clause | N_Pragma
            and then From_Aspect_Specification (N)
          then
             Error_Msg_NE
@@ -14478,8 +14473,8 @@ package body Sem_Ch13 is
          declare
             Pname : constant Name_Id := Pragma_Name (N);
          begin
-            if Nam_In (Pname, Name_Convention, Name_Import,   Name_Export,
-                              Name_External,   Name_Interface)
+            if Pname in Name_Convention | Name_Import | Name_Export
+                      | Name_External   | Name_Interface
             then
                return False;
             end if;
index 6cc315ce40ea6f32cba79f581c1453e0ba881b4e..96f05a5eb28243cd6f4999f04814e3431d3be1c2 100644 (file)
@@ -751,8 +751,8 @@ package body Sem_Ch3 is
       --  function, scope is the current one, because it is the one of the
       --  current type declaration, except for the pathological case below.
 
-      if Nkind_In (Related_Nod, N_Object_Declaration,
-                                N_Access_Function_Definition)
+      if Nkind (Related_Nod) in
+           N_Object_Declaration | N_Access_Function_Definition
       then
          Anon_Scope := Current_Scope;
 
@@ -765,8 +765,8 @@ package body Sem_Ch3 is
 
          begin
             Par := Related_Nod;
-            while Nkind_In (Par, N_Access_Function_Definition,
-                                 N_Access_Definition)
+            while Nkind (Par) in
+                    N_Access_Function_Definition | N_Access_Definition
             loop
                Par := Parent (Par);
             end loop;
@@ -1078,20 +1078,18 @@ package body Sem_Ch3 is
       --                                   (Z : access T)))
 
       D_Ityp := Associated_Node_For_Itype (Desig_Type);
-      while not (Nkind_In (D_Ityp, N_Full_Type_Declaration,
-                                   N_Private_Type_Declaration,
-                                   N_Private_Extension_Declaration,
-                                   N_Procedure_Specification,
-                                   N_Function_Specification,
-                                   N_Entry_Body)
-
-                   or else
-                 Nkind_In (D_Ityp, N_Object_Declaration,
-                                   N_Object_Renaming_Declaration,
-                                   N_Formal_Object_Declaration,
-                                   N_Formal_Type_Declaration,
-                                   N_Task_Type_Declaration,
-                                   N_Protected_Type_Declaration))
+      while Nkind (D_Ityp) not in N_Full_Type_Declaration
+                                | N_Private_Type_Declaration
+                                | N_Private_Extension_Declaration
+                                | N_Procedure_Specification
+                                | N_Function_Specification
+                                | N_Entry_Body
+                                | N_Object_Declaration
+                                | N_Object_Renaming_Declaration
+                                | N_Formal_Object_Declaration
+                                | N_Formal_Type_Declaration
+                                | N_Task_Type_Declaration
+                                | N_Protected_Type_Declaration
       loop
          D_Ityp := Parent (D_Ityp);
          pragma Assert (D_Ityp /= Empty);
@@ -1099,15 +1097,14 @@ package body Sem_Ch3 is
 
       Set_Associated_Node_For_Itype (Desig_Type, D_Ityp);
 
-      if Nkind_In (D_Ityp, N_Procedure_Specification,
-                           N_Function_Specification)
+      if Nkind (D_Ityp) in N_Procedure_Specification | N_Function_Specification
       then
          Set_Scope (Desig_Type, Scope (Defining_Entity (D_Ityp)));
 
-      elsif Nkind_In (D_Ityp, N_Full_Type_Declaration,
-                              N_Object_Declaration,
-                              N_Object_Renaming_Declaration,
-                              N_Formal_Type_Declaration)
+      elsif Nkind (D_Ityp) in N_Full_Type_Declaration
+                            | N_Object_Declaration
+                            | N_Object_Renaming_Declaration
+                            | N_Formal_Type_Declaration
       then
          Set_Scope (Desig_Type, Scope (Defining_Identifier (D_Ityp)));
       end if;
@@ -2349,9 +2346,9 @@ package body Sem_Ch3 is
                --  because they have already been resolved.
 
                elsif Decls = Visible_Declarations (Context)
-                 and then Ekind_In (Typ, E_Limited_Private_Type,
-                                         E_Private_Type,
-                                         E_Record_Type_With_Private)
+                 and then Ekind (Typ) in E_Limited_Private_Type
+                                       | E_Private_Type
+                                       | E_Record_Type_With_Private
                  and then Has_Own_Invariants (Typ)
                then
                   Build_Invariant_Procedure_Body
@@ -2496,9 +2493,9 @@ package body Sem_Ch3 is
          --  controlled primitives.
 
          if Nkind (Body_Spec) /= N_Procedure_Specification
-           or else not Nam_In (Chars (Body_Id), Name_Adjust,
-                                                Name_Finalize,
-                                                Name_Initialize)
+           or else Chars (Body_Id) not in Name_Adjust
+                                        | Name_Finalize
+                                        | Name_Initialize
          then
             return;
 
@@ -2533,7 +2530,7 @@ package body Sem_Ch3 is
          Spec_Id := Current_Entity (Body_Id);
 
          while Present (Spec_Id) loop
-            if Ekind_In (Spec_Id, E_Procedure, E_Generic_Procedure)
+            if Ekind (Spec_Id) in E_Procedure | E_Generic_Procedure
               and then Scope (Spec_Id) = Current_Scope
               and then Present (First_Formal (Spec_Id))
               and then No (Next_Formal (First_Formal (Spec_Id)))
@@ -2672,8 +2669,8 @@ package body Sem_Ch3 is
             if Nkind (Parent (L)) = N_Component_List then
                null;
 
-            elsif Nkind_In (Parent (L), N_Protected_Definition,
-                                        N_Task_Definition)
+            elsif Nkind (Parent (L)) in
+                    N_Protected_Definition | N_Task_Definition
             then
                Check_Entry_Contracts;
 
@@ -3613,7 +3610,7 @@ package body Sem_Ch3 is
          return;
       end if;
 
-      if Nkind_In (E, N_Integer_Literal, N_Real_Literal) then
+      if Nkind (E) in N_Integer_Literal | N_Real_Literal then
          Set_Etype (E, Etype (Id));
       end if;
 
@@ -5086,7 +5083,7 @@ package body Sem_Ch3 is
            ("parent of type extension must be a tagged type ", Indic);
          goto Leave;
 
-      elsif Ekind_In (Parent_Type, E_Void, E_Incomplete_Type) then
+      elsif Ekind (Parent_Type) in E_Void | E_Incomplete_Type then
          Error_Msg_N ("premature derivation of incomplete type", Indic);
          goto Leave;
 
@@ -6436,7 +6433,7 @@ package body Sem_Ch3 is
 
       Mark_Rewrite_Insertion (Comp);
 
-      if Nkind_In (N, N_Object_Declaration, N_Access_Function_Definition)
+      if Nkind (N) in N_Object_Declaration | N_Access_Function_Definition
         or else (Nkind (Parent (N)) = N_Full_Type_Declaration
                   and then not Is_Type (Current_Scope))
       then
@@ -6512,10 +6509,10 @@ package body Sem_Ch3 is
       end Replace_Type_Name;
 
    begin
-      if Ekind_In (Id, E_Access_Subprogram_Type,
-         E_Access_Protected_Subprogram_Type,
-         E_Anonymous_Access_Protected_Subprogram_Type,
-         E_Anonymous_Access_Subprogram_Type)
+      if Ekind (Id) in E_Access_Subprogram_Type
+                     | E_Access_Protected_Subprogram_Type
+                     | E_Anonymous_Access_Protected_Subprogram_Type
+                     | E_Anonymous_Access_Subprogram_Type
       then
          null;
 
@@ -10478,9 +10475,9 @@ package body Sem_Ch3 is
          --  build-in-place library function, child unit or not.
 
          if (Nkind (Nod) in N_Entity and then Is_Compilation_Unit (Nod))
-           or else (Nkind_In (Nod, N_Defining_Program_Unit_Name,
-                                   N_Subprogram_Declaration)
-                      and then Is_Compilation_Unit (Defining_Entity (Nod)))
+           or else (Nkind (Nod) in
+                      N_Defining_Program_Unit_Name | N_Subprogram_Declaration
+                     and then Is_Compilation_Unit (Defining_Entity (Nod)))
          then
             Add_Global_Declaration (IR);
          else
@@ -10510,7 +10507,7 @@ package body Sem_Ch3 is
 
       Analyze_And_Resolve (Bound, Base_Type (Par_T));
 
-      if Nkind_In (Bound, N_Integer_Literal, N_Real_Literal) then
+      if Nkind (Bound) in N_Integer_Literal | N_Real_Literal then
          New_Bound := New_Copy (Bound);
          Set_Etype (New_Bound, Der_T);
          Set_Analyzed (New_Bound);
@@ -11541,7 +11538,7 @@ package body Sem_Ch3 is
 
       begin
          if not Comes_From_Source (E) then
-            if Ekind_In (E, E_Task_Type, E_Protected_Type) then
+            if Ekind (E) in E_Task_Type | E_Protected_Type then
 
                --  It may be an anonymous protected type created for a
                --  single variable. Post error on variable, if present.
@@ -11671,10 +11668,10 @@ package body Sem_Ch3 is
          --  this kind is reserved for predefined operators, that are
          --  intrinsic and do not need completion.
 
-         elsif Ekind_In (E, E_Function,
-                            E_Procedure,
-                            E_Generic_Function,
-                            E_Generic_Procedure)
+         elsif Ekind (E) in E_Function
+                          | E_Procedure
+                          | E_Generic_Function
+                          | E_Generic_Procedure
          then
             if Has_Completion (E) then
                null;
@@ -11733,7 +11730,7 @@ package body Sem_Ch3 is
                Post_Error;
             end if;
 
-         elsif Ekind_In (E, E_Task_Type, E_Protected_Type) then
+         elsif Ekind (E) in E_Task_Type | E_Protected_Type then
             if not Has_Completion (E) then
                Post_Error;
             end if;
@@ -14615,7 +14612,7 @@ package body Sem_Ch3 is
          if Is_Tagged_Type (Typ) or else Has_Controlled_Component (Typ) then
             Old_C := First_Component (Typ);
             while Present (Old_C) loop
-               if Nam_In (Chars (Old_C), Name_uTag, Name_uParent) then
+               if Chars (Old_C) in Name_uTag | Name_uParent then
                   Append_Elmt (Old_C, Comp_List);
                end if;
 
@@ -15460,9 +15457,9 @@ package body Sem_Ch3 is
         or else Is_Private_Overriding
         or else Is_Internal_Name (Chars (Parent_Subp))
         or else (Is_Controlled (Parent_Type)
-                  and then Nam_In (Chars (Parent_Subp), Name_Adjust,
-                                                        Name_Finalize,
-                                                        Name_Initialize))
+                  and then Chars (Parent_Subp) in Name_Adjust
+                                                | Name_Finalize
+                                                | Name_Initialize)
       then
          Set_Derived_Name;
 
@@ -15661,9 +15658,9 @@ package body Sem_Ch3 is
       --  set on both views of the type.
 
       if Is_Controlled (Parent_Type)
-        and then Nam_In (Chars (Parent_Subp), Name_Initialize,
-                                              Name_Adjust,
-                                              Name_Finalize)
+        and then Chars (Parent_Subp) in Name_Initialize
+                                      | Name_Adjust
+                                      | Name_Finalize
         and then Is_Hidden (Parent_Subp)
         and then not Is_Visibly_Controlled (Parent_Type)
       then
@@ -16882,7 +16879,7 @@ package body Sem_Ch3 is
 
       --  Check for early use of incomplete or private type
 
-      if Ekind_In (Parent_Type, E_Void, E_Incomplete_Type) then
+      if Ekind (Parent_Type) in E_Void | E_Incomplete_Type then
          Error_Msg_N ("premature derivation of incomplete type", Indic);
          return;
 
@@ -17419,14 +17416,14 @@ package body Sem_Ch3 is
 
          --  Check invalid completion of private or incomplete type
 
-         elsif not Nkind_In (N, N_Full_Type_Declaration,
-                                N_Task_Type_Declaration,
-                                N_Protected_Type_Declaration)
+         elsif Nkind (N) not in N_Full_Type_Declaration
+                              | N_Task_Type_Declaration
+                              | N_Protected_Type_Declaration
            and then
              (Ada_Version < Ada_2012
                or else not Is_Incomplete_Type (Prev)
-               or else not Nkind_In (N, N_Private_Type_Declaration,
-                                        N_Private_Extension_Declaration))
+               or else Nkind (N) not in N_Private_Type_Declaration
+                                      | N_Private_Extension_Declaration)
          then
             --  Completion must be a full type declarations (RM 7.3(4))
 
@@ -17503,9 +17500,8 @@ package body Sem_Ch3 is
             end if;
 
             if Nkind (N) = N_Full_Type_Declaration
-              and then Nkind_In
-                         (Type_Definition (N), N_Record_Definition,
-                                               N_Derived_Type_Definition)
+              and then Nkind (Type_Definition (N)) in
+                         N_Record_Definition | N_Derived_Type_Definition
               and then Interface_Present (Type_Definition (N))
             then
                Error_Msg_N
@@ -17522,15 +17518,15 @@ package body Sem_Ch3 is
                   New_Id := Id;
 
                elsif Ekind (Prev) = E_Private_Type
-                 and then Nkind_In (N, N_Task_Type_Declaration,
-                                       N_Protected_Type_Declaration)
+                 and then Nkind (N) in N_Task_Type_Declaration
+                                     | N_Protected_Type_Declaration
                then
                   Error_Msg_N
                    ("completion of nonlimited type cannot be limited", N);
 
                elsif Ekind (Prev) = E_Record_Type_With_Private
-                 and then Nkind_In (N, N_Task_Type_Declaration,
-                                       N_Protected_Type_Declaration)
+                 and then Nkind (N) in N_Task_Type_Declaration
+                                     | N_Protected_Type_Declaration
                then
                   if not Is_Limited_Record (Prev) then
                      Error_Msg_N
@@ -17547,8 +17543,8 @@ package body Sem_Ch3 is
             --  type or a protected type. This case arises when covering
             --  interface types.
 
-            elsif Nkind_In (N, N_Task_Type_Declaration,
-                               N_Protected_Type_Declaration)
+            elsif Nkind (N) in N_Task_Type_Declaration
+                             | N_Protected_Type_Declaration
             then
                null;
 
@@ -17645,8 +17641,8 @@ package body Sem_Ch3 is
 
             if Ada_Version >= Ada_2012
               and then Is_Incomplete_Type (Prev)
-              and then Nkind_In (N, N_Private_Type_Declaration,
-                                    N_Private_Extension_Declaration)
+              and then Nkind (N) in N_Private_Type_Declaration
+                                  | N_Private_Extension_Declaration
             then
                --  No need to check private extensions since they are tagged
 
@@ -17660,8 +17656,8 @@ package body Sem_Ch3 is
             --  a synchronized type that implements interfaces) or a
             --  type extension, otherwise this is an error.
 
-            elsif Nkind_In (N, N_Task_Type_Declaration,
-                               N_Protected_Type_Declaration)
+            elsif Nkind (N) in N_Task_Type_Declaration
+                             | N_Protected_Type_Declaration
             then
                if No (Interface_List (N)) and then not Error_Posted (N) then
                   Tag_Mismatch;
@@ -17729,8 +17725,8 @@ package body Sem_Ch3 is
 
       --  Case of an anonymous array subtype
 
-      if Nkind_In (Def_Kind, N_Constrained_Array_Definition,
-                             N_Unconstrained_Array_Definition)
+      if Def_Kind in
+           N_Constrained_Array_Definition | N_Unconstrained_Array_Definition
       then
          T := Empty;
          Array_Type_Declaration (T, Obj_Def);
@@ -18669,8 +18665,7 @@ package body Sem_Ch3 is
          then
             null;
 
-         elsif Ekind_In (Derived_Base, E_Private_Type,
-                                       E_Limited_Private_Type)
+         elsif Ekind (Derived_Base) in E_Private_Type | E_Limited_Private_Type
          then
             null;
 
@@ -18814,16 +18809,13 @@ package body Sem_Ch3 is
             return Constraint_Kind = N_Range_Constraint;
 
          when Decimal_Fixed_Point_Kind =>
-            return Nkind_In (Constraint_Kind, N_Digits_Constraint,
-                                              N_Range_Constraint);
+            return Constraint_Kind in N_Digits_Constraint | N_Range_Constraint;
 
          when Ordinary_Fixed_Point_Kind =>
-            return Nkind_In (Constraint_Kind, N_Delta_Constraint,
-                                              N_Range_Constraint);
+            return Constraint_Kind in N_Delta_Constraint | N_Range_Constraint;
 
          when Float_Kind =>
-            return Nkind_In (Constraint_Kind, N_Digits_Constraint,
-                                              N_Range_Constraint);
+            return Constraint_Kind in N_Digits_Constraint | N_Range_Constraint;
 
          when Access_Kind
             | Array_Kind
@@ -18883,7 +18875,7 @@ package body Sem_Ch3 is
    --  Start of processing for Is_Visible_Component
 
    begin
-      if Ekind_In (C, E_Component, E_Discriminant) then
+      if Ekind (C) in E_Component | E_Discriminant then
          Original_Comp := Original_Record_Component (C);
       end if;
 
@@ -20709,9 +20701,9 @@ package body Sem_Ch3 is
             Priv := Node (Priv_Elmt);
             Priv_Scop := Scope (Priv);
 
-            if Ekind_In (Priv, E_Private_Subtype,
-                               E_Limited_Private_Subtype,
-                               E_Record_Subtype_With_Private)
+            if Ekind (Priv) in E_Private_Subtype
+                             | E_Limited_Private_Subtype
+                             | E_Record_Subtype_With_Private
             then
                Full := Make_Defining_Identifier (Sloc (Priv), Chars (Priv));
                Set_Is_Itype (Full);
@@ -20882,7 +20874,7 @@ package body Sem_Ch3 is
 
                Prim := Next_Entity (Full_T);
                while Present (Prim) and then Prim /= Priv_T loop
-                  if Ekind_In (Prim, E_Procedure, E_Function) then
+                  if Ekind (Prim) in E_Procedure | E_Function then
                      Disp_Typ := Find_Dispatching_Type (Prim);
 
                      if Disp_Typ = Full_T
@@ -21336,17 +21328,16 @@ package body Sem_Ch3 is
                   exit when
                     Nkind (Insert_Node) in N_Declaration
                     and then
-                      not Nkind_In
-                        (Insert_Node, N_Component_Declaration,
-                                      N_Loop_Parameter_Specification,
-                                      N_Function_Specification,
-                                      N_Procedure_Specification);
-
-                  exit when Nkind (Insert_Node) in N_Later_Decl_Item
-                    or else Nkind (Insert_Node) in
-                              N_Statement_Other_Than_Procedure_Call
-                    or else Nkind_In (Insert_Node, N_Procedure_Call_Statement,
-                                                   N_Pragma);
+                      Nkind (Insert_Node) not in N_Component_Declaration
+                                               | N_Loop_Parameter_Specification
+                                               | N_Function_Specification
+                                               | N_Procedure_Specification;
+
+                  exit when Nkind (Insert_Node) in
+                              N_Later_Decl_Item                     |
+                              N_Statement_Other_Than_Procedure_Call |
+                              N_Procedure_Call_Statement            |
+                              N_Pragma;
 
                   Insert_Node := Parent (Insert_Node);
                end loop;
@@ -21560,20 +21551,19 @@ package body Sem_Ch3 is
          --  The following is ugly, can't we have a range or even a flag???
 
          May_Have_Null_Exclusion :=
-           Nkind_In (P, N_Access_Definition,
-                        N_Access_Function_Definition,
-                        N_Access_Procedure_Definition,
-                        N_Access_To_Object_Definition,
-                        N_Allocator,
-                        N_Component_Definition)
-             or else
-           Nkind_In (P, N_Derived_Type_Definition,
-                        N_Discriminant_Specification,
-                        N_Formal_Object_Declaration,
-                        N_Object_Declaration,
-                        N_Object_Renaming_Declaration,
-                        N_Parameter_Specification,
-                        N_Subtype_Declaration);
+           Nkind (P) in N_Access_Definition
+                      | N_Access_Function_Definition
+                      | N_Access_Procedure_Definition
+                      | N_Access_To_Object_Definition
+                      | N_Allocator
+                      | N_Component_Definition
+                      | N_Derived_Type_Definition
+                      | N_Discriminant_Specification
+                      | N_Formal_Object_Declaration
+                      | N_Object_Declaration
+                      | N_Object_Renaming_Declaration
+                      | N_Parameter_Specification
+                      | N_Subtype_Declaration;
 
          --  Create an Itype that is a duplicate of Entity (S) but with the
          --  null-exclusion attribute.
index 76ce11d1fd538063f9cc02c0a317c97aca248d38..c92fb0674ba44de7f6383391ff4ca1e75fb99a18 100644 (file)
@@ -380,7 +380,7 @@ package body Sem_Ch4 is
       if Nkind (N) in N_Membership_Test then
          Error_Msg_N ("ambiguous operands for membership",  N);
 
-      elsif Nkind_In (N, N_Op_Eq, N_Op_Ne) then
+      elsif Nkind (N) in N_Op_Eq | N_Op_Ne then
          Error_Msg_N ("ambiguous operands for equality",  N);
 
       else
@@ -1063,8 +1063,8 @@ package body Sem_Ch4 is
                      --  performing the writable actuals check.
 
                      if Has_Arbitrary_Evaluation_Order (Nkind (P))
-                       and then not Nkind_In (P, N_Assignment_Statement,
-                                                 N_Object_Declaration)
+                       and then Nkind (P) not in
+                                  N_Assignment_Statement | N_Object_Declaration
                      then
                         Outermost := P;
                      end if;
@@ -1073,8 +1073,8 @@ package body Sem_Ch4 is
 
                      exit when Stop_Subtree_Climbing (Nkind (P))
                        or else (Nkind (P) = N_Range
-                                 and then not
-                                   Nkind_In (Parent (P), N_In, N_Not_In));
+                                 and then
+                                   Nkind (Parent (P)) not in N_In | N_Not_In);
 
                      P := Parent (P);
                   end loop;
@@ -1124,8 +1124,7 @@ package body Sem_Ch4 is
          --  Check for tasking cases where only an entry call will do
 
          elsif not L
-           and then Nkind_In (K, N_Entry_Call_Alternative,
-                                 N_Triggering_Alternative)
+           and then K in N_Entry_Call_Alternative | N_Triggering_Alternative
          then
             Error_Msg_N ("entry name expected", Nam);
 
@@ -1185,10 +1184,10 @@ package body Sem_Ch4 is
          elsif Nkind (Nam) = N_Selected_Component then
             Nam_Ent := Entity (Selector_Name (Nam));
 
-            if not Ekind_In (Nam_Ent, E_Entry,
-                                      E_Entry_Family,
-                                      E_Function,
-                                      E_Procedure)
+            if Ekind (Nam_Ent) not in E_Entry
+                                    | E_Entry_Family
+                                    | E_Function
+                                    | E_Procedure
             then
                Error_Msg_N ("name in call is not a callable entity", Nam);
                Set_Etype (N, Any_Type);
@@ -1363,7 +1362,7 @@ package body Sem_Ch4 is
                   Set_Etype (Nam, It.Typ);
                end if;
 
-            elsif Nkind_In (Name (N), N_Function_Call, N_Selected_Component)
+            elsif Nkind (Name (N)) in N_Function_Call | N_Selected_Component
             then
                Remove_Interp (X);
             end if;
@@ -3786,9 +3785,9 @@ package body Sem_Ch4 is
 
            --  Verify Nam is a non-visible controlled primitive
 
-           and then Nam_In (Chars (Nam), Name_Adjust,
-                                         Name_Finalize,
-                                         Name_Initialize)
+           and then Chars (Nam) in Name_Adjust
+                                 | Name_Finalize
+                                 | Name_Initialize
            and then Ekind (Nam) = E_Procedure
            and then Is_Controlled (Etype (First_Form))
            and then No (Next_Formal (First_Form))
@@ -4014,14 +4013,15 @@ package body Sem_Ch4 is
       Find_Type (Mark);
       T := Entity (Mark);
 
-      if Nkind_In (Enclosing_Declaration (N), N_Formal_Type_Declaration,
-                                              N_Full_Type_Declaration,
-                                              N_Incomplete_Type_Declaration,
-                                              N_Protected_Type_Declaration,
-                                              N_Private_Extension_Declaration,
-                                              N_Private_Type_Declaration,
-                                              N_Subtype_Declaration,
-                                              N_Task_Type_Declaration)
+      if Nkind (Enclosing_Declaration (N)) in
+           N_Formal_Type_Declaration       |
+           N_Full_Type_Declaration         |
+           N_Incomplete_Type_Declaration   |
+           N_Protected_Type_Declaration    |
+           N_Private_Extension_Declaration |
+           N_Private_Type_Declaration      |
+           N_Subtype_Declaration           |
+           N_Task_Type_Declaration
         and then T = Defining_Identifier (Enclosing_Declaration (N))
       then
          Error_Msg_N ("current instance not allowed", Mark);
@@ -4596,7 +4596,7 @@ package body Sem_Ch4 is
          elsif Is_Access_Type (Etype (Nod)) then
             return True;
 
-         elsif Nkind_In (Nod, N_Indexed_Component, N_Selected_Component) then
+         elsif Nkind (Nod) in N_Indexed_Component | N_Selected_Component then
             return Has_Dereference (Prefix (Nod));
 
          else
@@ -4615,10 +4615,10 @@ package body Sem_Ch4 is
 
       begin
          if Nkind (Parent (N)) = N_Attribute_Reference
-           and then Nam_In (Attribute_Name (Parent (N)),
-                      Name_Access,
-                      Name_Unchecked_Access,
-                      Name_Unrestricted_Access)
+           and then Attribute_Name (Parent (N)) in
+                      Name_Access
+                    | Name_Unchecked_Access
+                    | Name_Unrestricted_Access
            and then Is_Class_Wide_Type (Prefix_Type)
            and then (Is_Synchronized_Interface (Prefix_Type)
                        or else Is_Protected_Interface (Prefix_Type))
@@ -4873,10 +4873,10 @@ package body Sem_Ch4 is
                      or else
                       (Nkind (Parent_N) = N_Attribute_Reference
                         and then
-                          Nam_In (Attribute_Name (Parent_N), Name_First,
-                                                             Name_Last,
-                                                             Name_Length,
-                                                             Name_Range)))
+                          Attribute_Name (Parent_N) in Name_First
+                                                     | Name_Last
+                                                     | Name_Length
+                                                     | Name_Range))
                then
                   Set_Etype (N, Etype (Comp));
 
@@ -5057,9 +5057,9 @@ package body Sem_Ch4 is
                   --  a visible entity is found.
 
                   if Is_Tagged_Type (Prefix_Type)
-                    and then Nkind_In (Parent (N), N_Function_Call,
-                                                   N_Indexed_Component,
-                                                   N_Procedure_Call_Statement)
+                    and then Nkind (Parent (N)) in N_Function_Call
+                                                 | N_Indexed_Component
+                                                 | N_Procedure_Call_Statement
                     and then Has_Mode_Conformant_Spec (Comp)
                   then
                      Has_Candidate := True;
@@ -5068,7 +5068,7 @@ package body Sem_Ch4 is
                --  Note: a selected component may not denote a component of a
                --  protected type (4.1.3(7)).
 
-               elsif Ekind_In (Comp, E_Discriminant, E_Entry_Family)
+               elsif Ekind (Comp) in E_Discriminant | E_Entry_Family
                  or else (In_Scope
                             and then not Is_Protected_Type (Prefix_Type)
                             and then Is_Entity_Name (Name))
@@ -5657,9 +5657,9 @@ package body Sem_Ch4 is
          end if;
 
       elsif Nkind (Expr) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (Expr), Name_Access,
-                                                Name_Unchecked_Access,
-                                                Name_Unrestricted_Access)
+        and then Attribute_Name (Expr) in Name_Access
+                                        | Name_Unchecked_Access
+                                        | Name_Unrestricted_Access
       then
          Error_Msg_N ("argument of conversion cannot be access", N);
          Error_Msg_N ("\use qualified expression instead", N);
@@ -5921,7 +5921,7 @@ package body Sem_Ch4 is
    --  Start of processing for Check_Arithmetic_Pair
 
    begin
-      if Nam_In (Op_Name, Name_Op_Add, Name_Op_Subtract) then
+      if Op_Name in Name_Op_Add | Name_Op_Subtract then
          if Is_Numeric_Type (T1)
            and then Is_Numeric_Type (T2)
            and then (Covers (T1 => T1, T2 => T2)
@@ -5931,7 +5931,7 @@ package body Sem_Ch4 is
             Add_One_Interp (N, Op_Id, Specific_Type (T1, T2));
          end if;
 
-      elsif Nam_In (Op_Name, Name_Op_Multiply, Name_Op_Divide) then
+      elsif Op_Name in Name_Op_Multiply | Name_Op_Divide then
          if Is_Fixed_Point_Type (T1)
            and then (Is_Fixed_Point_Type (T2) or else T2 = Universal_Real)
          then
@@ -6229,7 +6229,7 @@ package body Sem_Ch4 is
 
          else
             while Present (It.Nam) loop
-               if Ekind_In (It.Nam, E_Function, E_Operator) then
+               if Ekind (It.Nam) in E_Function | E_Operator then
                   return;
                else
                   Get_Next_Interp (X, It);
@@ -6657,9 +6657,7 @@ package body Sem_Ch4 is
       procedure Check_Access_Attribute (N : Node_Id) is
       begin
          if Nkind (N) = N_Attribute_Reference
-           and then Nam_In (Attribute_Name (N),
-                            Name_Access,
-                            Name_Unchecked_Access)
+           and then Attribute_Name (N) in Name_Access | Name_Unchecked_Access
          then
             Error_Msg_N
               ("access attribute cannot be used as actual for "
@@ -7401,7 +7399,7 @@ package body Sem_Ch4 is
             --  pretty much know that the other operand should be Boolean, so
             --  resolve it that way (generating an error).
 
-            elsif Nkind_In (N, N_Op_And, N_Op_Or, N_Op_Xor) then
+            elsif Nkind (N) in N_Op_And | N_Op_Or | N_Op_Xor then
                if Etype (L) = Standard_Boolean then
                   Resolve (R, Standard_Boolean);
                   return;
@@ -7415,16 +7413,16 @@ package body Sem_Ch4 is
             --  is not the same numeric type. If it is a non-numeric type,
             --  then probably it is intended to match the other operand.
 
-            elsif Nkind_In (N, N_Op_Add,
-                               N_Op_Divide,
-                               N_Op_Ge,
-                               N_Op_Gt,
-                               N_Op_Le,
-                               N_Op_Lt,
-                               N_Op_Mod,
-                               N_Op_Multiply,
-                               N_Op_Rem,
-                               N_Op_Subtract)
+            elsif Nkind (N) in N_Op_Add
+                             | N_Op_Divide
+                             | N_Op_Ge
+                             | N_Op_Gt
+                             | N_Op_Le
+                             | N_Op_Lt
+                             | N_Op_Mod
+                             | N_Op_Multiply
+                             | N_Op_Rem
+                             | N_Op_Subtract
             then
                --  If Allow_Integer_Address is active, check whether the
                --  operation becomes legal after converting an operand.
@@ -7440,7 +7438,7 @@ package body Sem_Ch4 is
                        Unchecked_Convert_To (
                          Standard_Address, Relocate_Node (R)));
 
-                     if Nkind_In (N, N_Op_Ge, N_Op_Gt, N_Op_Le, N_Op_Lt) then
+                     if Nkind (N) in N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt then
                         Analyze_Comparison_Op (N);
                      else
                         Analyze_Arithmetic_Op (N);
@@ -7462,7 +7460,7 @@ package body Sem_Ch4 is
                        Unchecked_Convert_To (
                          Standard_Address, Relocate_Node (R)));
 
-                     if Nkind_In (N, N_Op_Ge, N_Op_Gt, N_Op_Le, N_Op_Lt) then
+                     if Nkind (N) in N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt then
                         Analyze_Comparison_Op (N);
                      else
                         Analyze_Arithmetic_Op (N);
@@ -7492,7 +7490,7 @@ package body Sem_Ch4 is
                        Unchecked_Convert_To (
                          Standard_Address, Relocate_Node (R)));
 
-                     if Nkind_In (N, N_Op_Ge, N_Op_Gt, N_Op_Le, N_Op_Lt) then
+                     if Nkind (N) in N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt then
                         Analyze_Comparison_Op (N);
                      else
                         Analyze_Arithmetic_Op (N);
@@ -7516,7 +7514,7 @@ package body Sem_Ch4 is
                elsif Null_To_Null_Address_Convert_OK (N) then
                   Replace_Null_By_Null_Address (N);
 
-                  if Nkind_In (N, N_Op_Ge, N_Op_Gt, N_Op_Le, N_Op_Lt) then
+                  if Nkind (N) in N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt then
                      Analyze_Comparison_Op (N);
                   else
                      Analyze_Arithmetic_Op (N);
@@ -7528,7 +7526,7 @@ package body Sem_Ch4 is
             --  Comparisons on A'Access are common enough to deserve a
             --  special message.
 
-            elsif Nkind_In (N, N_Op_Eq, N_Op_Ne)
+            elsif Nkind (N) in N_Op_Eq | N_Op_Ne
                and then Ekind (Etype (L)) = E_Access_Attribute_Type
                and then Ekind (Etype (R)) = E_Access_Attribute_Type
             then
@@ -7586,7 +7584,7 @@ package body Sem_Ch4 is
 
                return;
 
-            elsif Nkind_In (N, N_Op_Eq, N_Op_Ne) then
+            elsif Nkind (N) in N_Op_Eq | N_Op_Ne then
                if Address_Integer_Convert_OK (Etype (R), Etype (L)) then
                   Rewrite (L,
                     Unchecked_Convert_To (
@@ -7677,7 +7675,7 @@ package body Sem_Ch4 is
                            --  indicate that the integer operand should be of
                            --  type Integer.
 
-                           if Nkind_In (N, N_Op_Multiply, N_Op_Divide)
+                           if Nkind (N) in N_Op_Multiply | N_Op_Divide
                              and then Is_Fixed_Point_Type (Etype (L))
                              and then Is_Integer_Type (Etype (R))
                            then
@@ -8030,8 +8028,8 @@ package body Sem_Ch4 is
             --  resolution does not depend on the type of the parameter that
             --  includes the indexing operation.
 
-            elsif Nkind_In (Parent (Par), N_Function_Call,
-                                          N_Procedure_Call_Statement)
+            elsif Nkind (Parent (Par)) in
+                    N_Function_Call | N_Procedure_Call_Statement
               and then Is_Entity_Name (Name (Parent (Par)))
             then
                declare
@@ -9266,7 +9264,7 @@ package body Sem_Ch4 is
 
             Hom := Current_Entity (Subprog);
             while Present (Hom) loop
-               if Ekind_In (Hom, E_Procedure, E_Function)
+               if Ekind (Hom) in E_Procedure | E_Function
                  and then Present (Renamed_Entity (Hom))
                  and then Is_Generic_Actual_Subprogram (Hom)
                  and then In_Open_Scopes (Scope (Hom))
@@ -9276,7 +9274,7 @@ package body Sem_Ch4 is
                   Candidate := Hom;
                end if;
 
-               if Ekind_In (Candidate, E_Function, E_Procedure)
+               if Ekind (Candidate) in E_Function | E_Procedure
                  and then (not Is_Hidden (Candidate) or else In_Instance)
                  and then Scope (Candidate) = Scope (Base_Type (Anc_Type))
                  and then First_Formal_Match (Candidate, CW_Typ)
@@ -9454,8 +9452,8 @@ package body Sem_Ch4 is
             Obj_Type := Designated_Type (Obj_Type);
          end if;
 
-         if Ekind_In (Obj_Type, E_Private_Subtype,
-                                E_Record_Subtype_With_Private)
+         if Ekind (Obj_Type)
+           in E_Private_Subtype | E_Record_Subtype_With_Private
          then
             Obj_Type := Base_Type (Obj_Type);
          end if;
@@ -9625,7 +9623,7 @@ package body Sem_Ch4 is
             if Is_Derived_Type (T) then
                return Primitive_Operations (T);
 
-            elsif Ekind_In (Scope (T), E_Procedure, E_Function) then
+            elsif Ekind (Scope (T)) in E_Procedure | E_Function then
 
                --  Scan the list of generic formals to find subprograms
                --  that may have a first controlling formal of the type.
index 74ebc6a88d4af4e815a7264c755887f156b4885d..336507a12d5b44eed32e1aaaba52939e93773d8a 100644 (file)
@@ -305,9 +305,8 @@ package body Sem_Ch5 is
 
          if Is_Entity_Name (Opnd)
            and then (Ekind (Entity (Opnd)) = E_Out_Parameter
-                      or else Ekind_In (Entity (Opnd),
-                                        E_In_Out_Parameter,
-                                        E_Generic_In_Out_Parameter)
+                      or else Ekind (Entity (Opnd)) in
+                                E_In_Out_Parameter | E_Generic_In_Out_Parameter
                       or else
                         (Ekind (Entity (Opnd)) = E_Variable
                           and then Nkind (Parent (Entity (Opnd))) =
@@ -320,7 +319,7 @@ package body Sem_Ch5 is
          --  If assignment operand is a component reference, then we get the
          --  actual subtype of the component for the unconstrained case.
 
-         elsif Nkind_In (Opnd, N_Selected_Component, N_Explicit_Dereference)
+         elsif Nkind (Opnd) in N_Selected_Component | N_Explicit_Dereference
            and then not Is_Unchecked_Union (Opnd_Type)
          then
             Decl := Build_Actual_Subtype_Of_Component (Opnd_Type, Opnd);
@@ -825,7 +824,7 @@ package body Sem_Ch5 is
         and then Is_Assignable (Entity (Lhs))
         and then Is_Composite_Type (T1)
         and then not Is_Constrained (Etype (Entity (Lhs)))
-        and then Nkind_In (Rhs, N_If_Expression, N_Case_Expression)
+        and then Nkind (Rhs) in N_If_Expression | N_Case_Expression
       then
          Resolve (Rhs, Base_Type (T1));
 
@@ -1239,7 +1238,7 @@ package body Sem_Ch5 is
 
             --  Do not install the return object
 
-            if not Ekind_In (Id, E_Constant, E_Variable)
+            if Ekind (Id) not in E_Constant | E_Variable
               or else not Is_Return_Object (Id)
             then
                Install_Entity (Id);
@@ -1473,9 +1472,7 @@ package body Sem_Ch5 is
          if Is_Entity_Name (Exp) then
             Ent := Entity (Exp);
 
-            if Ekind_In (Ent, E_Variable,
-                              E_In_Out_Parameter,
-                              E_Out_Parameter)
+            if Ekind (Ent) in E_Variable | E_In_Out_Parameter | E_Out_Parameter
             then
                if List_Length (Choices) = 1
                  and then Nkind (First (Choices)) in N_Subexpr
@@ -1752,7 +1749,8 @@ package body Sem_Ch5 is
          Scope_Id := Scope_Stack.Table (J).Entity;
 
          if Label_Scope = Scope_Id
-           or else not Ekind_In (Scope_Id, E_Block, E_Loop, E_Return_Statement)
+           or else Ekind (Scope_Id) not in
+                     E_Block | E_Loop | E_Return_Statement
          then
             if Scope_Id /= Label_Scope then
                Error_Msg_N
@@ -2522,10 +2520,9 @@ package body Sem_Ch5 is
                      if Nkind (Orig_Iter_Name) = N_Selected_Component
                        and then
                          Present (Entity (Selector_Name (Orig_Iter_Name)))
-                       and then Ekind_In
-                                  (Entity (Selector_Name (Orig_Iter_Name)),
-                                   E_Component,
-                                   E_Discriminant)
+                       and then
+                         Ekind (Entity (Selector_Name (Orig_Iter_Name))) in
+                           E_Component | E_Discriminant
                        and then Is_Dependent_Component_Of_Mutable_Object
                                   (Orig_Iter_Name)
                      then
@@ -2803,8 +2800,8 @@ package body Sem_Ch5 is
             if Analyzed (Original_Bound) then
                return Original_Bound;
 
-            elsif Nkind_In (Analyzed_Bound, N_Integer_Literal,
-                                            N_Character_Literal)
+            elsif Nkind (Analyzed_Bound) in
+                    N_Integer_Literal | N_Character_Literal
               or else Is_Entity_Name (Analyzed_Bound)
             then
                Analyze_And_Resolve (Original_Bound, Typ);
@@ -3002,8 +2999,8 @@ package body Sem_Ch5 is
                      and then not Is_Type (Entity (DS_Copy)))
 
            or else (Nkind (DS_Copy) = N_Attribute_Reference
-                     and then Nam_In (Attribute_Name (DS_Copy),
-                                      Name_Loop_Entry, Name_Old))
+                     and then Attribute_Name (DS_Copy) in
+                                Name_Loop_Entry | Name_Old)
 
            or else Has_Aspect (Etype (DS_Copy), Aspect_Iterable)
 
@@ -3143,7 +3140,7 @@ package body Sem_Ch5 is
 
       --  Case where we have a range or a subtype, get type bounds
 
-      if Nkind_In (DS, N_Range, N_Subtype_Indication)
+      if Nkind (DS) in N_Range | N_Subtype_Indication
         and then not Error_Posted (DS)
         and then Etype (DS) /= Any_Type
         and then Is_Discrete_Type (Etype (DS))
index cd108d8b7339dd0fc3482ca9bba231d0154ff84f..ed1c326111f20bb9a8ee4671b10286769df2d376 100644 (file)
@@ -760,8 +760,8 @@ package body Sem_Ch6 is
 
          elsif Kind = N_Function_Call
            and then Is_Entity_Name (Name (Return_Expr))
-           and then Ekind_In (Entity (Name (Return_Expr)), E_Function,
-                                                           E_Generic_Function)
+           and then Ekind (Entity (Name (Return_Expr))) in
+                      E_Function | E_Generic_Function
            and then No_Return (Entity (Name (Return_Expr)))
          then
             return;
@@ -801,8 +801,8 @@ package body Sem_Ch6 is
 
          --  We are only interested in return statements
 
-         if not Nkind_In (Return_Stmt, N_Extended_Return_Statement,
-                                       N_Simple_Return_Statement)
+         if Nkind (Return_Stmt) not in
+              N_Extended_Return_Statement | N_Simple_Return_Statement
          then
             return;
          end if;
@@ -884,8 +884,8 @@ package body Sem_Ch6 is
 
                if Nkind (Assoc) = N_Attribute_Reference then
                   Expr := Assoc;
-               elsif Nkind_In (Assoc, N_Component_Association,
-                                      N_Discriminant_Association)
+               elsif Nkind (Assoc) in
+                       N_Component_Association | N_Discriminant_Association
                then
                   Expr := Expression (Assoc);
                else
@@ -911,9 +911,9 @@ package body Sem_Ch6 is
 
                   Obj := Original_Node (Prefix (Expr));
                   loop
-                     while Nkind_In (Obj, N_Explicit_Dereference,
-                                          N_Indexed_Component,
-                                          N_Selected_Component)
+                     while Nkind (Obj) in N_Explicit_Dereference
+                                        | N_Indexed_Component
+                                        | N_Selected_Component
                      loop
                         --  When we encounter a named access type then we can
                         --  ignore accessibility checks on the dereference.
@@ -1156,8 +1156,7 @@ package body Sem_Ch6 is
             --  This early expansion is done only when the return statement is
             --  not part of a handled sequence of statements.
 
-            if Nkind_In (Expr, N_Aggregate,
-                               N_Extension_Aggregate)
+            if Nkind (Expr) in N_Aggregate | N_Extension_Aggregate
               and then Needs_Finalization (R_Type)
               and then Nkind (Parent (N)) /= N_Handled_Sequence_Of_Statements
             then
@@ -1189,7 +1188,7 @@ package body Sem_Ch6 is
             if Expander_Active
               and then Serious_Errors_Detected = 0
               and then Is_Access_Type (R_Type)
-              and then not Nkind_In (Expr, N_Null, N_Raise_Expression)
+              and then Nkind (Expr) not in N_Null | N_Raise_Expression
               and then Is_Interface (Designated_Type (R_Type))
               and then Is_Progenitor (Designated_Type (R_Type),
                                       Designated_Type (Etype (Expr)))
@@ -1249,7 +1248,7 @@ package body Sem_Ch6 is
               and then not Is_Constrained (R_Type)
               and then Is_Build_In_Place_Function (Scope_Id)
               and then Needs_BIP_Alloc_Form (Scope_Id)
-              and then Nkind_In (Expr, N_Aggregate, N_Extension_Aggregate)
+              and then Nkind (Expr) in N_Aggregate | N_Extension_Aggregate
             then
                Preanalyze (Obj_Decl);
 
@@ -1996,9 +1995,9 @@ package body Sem_Ch6 is
       --  Special processing for Elab_Spec, Elab_Body and Elab_Subp_Body calls
 
       if Nkind (P) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (P), Name_Elab_Spec,
-                                             Name_Elab_Body,
-                                             Name_Elab_Subp_Body)
+        and then Attribute_Name (P) in Name_Elab_Spec
+                                     | Name_Elab_Body
+                                     | Name_Elab_Subp_Body
       then
          if Present (Actuals) then
             Error_Msg_N
@@ -2088,9 +2087,8 @@ package body Sem_Ch6 is
       --  function, the context will select the operation whose type is Void.
 
       elsif Nkind (P) = N_Selected_Component
-        and then Ekind_In (Entity (Selector_Name (P)), E_Entry,
-                                                       E_Function,
-                                                       E_Procedure)
+        and then Ekind (Entity (Selector_Name (P)))
+                   in E_Entry | E_Function | E_Procedure
       then
          --  When front-end inlining is enabled, as with SPARK_Mode, a call
          --  in prefix notation may still be missing its controlling argument,
@@ -2189,8 +2187,8 @@ package body Sem_Ch6 is
    ------------------------------
 
    procedure Analyze_Return_Statement (N : Node_Id) is
-      pragma Assert (Nkind_In (N, N_Extended_Return_Statement,
-                                  N_Simple_Return_Statement));
+      pragma Assert
+        (Nkind (N) in N_Extended_Return_Statement | N_Simple_Return_Statement);
 
       Returns_Object : constant Boolean :=
                          Nkind (N) = N_Extended_Return_Statement
@@ -2223,7 +2221,7 @@ package body Sem_Ch6 is
 
          for J in reverse 0 .. Scope_Stack.Last loop
             Result := Scope_Stack.Table (J).Entity;
-            exit when not Ekind_In (Result, E_Block, E_Loop)
+            exit when Ekind (Result) not in E_Block | E_Loop
               and then Chars (Result) /= Name_uPostconditions;
          end loop;
 
@@ -2259,7 +2257,7 @@ package body Sem_Ch6 is
       --  implicitly-generated return that is placed at the end.
 
       if No_Return (Scope_Id)
-        and then Ekind_In (Kind, E_Procedure, E_Generic_Procedure)
+        and then Kind in E_Procedure | E_Generic_Procedure
         and then Comes_From_Source (N)
       then
          Error_Msg_N
@@ -2274,17 +2272,17 @@ package body Sem_Ch6 is
 
       --  Check that functions return objects, and other things do not
 
-      if Ekind_In (Kind, E_Function, E_Generic_Function) then
+      if Kind in E_Function | E_Generic_Function then
          if not Returns_Object then
             Error_Msg_N ("missing expression in return from function", N);
          end if;
 
-      elsif Ekind_In (Kind, E_Procedure, E_Generic_Procedure) then
+      elsif Kind in E_Procedure | E_Generic_Procedure then
          if Returns_Object then
             Error_Msg_N ("procedure cannot return value (use function)", N);
          end if;
 
-      elsif Ekind_In (Kind, E_Entry, E_Entry_Family) then
+      elsif Kind in E_Entry | E_Entry_Family then
          if Returns_Object then
             if Is_Protected_Type (Scope (Scope_Id)) then
                Error_Msg_N ("entry body cannot return value", N);
@@ -2318,10 +2316,10 @@ package body Sem_Ch6 is
          Error_Msg_N ("illegal context for return statement", N);
       end if;
 
-      if Ekind_In (Kind, E_Function, E_Generic_Function) then
+      if Kind in E_Function | E_Generic_Function then
          Analyze_Function_Return (N);
 
-      elsif Ekind_In (Kind, E_Procedure, E_Generic_Procedure) then
+      elsif Kind in E_Procedure | E_Generic_Procedure then
          Set_Return_Present (Scope_Id);
       end if;
 
@@ -2486,8 +2484,8 @@ package body Sem_Ch6 is
                      null;
 
                   elsif Nkind (Parent (N)) = N_Subprogram_Body
-                    or else Nkind_In (Parent (Parent (N)), N_Accept_Statement,
-                                                           N_Entry_Body)
+                    or else Nkind (Parent (Parent (N))) in
+                              N_Accept_Statement | N_Entry_Body
                   then
                      Error_Msg_NE
                        ("invalid use of untagged incomplete type&",
@@ -3061,8 +3059,8 @@ package body Sem_Ch6 is
                --  the environment task is our effective master, so nothing
                --  to mark.
 
-               if Nkind_In
-                   (Par, N_Task_Body, N_Block_Statement, N_Subprogram_Body)
+               if Nkind (Par)
+                    in N_Task_Body | N_Block_Statement | N_Subprogram_Body
                then
                   Set_Is_Task_Master (Par, True);
                   exit;
@@ -3415,7 +3413,7 @@ package body Sem_Ch6 is
          --  Do not process subprogram bodies as they already use the non-
          --  limited view of types.
 
-         if not Ekind_In (Subp_Id, E_Function, E_Procedure) then
+         if Ekind (Subp_Id) not in E_Function | E_Procedure then
             return No_Elist;
          end if;
 
@@ -3518,11 +3516,11 @@ package body Sem_Ch6 is
             if Is_Entity_Name (Node) and then Present (Entity (Node)) then
                Mask_Type (Etype (Entity (Node)));
 
-               if Ekind_In (Entity (Node), E_Component, E_Discriminant) then
+               if Ekind (Entity (Node)) in E_Component | E_Discriminant then
                   Mask_Type (Scope (Entity (Node)));
                end if;
 
-            elsif Nkind_In (Node, N_Aggregate, N_Null, N_Type_Conversion)
+            elsif Nkind (Node) in N_Aggregate | N_Null | N_Type_Conversion
               and then Present (Etype (Node))
             then
                Mask_Type (Etype (Node));
@@ -3585,19 +3583,18 @@ package body Sem_Ch6 is
 
                --  Move relevant pragmas to the spec
 
-               elsif Nam_In (Pragma_Name_Unmapped (Decl),
-                             Name_Depends,
-                             Name_Ghost,
-                             Name_Global,
-                             Name_Pre,
-                             Name_Precondition,
-                             Name_Post,
-                             Name_Refined_Depends,
-                             Name_Refined_Global,
-                             Name_Refined_Post,
-                             Name_Inline,
-                             Name_Pure_Function,
-                             Name_Volatile_Function)
+               elsif Pragma_Name_Unmapped (Decl) in Name_Depends
+                                                  | Name_Ghost
+                                                  | Name_Global
+                                                  | Name_Pre
+                                                  | Name_Precondition
+                                                  | Name_Post
+                                                  | Name_Refined_Depends
+                                                  | Name_Refined_Global
+                                                  | Name_Refined_Post
+                                                  | Name_Inline
+                                                  | Name_Pure_Function
+                                                  | Name_Volatile_Function
                then
                   Remove (Decl);
                   Insert_After (Insert_Nod, Decl);
@@ -3693,9 +3690,9 @@ package body Sem_Ch6 is
             --  expansion. As a result, we add an exception for this case.
 
             elsif not Present (Overridden_Operation (Spec_Id))
-              and then not (Nam_In (Chars (Spec_Id), Name_Adjust,
-                                                     Name_Finalize,
-                                                     Name_Initialize)
+              and then not (Chars (Spec_Id) in Name_Adjust
+                                             | Name_Finalize
+                                             | Name_Initialize
                              and then In_Instance)
             then
                Error_Msg_NE
@@ -4995,9 +4992,7 @@ package body Sem_Ch6 is
          --  Push_xxx_Error_Label to find the first real statement.
 
          Stm := First (Statements (HSS));
-         while Nkind_In (Stm, N_Call_Marker, N_Label)
-           or else Nkind (Stm) in N_Push_xxx_Label
-         loop
+         while Nkind (Stm) in N_Call_Marker | N_Label | N_Push_xxx_Label loop
             Next (Stm);
          end loop;
 
@@ -5553,10 +5548,10 @@ package body Sem_Ch6 is
          --  In case of primitives associated with abstract interface types
          --  the check is applied later (see Analyze_Subprogram_Declaration).
 
-         if not Nkind_In (Original_Node (Parent (N)),
-                          N_Abstract_Subprogram_Declaration,
-                          N_Formal_Abstract_Subprogram_Declaration,
-                          N_Subprogram_Renaming_Declaration)
+         if Nkind (Original_Node (Parent (N))) not in
+              N_Abstract_Subprogram_Declaration        |
+              N_Formal_Abstract_Subprogram_Declaration |
+              N_Subprogram_Renaming_Declaration
          then
             if Is_Abstract_Type (Etype (Designator)) then
                Error_Msg_N
@@ -5685,11 +5680,11 @@ package body Sem_Ch6 is
          --  the only way these may receive a convention is if they inherit
          --  the convention of a related subprogram.
 
-         if Ekind_In (Id1, E_Anonymous_Access_Subprogram_Type,
-                           E_Subprogram_Type)
+         if Ekind (Id1) in E_Anonymous_Access_Subprogram_Type
+                         | E_Subprogram_Type
               or else
-            Ekind_In (Id2, E_Anonymous_Access_Subprogram_Type,
-                           E_Subprogram_Type)
+            Ekind (Id2) in E_Anonymous_Access_Subprogram_Type
+                         | E_Subprogram_Type
          then
             return True;
 
@@ -5997,7 +5992,7 @@ package body Sem_Ch6 is
 
          if Ctype >= Mode_Conformant then
             if Parameter_Mode (Old_Formal) /= Parameter_Mode (New_Formal) then
-               if not Ekind_In (New_Id, E_Function, E_Procedure)
+               if Ekind (New_Id) not in E_Function | E_Procedure
                  or else not Is_Primitive_Wrapper (New_Id)
                then
                   Conformance_Error ("\mode of & does not match!", New_Formal);
@@ -6766,11 +6761,11 @@ package body Sem_Ch6 is
          Decl := Unit_Declaration_Node (Subp);
       end if;
 
-      if Nkind_In (Decl, N_Subprogram_Body,
-                         N_Subprogram_Body_Stub,
-                         N_Subprogram_Declaration,
-                         N_Abstract_Subprogram_Declaration,
-                         N_Subprogram_Renaming_Declaration)
+      if Nkind (Decl) in N_Subprogram_Body
+                       | N_Subprogram_Body_Stub
+                       | N_Subprogram_Declaration
+                       | N_Abstract_Subprogram_Declaration
+                       | N_Subprogram_Renaming_Declaration
       then
          Spec := Specification (Decl);
 
@@ -6866,9 +6861,9 @@ package body Sem_Ch6 is
       if Present (Overridden_Subp)
         and then (not Is_Hidden (Overridden_Subp)
                    or else
-                     (Nam_In (Chars (Overridden_Subp), Name_Initialize,
-                                                       Name_Adjust,
-                                                       Name_Finalize)
+                     (Chars (Overridden_Subp) in Name_Initialize
+                                               | Name_Adjust
+                                               | Name_Finalize
                       and then Present (Alias (Overridden_Subp))
                       and then (not Is_Hidden (Alias (Overridden_Subp))
                                  or else In_Instance)))
@@ -7170,12 +7165,10 @@ package body Sem_Ch6 is
          --  Don't count exception junk
 
            or else
-             (Nkind_In (Last_Stm, N_Goto_Statement,
-                                   N_Label,
-                                   N_Object_Declaration)
+             (Nkind (Last_Stm) in
+                N_Goto_Statement | N_Label | N_Object_Declaration
                and then Exception_Junk (Last_Stm))
-           or else Nkind (Last_Stm) in N_Push_xxx_Label
-           or else Nkind (Last_Stm) in N_Pop_xxx_Label
+           or else Nkind (Last_Stm) in N_Push_xxx_Label | N_Pop_xxx_Label
 
          --  Inserted code, such as finalization calls, is irrelevant: we only
          --  need to check original source.
@@ -7603,7 +7596,7 @@ package body Sem_Ch6 is
       function Is_Valid_Formal (F : Entity_Id) return Boolean is
       begin
          return
-           Ekind_In (F, E_In_Out_Parameter, E_Out_Parameter)
+           Ekind (F) in E_In_Out_Parameter | E_Out_Parameter
              or else
                (Nkind (Parameter_Type (Parent (F))) = N_Access_Definition
                  and then not Constant_Present (Parameter_Type (Parent (F))));
@@ -7840,7 +7833,7 @@ package body Sem_Ch6 is
             --  Entries and procedures can override abstract or null interface
             --  procedures.
 
-            elsif Ekind_In (Def_Id, E_Entry, E_Procedure)
+            elsif Ekind (Def_Id) in E_Entry | E_Procedure
               and then Ekind (Subp) = E_Procedure
               and then Matches_Prefixed_View_Profile
                          (Parameter_Specifications (Parent (Def_Id)),
@@ -7860,7 +7853,7 @@ package body Sem_Ch6 is
                   --  override, the first parameter of the overridden routine
                   --  must be of mode "out", "in out", or access-to-variable.
 
-                  if Ekind_In (Candidate, E_Entry, E_Procedure)
+                  if Ekind (Candidate) in E_Entry | E_Procedure
                     and then Is_Protected_Type (Typ)
                     and then not Is_Valid_Formal (Formal)
                   then
@@ -8266,11 +8259,11 @@ package body Sem_Ch6 is
       --  or both could be access to protected subprograms.
 
       Are_Anonymous_Access_To_Subprogram_Types :=
-        Ekind_In (Type_1, E_Anonymous_Access_Subprogram_Type,
-                          E_Anonymous_Access_Protected_Subprogram_Type)
+        Ekind (Type_1) in E_Anonymous_Access_Subprogram_Type
+                        | E_Anonymous_Access_Protected_Subprogram_Type
           and then
-        Ekind_In (Type_2, E_Anonymous_Access_Subprogram_Type,
-                          E_Anonymous_Access_Protected_Subprogram_Type);
+        Ekind (Type_2) in E_Anonymous_Access_Subprogram_Type
+                        | E_Anonymous_Access_Protected_Subprogram_Type;
 
       --  Test anonymous access type case. For this case, static subtype
       --  matching is required for mode conformance (RM 6.3.1(15)). We check
@@ -8732,8 +8725,8 @@ package body Sem_Ch6 is
                --  to this are inherited operations from a parent type in which
                --  case the derived type acts as their parent.
 
-               if Nkind_In (Subp_Decl, N_Function_Specification,
-                                       N_Procedure_Specification)
+               if Nkind (Subp_Decl) in N_Function_Specification
+                                     | N_Procedure_Specification
                then
                   Subp_Decl := Parent (Subp_Decl);
                end if;
@@ -9259,8 +9252,8 @@ package body Sem_Ch6 is
                   --  conformant with it. That can occur in cases where an
                   --  actual type causes unrelated homographs in the instance.
 
-                  if Nkind_In (N, N_Subprogram_Body,
-                                  N_Subprogram_Renaming_Declaration)
+                  if Nkind (N) in N_Subprogram_Body
+                                | N_Subprogram_Renaming_Declaration
                     and then Present (Homonym (E))
                     and then not Fully_Conformant (Designator, E)
                   then
@@ -9535,9 +9528,10 @@ package body Sem_Ch6 is
 
       function User_Defined_Numeric_Literal_Mismatch return Boolean is
          E1_Is_User_Defined : constant Boolean :=
-           not Nkind_In (Given_E1, N_Integer_Literal, N_Real_Literal);
+           Nkind (Given_E1) not in N_Integer_Literal | N_Real_Literal;
          E2_Is_User_Defined : constant Boolean :=
-           not Nkind_In (Given_E2, N_Integer_Literal, N_Real_Literal);
+           Nkind (Given_E2) not in N_Integer_Literal | N_Real_Literal;
+
       begin
          pragma Assert (E1_Is_User_Defined = E2_Is_User_Defined);
 
@@ -10712,10 +10706,9 @@ package body Sem_Ch6 is
                      H := Homonym (H);
                      exit when not Present (H) or else Scope (H) /= Scope (S);
 
-                     if Nkind_In
-                       (Parent (H),
-                        N_Private_Extension_Declaration,
-                        N_Private_Type_Declaration)
+                     if Nkind (Parent (H)) in
+                        N_Private_Extension_Declaration |
+                        N_Private_Type_Declaration
                        and then Defining_Identifier (Parent (H)) = Partial_View
                      then
                         return True;
@@ -12017,9 +12010,9 @@ package body Sem_Ch6 is
                     and then not Is_Generic_Type (Formal_Type)
                     and then not Is_Class_Wide_Type (Formal_Type)
                   then
-                     if not Nkind_In
-                              (Parent (T), N_Access_Function_Definition,
-                                           N_Access_Procedure_Definition)
+                     if Nkind (Parent (T)) not in
+                          N_Access_Function_Definition |
+                          N_Access_Procedure_Definition
                      then
                         Append_Elmt (Current_Scope,
                           Private_Dependents (Base_Type (Formal_Type)));
@@ -12036,8 +12029,8 @@ package body Sem_Ch6 is
                      end if;
                   end if;
 
-               elsif not Nkind_In (Parent (T), N_Access_Function_Definition,
-                                               N_Access_Procedure_Definition)
+               elsif Nkind (Parent (T)) not in N_Access_Function_Definition
+                                             | N_Access_Procedure_Definition
                then
                   --  AI05-0151: Tagged incomplete types are allowed in all
                   --  formal parts. Untagged incomplete types are not allowed
@@ -12064,9 +12057,9 @@ package body Sem_Ch6 is
                      then
                         null;
 
-                     elsif Nkind_In (Context, N_Accept_Statement,
-                                              N_Accept_Alternative,
-                                              N_Entry_Body)
+                     elsif Nkind (Context) in N_Accept_Statement
+                                            | N_Accept_Alternative
+                                            | N_Entry_Body
                        or else (Nkind (Context) = N_Subprogram_Body
                                  and then Comes_From_Source (Context))
                      then
@@ -12244,12 +12237,12 @@ package body Sem_Ch6 is
          --  these are not standard Ada legality rules.
 
          if SPARK_Mode = On then
-            if Ekind_In (Scope (Formal), E_Function, E_Generic_Function) then
+            if Ekind (Scope (Formal)) in E_Function | E_Generic_Function then
 
                --  A function cannot have a parameter of mode IN OUT or OUT
                --  (SPARK RM 6.1).
 
-               if Ekind_In (Formal, E_In_Out_Parameter, E_Out_Parameter) then
+               if Ekind (Formal) in E_In_Out_Parameter | E_Out_Parameter then
                   Error_Msg_N
                     ("function cannot have parameter of mode `OUT` or "
                      & "`IN OUT`", Formal);
@@ -12572,7 +12565,7 @@ package body Sem_Ch6 is
             Set_Has_Out_Or_In_Out_Parameter (Id, True);
          end if;
 
-         if Ekind_In (Id, E_Function, E_Generic_Function) then
+         if Ekind (Id) in E_Function | E_Generic_Function then
 
             --  [IN] OUT parameters allowed for functions in Ada 2012
 
@@ -12754,12 +12747,12 @@ package body Sem_Ch6 is
       --  Verify that user-defined operators have proper number of arguments
       --  First case of operators which can only be unary
 
-      if Nam_In (Id, Name_Op_Not, Name_Op_Abs) then
+      if Id in Name_Op_Not | Name_Op_Abs then
          N_OK := (N = 1);
 
       --  Case of operators which can be unary or binary
 
-      elsif Nam_In (Id, Name_Op_Add, Name_Op_Subtract) then
+      elsif Id in Name_Op_Add | Name_Op_Subtract then
          N_OK := (N in 1 .. 2);
 
       --  All other operators can only be binary
index 51a245cc2bd9f24b61f387248491777aafb8d38a..3ff200191b580624b897870cb02739be70a1261c 100644 (file)
@@ -464,9 +464,9 @@ package body Sem_Ch7 is
                --  if they are not followed by a construct which can reference
                --  and export them.
 
-               elsif Nkind_In (Decl, N_Exception_Declaration,
-                                     N_Object_Declaration,
-                                     N_Object_Renaming_Declaration)
+               elsif Nkind (Decl) in N_Exception_Declaration
+                                   | N_Object_Declaration
+                                   | N_Object_Renaming_Declaration
                then
                   Decl_Id := Defining_Entity (Decl);
 
@@ -483,8 +483,8 @@ package body Sem_Ch7 is
                --  for them to see whether they are referenced on an individual
                --  basis by looking into the table of referenced subprograms.
 
-               elsif Nkind_In (Decl, N_Subprogram_Declaration,
-                                     N_Subprogram_Renaming_Declaration)
+               elsif Nkind (Decl) in N_Subprogram_Declaration
+                                   | N_Subprogram_Renaming_Declaration
                then
                   Decl_Id := Defining_Entity (Decl);
 
@@ -1370,8 +1370,8 @@ package body Sem_Ch7 is
          then
             Generate_Reference (Id, Scope (Id), 'k', False);
 
-         elsif not Nkind_In (Unit (Cunit (Main_Unit)), N_Subprogram_Body,
-                                                       N_Subunit)
+         elsif Nkind (Unit (Cunit (Main_Unit))) not in
+                 N_Subprogram_Body | N_Subunit
          then
             --  If current unit is an ancestor of main unit, generate a
             --  reference to its own parent.
@@ -1437,8 +1437,8 @@ package body Sem_Ch7 is
             --  prevents cascaded errors when routines defined only for type
             --  entities are called with non-type entities.
 
-            if Nkind_In (Decl, N_Incomplete_Type_Declaration,
-                               N_Private_Type_Declaration)
+            if Nkind (Decl) in N_Incomplete_Type_Declaration
+                             | N_Private_Type_Declaration
               and then Is_Type (Defining_Identifier (Decl))
               and then Has_Discriminants (Defining_Identifier (Decl))
               and then Present (Full_View (Defining_Identifier (Decl)))
@@ -1472,8 +1472,8 @@ package body Sem_Ch7 is
          while Present (Gen_Par) and then Is_Child_Unit (Gen_Par) loop
             Inst_Node := Get_Unit_Instantiation_Node (Inst_Par);
 
-            if Nkind_In (Inst_Node, N_Package_Instantiation,
-                                    N_Formal_Package_Declaration)
+            if Nkind (Inst_Node) in
+                 N_Package_Instantiation | N_Formal_Package_Declaration
               and then Nkind (Name (Inst_Node)) = N_Expanded_Name
             then
                Inst_Par := Entity (Prefix (Name (Inst_Node)));
@@ -2640,7 +2640,7 @@ package body Sem_Ch7 is
       --  implicit completion at some point.
 
       elsif (Is_Overloadable (Id)
-              and then not Ekind_In (Id, E_Enumeration_Literal, E_Operator)
+              and then Ekind (Id) not in E_Enumeration_Literal | E_Operator
               and then not Is_Abstract_Subprogram (Id)
               and then not Has_Completion (Id)
               and then Comes_From_Source (Parent (Id)))
@@ -2657,7 +2657,7 @@ package body Sem_Ch7 is
             and then not Is_Generic_Type (Id))
 
         or else
-          (Ekind_In (Id, E_Task_Type, E_Protected_Type)
+          (Ekind (Id) in E_Task_Type | E_Protected_Type
             and then not Has_Completion (Id))
 
         or else
@@ -2959,7 +2959,7 @@ package body Sem_Ch7 is
             Check_Conventions (Id);
          end if;
 
-         if Ekind_In (Id, E_Private_Type, E_Limited_Private_Type)
+         if Ekind (Id) in E_Private_Type | E_Limited_Private_Type
            and then No (Full_View (Id))
            and then not Is_Generic_Type (Id)
            and then not Is_Derived_Type (Id)
index 8411f5b5805f6c944bcfb6888d66ecc6f17551eb..da965afdf8fb2a1f6e95e7ac551195025a6ef2c0 100644 (file)
@@ -780,7 +780,7 @@ package body Sem_Ch8 is
          Subt : Entity_Id;
 
       begin
-         if Nkind_In (Nam, N_Function_Call, N_Explicit_Dereference)
+         if Nkind (Nam) in N_Function_Call | N_Explicit_Dereference
            and then Is_Composite_Type (Typ)
            and then not Is_Constrained (Typ)
            and then not Has_Unknown_Discriminants (Typ)
@@ -788,7 +788,7 @@ package body Sem_Ch8 is
          then
             --  If Actual_Subtype is already set, nothing to do
 
-            if Ekind_In (Id, E_Variable, E_Constant)
+            if Ekind (Id) in E_Variable | E_Constant
               and then Present (Actual_Subtype (Id))
             then
                null;
@@ -1354,7 +1354,7 @@ package body Sem_Ch8 is
       --  check.
 
       if Comes_From_Source (N) then
-         if Nkind_In (Nam, N_Function_Call, N_Explicit_Dereference) then
+         if Nkind (Nam) in N_Function_Call | N_Explicit_Dereference then
             Is_Object_Ref := Is_Object_Reference (Nam);
          else
             Is_Object_Ref := Is_Object_Reference (Original_Node (Nam));
@@ -2103,7 +2103,7 @@ package body Sem_Ch8 is
             --  Generate:
             --    return Subp_Id (Actuals);
 
-            if Ekind_In (Subp_Id, E_Function, E_Operator) then
+            if Ekind (Subp_Id) in E_Function | E_Operator then
                return
                  Make_Simple_Return_Statement (Loc,
                    Expression =>
@@ -2135,7 +2135,7 @@ package body Sem_Ch8 is
             Formal   : Node_Id;
 
          begin
-            pragma Assert (Ekind_In (Subp_Id, E_Function, E_Operator));
+            pragma Assert (Ekind (Subp_Id) in E_Function | E_Operator);
 
             --  Build the actual parameters of the call
 
@@ -2502,7 +2502,7 @@ package body Sem_Ch8 is
          --  dispatching call to the wrapped function is known during proof.
 
          if GNATprove_Mode
-           and then Ekind_In (Ren_Id, E_Function, E_Operator)
+           and then Ekind (Ren_Id) in E_Function | E_Operator
          then
             New_Spec := Build_Spec (Ren_Id);
             Body_Decl :=
@@ -3376,7 +3376,7 @@ package body Sem_Ch8 is
          --  Guard against previous errors, and omit renamings of predefined
          --  operators.
 
-         elsif not Ekind_In (Old_S, E_Function, E_Procedure) then
+         elsif Ekind (Old_S) not in E_Function | E_Procedure then
             null;
 
          elsif Requires_Overriding (Old_S)
@@ -4238,10 +4238,9 @@ package body Sem_Ch8 is
       elsif Present (Expressions (Nam)) then
          Error_Msg_N ("illegal expressions in attribute reference", Nam);
 
-      elsif
-        Nam_In (Aname, Name_Compose, Name_Exponent, Name_Leading_Part,
-                       Name_Pos,     Name_Round,    Name_Scaling,
-                       Name_Val)
+      elsif Aname in Name_Compose | Name_Exponent | Name_Leading_Part |
+                     Name_Pos     | Name_Round    | Name_Scaling      |
+                     Name_Val
       then
          if Nkind (N) = N_Subprogram_Renaming_Declaration
            and then Present (Corresponding_Formal_Spec (N))
@@ -4505,8 +4504,8 @@ package body Sem_Ch8 is
       elsif Is_Concurrent_Type (Scope (E)) then
          P := Parent (N);
          while Present (P)
-           and then not Nkind_In (P, N_Parameter_Specification,
-                                     N_Component_Declaration)
+           and then Nkind (P) not in
+             N_Parameter_Specification | N_Component_Declaration
          loop
             P := Parent (P);
          end loop;
@@ -4744,8 +4743,8 @@ package body Sem_Ch8 is
             Pop_Scope;
 
             while not (Is_List_Member (Decl))
-              or else Nkind_In (Parent (Decl), N_Protected_Definition,
-                                               N_Task_Definition)
+              or else Nkind (Parent (Decl)) in N_Protected_Definition
+                                             | N_Task_Definition
             loop
                Decl := Parent (Decl);
             end loop;
@@ -5524,7 +5523,7 @@ package body Sem_Ch8 is
                --  is Put or Put_Line, then add a special error message (since
                --  this is a very common error for beginners to make).
 
-               if Nam_In (Chars (N), Name_Put, Name_Put_Line) then
+               if Chars (N) in Name_Put | Name_Put_Line then
                   Error_Msg_N -- CODEFIX
                     ("\\possible missing `WITH Ada.Text_'I'O; " &
                      "USE Ada.Text_'I'O`!", N);
@@ -6109,9 +6108,9 @@ package body Sem_Ch8 is
             if Ada_Version >= Ada_2012
               and then
                 (Nkind (Parent (N)) in N_Subexpr
-                  or else Nkind_In (Parent (N), N_Assignment_Statement,
-                                                N_Object_Declaration,
-                                                N_Parameter_Association))
+                  or else Nkind (Parent (N)) in N_Assignment_Statement
+                                              | N_Object_Declaration
+                                              | N_Parameter_Association)
             then
                Check_Implicit_Dereference (N, Etype (E));
             end if;
@@ -6198,13 +6197,13 @@ package body Sem_Ch8 is
          Par := Nod;
          while Present (Par) loop
             if Nkind (Par) = N_Pragma then
-               if Nam_In (Pragma_Name_Unmapped (Par),
-                          Name_Abstract_State,
-                          Name_Depends,
-                          Name_Global,
-                          Name_Initializes,
-                          Name_Refined_Depends,
-                          Name_Refined_Global)
+               if Pragma_Name_Unmapped (Par)
+                    in Name_Abstract_State
+                     | Name_Depends
+                     | Name_Global
+                     | Name_Initializes
+                     | Name_Refined_Depends
+                     | Name_Refined_Global
                then
                   return True;
 
@@ -6305,7 +6304,7 @@ package body Sem_Ch8 is
             --  The non-limited view may itself be incomplete, in which case
             --  get the full view if available.
 
-            elsif Ekind_In (Id, E_Incomplete_Type, E_Class_Wide_Type)
+            elsif Ekind (Id) in E_Incomplete_Type | E_Class_Wide_Type
               and then From_Limited_With (Id)
               and then Present (Non_Limited_View (Id))
               and then Scope (Non_Limited_View (Id)) = P_Name
@@ -6359,7 +6358,7 @@ package body Sem_Ch8 is
       end;
 
       if No (Id)
-        and then Ekind_In (P_Name, E_Procedure, E_Function)
+        and then Ekind (P_Name) in E_Procedure | E_Function
         and then Is_Generic_Instance (P_Name)
       then
          --  Expanded name denotes entity in (instance of) generic subprogram.
@@ -6490,9 +6489,7 @@ package body Sem_Ch8 is
 
                         exit when S = Standard_Standard;
 
-                        if Ekind_In (S, E_Function,
-                                        E_Package,
-                                        E_Procedure)
+                        if Ekind (S) in E_Function | E_Package | E_Procedure
                         then
                            P :=
                              Generic_Parent (Specification
@@ -7499,7 +7496,7 @@ package body Sem_Ch8 is
             --  The subprogram may be a renaming (of an enclosing scope) as
             --  in the case of the name of the generic within an instantiation.
 
-            if Ekind_In (P_Name, E_Procedure, E_Function)
+            if Ekind (P_Name) in E_Procedure | E_Function
               and then Present (Alias (P_Name))
               and then Is_Generic_Instance (Alias (P_Name))
             then
@@ -8458,7 +8455,7 @@ package body Sem_Ch8 is
 
          pragma Assert (No (Old_F));
 
-         if Ekind_In (Old_S, E_Function, E_Enumeration_Literal) then
+         if Ekind (Old_S) in E_Function | E_Enumeration_Literal then
             Set_Etype (New_S, Etype (Old_S));
          end if;
       end if;
@@ -8659,7 +8656,7 @@ package body Sem_Ch8 is
       --  Use clauses in and of themselves do not count as a "use" of a
       --  package.
 
-      if Nkind_In (Parent (Id), N_Use_Package_Clause, N_Use_Type_Clause) then
+      if Nkind (Parent (Id)) in N_Use_Package_Clause | N_Use_Type_Clause then
          return;
       end if;
 
@@ -8681,11 +8678,11 @@ package body Sem_Ch8 is
          --  Mark primitives
 
          elsif (Ekind (Id) in Overloadable_Kind
-                 or else Ekind_In (Id, E_Generic_Function,
-                                       E_Generic_Procedure))
+                 or else Ekind (Id) in
+                           E_Generic_Function | E_Generic_Procedure)
            and then (Is_Potentially_Use_Visible (Id)
                       or else Is_Intrinsic_Subprogram (Id)
-                      or else (Ekind_In (Id, E_Function, E_Procedure)
+                      or else (Ekind (Id) in E_Function | E_Procedure
                                 and then Is_Generic_Actual_Subprogram (Id)))
          then
             Mark_Parameters (Id);
@@ -8721,7 +8718,7 @@ package body Sem_Ch8 is
             --  Ignore fully qualified names as they do not count as a "use" of
             --  a package.
 
-            if Nkind_In (Id, N_Identifier, N_Operator_Symbol)
+            if Nkind (Id) in N_Identifier | N_Operator_Symbol
               or else (Present (Prefix (Id))
                          and then Scope (Entity (Id)) /= Entity (Prefix (Id)))
             then
@@ -10255,7 +10252,7 @@ package body Sem_Ch8 is
                            & "use_type_clause #??", Clause1, T);
                         return;
 
-                     elsif Nkind_In (Unit2, N_Package_Body, N_Subprogram_Body)
+                     elsif Nkind (Unit2) in N_Package_Body | N_Subprogram_Body
                        and then Nkind (Unit1) /= Nkind (Unit2)
                        and then Nkind (Unit1) /= N_Subunit
                      then
index 4fe3c9b361a34887d3133835523a02fe046327c3..effc8586c95ac4068329508b3f8c15da9c44e8f1 100644 (file)
@@ -133,8 +133,8 @@ package body Sem_Ch9 is
       --  when Lock_Free_Given is True.
 
    begin
-      pragma Assert (Nkind_In (N, N_Protected_Type_Declaration,
-                                  N_Protected_Body));
+      pragma Assert
+        (Nkind (N) in N_Protected_Type_Declaration | N_Protected_Body);
 
       --  The lock-free implementation is currently enabled through a debug
       --  flag. When Lock_Free_Given is True, an aspect Lock_Free forces the
@@ -569,7 +569,7 @@ package body Sem_Ch9 is
                         if Ekind (Id) = E_Component then
                            Comp_Id := Id;
 
-                        elsif Ekind_In (Id, E_Constant, E_Variable)
+                        elsif Ekind (Id) in E_Constant | E_Variable
                           and then Present (Prival_Link (Id))
                         then
                            Comp_Id := Prival_Link (Id);
@@ -1113,7 +1113,7 @@ package body Sem_Ch9 is
          Analyze_List (Pragmas_Before (N));
       end if;
 
-      if Nkind_In (Parent (N), N_Selective_Accept, N_Timed_Entry_Call) then
+      if Nkind (Parent (N)) in N_Selective_Accept | N_Timed_Entry_Call then
          Expr := Expression (Delay_Statement (N));
 
          --  Defer full analysis until the statement is expanded, to insure
@@ -1966,7 +1966,7 @@ package body Sem_Ch9 is
 
       Item_Id := First_Entity (Prot_Typ);
       while Present (Item_Id) loop
-         if Ekind_In (Item_Id, E_Function, E_Procedure) then
+         if Ekind (Item_Id) in E_Function | E_Procedure then
             Set_Convention (Item_Id, Convention_Protected);
          else
             Propagate_Concurrent_Flags (Prot_Typ, Etype (Item_Id));
@@ -2317,7 +2317,7 @@ package body Sem_Ch9 is
          Enclosing := Scope_Stack.Table (J).Entity;
          exit when Is_Entry (Enclosing);
 
-         if not Ekind_In (Enclosing, E_Block, E_Loop) then
+         if Ekind (Enclosing) not in E_Block | E_Loop then
             Error_Msg_N ("requeue must appear within accept or entry body", N);
             return;
          end if;
@@ -2550,7 +2550,7 @@ package body Sem_Ch9 is
                   --  perform an unconditional goto so that any further
                   --  references will not occur anyway.
 
-                  if Ekind_In (Ent, E_Out_Parameter, E_In_Out_Parameter) then
+                  if Ekind (Ent) in E_Out_Parameter | E_In_Out_Parameter then
                      Set_Never_Set_In_Source (Ent, False);
                      Set_Is_True_Constant    (Ent, False);
                   end if;
@@ -3470,7 +3470,7 @@ package body Sem_Ch9 is
 
    begin
       pragma Assert
-        (Nkind_In (N, N_Protected_Type_Declaration, N_Task_Type_Declaration));
+        (Nkind (N) in N_Protected_Type_Declaration | N_Task_Type_Declaration);
 
       if Present (Interface_List (N)) then
          Set_Is_Tagged_Type (T);
index d22e5d26bebc629f02e0d79fae84a36ffaa5cbf0..cb93fdb89dbfdc7f727a35f77d5667a4aa9d2a28 100644 (file)
@@ -623,8 +623,8 @@ package body Sem_Dim is
       --  Named symbol argument
 
       if No (Symbol_Expr)
-        or else not Nkind_In (Symbol_Expr, N_Character_Literal,
-                                           N_String_Literal)
+        or else Nkind (Symbol_Expr) not in
+                  N_Character_Literal | N_String_Literal
       then
          Symbol_Expr := Empty;
 
@@ -644,8 +644,8 @@ package body Sem_Dim is
 
                   --  Verify symbol expression is a string or a character
 
-                  if not Nkind_In (Symbol_Expr, N_Character_Literal,
-                                                N_String_Literal)
+                  if Nkind (Symbol_Expr) not in
+                       N_Character_Literal | N_String_Literal
                   then
                      Symbol_Expr := Empty;
                      Error_Msg_N
@@ -656,8 +656,8 @@ package body Sem_Dim is
                --  Special error if no Symbol choice but expression is string
                --  or character.
 
-               elsif Nkind_In (Expression (Assoc), N_Character_Literal,
-                                                   N_String_Literal)
+               elsif Nkind (Expression (Assoc)) in
+                       N_Character_Literal | N_String_Literal
                then
                   Num_Choices := Num_Choices + 1;
                   Error_Msg_N
@@ -1039,8 +1039,8 @@ package body Sem_Dim is
                --  Check the second argument for each dimension aggregate is
                --  a string or a character.
 
-               if not Nkind_In (Unit_Symbol, N_String_Literal,
-                                             N_Character_Literal)
+               if Nkind (Unit_Symbol) not in
+                    N_String_Literal | N_Character_Literal
                then
                   Error_Msg_N
                     ("expected unit symbol (string or character)",
@@ -1072,8 +1072,8 @@ package body Sem_Dim is
                --  Check the third argument for each dimension aggregate is
                --  a string or a character.
 
-               if not Nkind_In (Dim_Symbol, N_String_Literal,
-                                            N_Character_Literal)
+               if Nkind (Dim_Symbol) not in
+                    N_String_Literal | N_Character_Literal
                then
                   Error_Msg_N
                     ("expected dimension symbol (string or character)",
@@ -1143,13 +1143,11 @@ package body Sem_Dim is
          return;
 
       elsif not Comes_From_Source (N) then
-         if Nkind_In (N, N_Explicit_Dereference,
-                         N_Identifier,
-                         N_Object_Declaration,
-                         N_Subtype_Declaration)
+         if Nkind (N) not in N_Explicit_Dereference
+                           | N_Identifier
+                           | N_Object_Declaration
+                           | N_Subtype_Declaration
          then
-            null;
-         else
             return;
          end if;
       end if;
@@ -1441,9 +1439,8 @@ package body Sem_Dim is
          return;
       end if;
 
-      if Nkind_In (N_Kind, N_Op_Add, N_Op_Expon, N_Op_Subtract)
-        or else N_Kind in N_Multiplying_Operator
-        or else N_Kind in N_Op_Compare
+      if N_Kind in N_Op_Add | N_Op_Expon  | N_Op_Subtract
+                 | N_Multiplying_Operator | N_Op_Compare
       then
          declare
             L                : constant Node_Id        := Left_Opnd (N);
@@ -1459,7 +1456,7 @@ package body Sem_Dim is
          begin
             --  N_Op_Add, N_Op_Mod, N_Op_Rem or N_Op_Subtract case
 
-            if Nkind_In (N, N_Op_Add, N_Op_Mod, N_Op_Rem, N_Op_Subtract) then
+            if N_Kind in N_Op_Add | N_Op_Mod | N_Op_Rem | N_Op_Subtract then
 
                --  Check both operands have same dimension
 
@@ -1475,7 +1472,7 @@ package body Sem_Dim is
 
             --  N_Op_Multiply or N_Op_Divide case
 
-            elsif Nkind_In (N_Kind, N_Op_Multiply, N_Op_Divide) then
+            elsif N_Kind in N_Op_Multiply | N_Op_Divide then
 
                --  Check at least one operand is not dimensionless
 
@@ -1593,13 +1590,13 @@ package body Sem_Dim is
                   --  literal is treated as if its dimension matches the type
                   --  dimension.
 
-                  elsif Nkind_In (Original_Node (L), N_Integer_Literal,
-                                                     N_Real_Literal)
+                  elsif Nkind (Original_Node (L)) in
+                          N_Integer_Literal | N_Real_Literal
                   then
                      Dim_Warning_For_Numeric_Literal (L, Etype (R));
 
-                  elsif Nkind_In (Original_Node (R), N_Integer_Literal,
-                                                     N_Real_Literal)
+                  elsif Nkind (Original_Node (R)) in
+                          N_Integer_Literal | N_Real_Literal
                   then
                      Dim_Warning_For_Numeric_Literal (R, Etype (L));
 
@@ -1875,8 +1872,8 @@ package body Sem_Dim is
             --  dimensionless to indicate the literal is treated as if its
             --  dimension matches the type dimension.
 
-            if Nkind_In (Original_Node (Expr), N_Real_Literal,
-                                               N_Integer_Literal)
+            if Nkind (Original_Node (Expr)) in
+                 N_Real_Literal | N_Integer_Literal
             then
                Dim_Warning_For_Numeric_Literal (Expr, Etyp);
 
@@ -2065,8 +2062,8 @@ package body Sem_Dim is
 
                if Present (Expr)
                  and then Dims_Of_Typ /= Dimensions_Of (Expr)
-                 and then Nkind_In (Original_Node (Expr), N_Real_Literal,
-                                                          N_Integer_Literal)
+                 and then Nkind (Original_Node (Expr)) in
+                            N_Real_Literal | N_Integer_Literal
                then
                   Dim_Warning_For_Numeric_Literal (Expr, Etype (Typ));
                end if;
@@ -2105,7 +2102,7 @@ package body Sem_Dim is
                Check_Error_Detected;
                return;
 
-            elsif Ekind_In (Id,  E_Constant, E_Named_Real)
+            elsif Ekind (Id) in E_Constant | E_Named_Real
               and then Exists (Dimensions_Of (Id))
             then
                Set_Dimensions (N, Dimensions_Of (Id));
@@ -2242,8 +2239,8 @@ package body Sem_Dim is
             --  not dimensionless to indicate the literal is treated as if
             --  its dimension matches the type dimension.
 
-            if Nkind_In (Original_Node (Expr), N_Real_Literal,
-                                               N_Integer_Literal)
+            if Nkind (Original_Node (Expr)) in
+                 N_Real_Literal | N_Integer_Literal
             then
                Dim_Warning_For_Numeric_Literal (Expr, Etyp);
 
index 6e74098914dcfff097b6f5c375dd659174ccd6f8..67a8cdf6095db43fbaacc03d369d49ae5b6fdf14 100644 (file)
@@ -293,7 +293,7 @@ package body Sem_Disp is
          Next_Formal (Formal);
       end loop;
 
-      if Ekind_In (Subp, E_Function, E_Generic_Function) then
+      if Ekind (Subp) in E_Function | E_Generic_Function then
          Ctrl_Type := Check_Controlling_Type (Etype (Subp), Subp);
 
          if Present (Ctrl_Type) then
@@ -621,7 +621,7 @@ package body Sem_Disp is
                   Par := Parent (Par);
                end if;
 
-               if Nkind_In (Par, N_Function_Call, N_Procedure_Call_Statement)
+               if Nkind (Par) in N_Function_Call | N_Procedure_Call_Statement
                  and then Is_Entity_Name (Name (Par))
                then
                   declare
@@ -684,7 +684,7 @@ package body Sem_Disp is
                --  For equality operators, one of the operands must be
                --  statically or dynamically tagged.
 
-               elsif Nkind_In (Par, N_Op_Eq, N_Op_Ne) then
+               elsif Nkind (Par) in N_Op_Eq | N_Op_Ne then
                   if N = Right_Opnd (Par)
                     and then Is_Tag_Indeterminate (Left_Opnd (Par))
                   then
@@ -993,7 +993,7 @@ package body Sem_Disp is
    --  Start of processing for Check_Dispatching_Operation
 
    begin
-      if not Ekind_In (Subp, E_Function, E_Procedure) then
+      if Ekind (Subp) not in E_Function | E_Procedure then
          return;
 
       --  The Default_Initial_Condition procedure is not a primitive subprogram
@@ -1409,7 +1409,7 @@ package body Sem_Disp is
          --  visible operation that may be declared in a partial view when
          --  the full view is controlled.
 
-         if Nam_In (Chars (Subp), Name_Initialize, Name_Adjust, Name_Finalize)
+         if Chars (Subp) in Name_Initialize | Name_Adjust | Name_Finalize
            and then Is_Controlled (Tagged_Type)
            and then not Is_Visibly_Controlled (Tagged_Type)
            and then not Is_Inherited_Public_Operation (Ovr_Subp)
@@ -1569,10 +1569,10 @@ package body Sem_Disp is
          Set_DT_Position_Value (Subp, No_Uint);
 
       elsif Has_Controlled_Component (Tagged_Type)
-        and then Nam_In (Chars (Subp), Name_Initialize,
-                                       Name_Adjust,
-                                       Name_Finalize,
-                                       Name_Finalize_Address)
+        and then Chars (Subp) in Name_Initialize
+                               | Name_Adjust
+                               | Name_Finalize
+                               | Name_Finalize_Address
       then
          declare
             F_Node   : constant Node_Id := Freeze_Node (Tagged_Type);
@@ -2010,7 +2010,7 @@ package body Sem_Disp is
       Ctrl_Type : Entity_Id;
 
    begin
-      if Ekind_In (Subp, E_Function, E_Procedure)
+      if Ekind (Subp) in E_Function | E_Procedure
         and then Present (DTC_Entity (Subp))
       then
          return Scope (DTC_Entity (Subp));
index 19f6bb73b9803550378daaff5357ee6acf85e99c..4ee6e8b59742cf0321cb094853037f8da215b9ef 100644 (file)
@@ -746,13 +746,12 @@ package body Sem_Dist is
       --  we are generating code.
 
       if Comes_From_Source (P)
+        and then Expander_Active
         and then Is_Record_Type (ET)
-        and then (Is_Remote_Call_Interface (ET)
-                   or else Is_Remote_Types (ET))
+        and then (Is_Remote_Call_Interface (ET) or else Is_Remote_Types (ET))
         and then Present (Corresponding_Remote_Type (ET))
-        and then Nkind_In (Parent (Parent (P)), N_Procedure_Call_Statement,
-                                                N_Indexed_Component)
-        and then Expander_Active
+        and then Nkind (Parent (Parent (P))) in
+                   N_Procedure_Call_Statement | N_Indexed_Component
       then
          RAS_E_Dereference (P);
          return True;
index 3cbc27fc5073b51513d06492d4d03ec57f44d358..78108e99956d03cd5cfa7cac63561633adcc632a 100644 (file)
@@ -2609,7 +2609,7 @@ package body Sem_Elab is
 
             Par := Parent (Call);
             while Present (Par) loop
-               if Nkind_In (Par, N_Package_Body, N_Package_Declaration) then
+               if Nkind (Par) in N_Package_Body | N_Package_Declaration then
                   return Defining_Entity (Par);
 
                elsif Nkind (Par) = N_Handled_Sequence_Of_Statements then
@@ -2958,11 +2958,10 @@ package body Sem_Elab is
             --  task objects found in the declarations.
 
             else
-               pragma Assert (Nkind_In (Context, N_Block_Statement,
-                                                 N_Entry_Body,
-                                                 N_Protected_Body,
-                                                 N_Subprogram_Body,
-                                                 N_Task_Body));
+               pragma Assert
+                 (Nkind (Context) in
+                    N_Block_Statement | N_Entry_Body | N_Protected_Body |
+                    N_Subprogram_Body | N_Task_Body);
 
                Traverse_List
                  (List      => Declarations (Context),
@@ -2985,10 +2984,9 @@ package body Sem_Elab is
       --  When the name denotes an array or record component, find the whole
       --  object.
 
-      while Nkind_In (Nam, N_Explicit_Dereference,
-                           N_Indexed_Component,
-                           N_Selected_Component,
-                           N_Slice)
+      while Nkind (Nam) in
+        N_Explicit_Dereference | N_Indexed_Component |
+        N_Selected_Component   | N_Slice
       loop
          Nam := Prefix (Nam);
       end loop;
@@ -3298,8 +3296,8 @@ package body Sem_Elab is
             elsif (Debug_Flag_Underscore_A
                     or else Restriction_Active
                               (No_Entry_Calls_In_Elaboration_Code))
-              and then Nkind_In (Original_Node (Scen), N_Accept_Statement,
-                                                       N_Selective_Accept)
+              and then Nkind (Original_Node (Scen)) in
+                         N_Accept_Statement | N_Selective_Accept
             then
                return Abandon;
 
@@ -3333,18 +3331,18 @@ package body Sem_Elab is
             --  until expansion transforms the node and relocates the contents.
             --  Examine these lists in case expansion is disabled.
 
-            elsif Nkind_In (Scen, N_And_Then, N_Or_Else) then
+            elsif Nkind (Scen) in N_And_Then | N_Or_Else then
                Traverse_List (Actions (Scen));
 
-            elsif Nkind_In (Scen, N_Elsif_Part, N_Iteration_Scheme) then
+            elsif Nkind (Scen) in N_Elsif_Part | N_Iteration_Scheme then
                Traverse_List (Condition_Actions (Scen));
 
             elsif Nkind (Scen) = N_If_Expression then
                Traverse_List (Then_Actions (Scen));
                Traverse_List (Else_Actions (Scen));
 
-            elsif Nkind_In (Scen, N_Component_Association,
-                                  N_Iterated_Component_Association)
+            elsif Nkind (Scen) in
+                    N_Component_Association | N_Iterated_Component_Association
             then
                Traverse_List (Loop_Actions (Scen));
 
@@ -3515,8 +3513,7 @@ package body Sem_Elab is
             --  contexts because nested calls has not been relocated to their
             --  final context.
 
-            if Nkind_In (Par, N_Aspect_Specification,
-                              N_Generic_Association)
+            if Nkind (Par) in N_Aspect_Specification | N_Generic_Association
             then
                return True;
 
@@ -3544,9 +3541,9 @@ package body Sem_Elab is
          --  To qualify, the node must appear immediately within a source call
          --  which invokes a source target.
 
-         if Nkind_In (Outer_Call, N_Entry_Call_Statement,
-                                  N_Function_Call,
-                                  N_Procedure_Call_Statement)
+         if Nkind (Outer_Call) in N_Entry_Call_Statement
+                                | N_Function_Call
+                                | N_Procedure_Call_Statement
            and then Comes_From_Source (Outer_Call)
          then
             Outer_Nam := Call_Name (Outer_Call);
@@ -3576,9 +3573,9 @@ package body Sem_Elab is
          return
            Nkind (Subp_Decl) = N_Subprogram_Renaming_Declaration
              and then not Comes_From_Source (Subp_Decl)
-             and then Nkind_In (Context, N_Function_Specification,
-                                         N_Package_Specification,
-                                         N_Procedure_Specification)
+             and then Nkind (Context) in N_Function_Specification
+                                       | N_Package_Specification
+                                       | N_Procedure_Specification
              and then Present (Generic_Parent (Context));
       end Is_Generic_Formal_Subp;
 
@@ -3612,10 +3609,10 @@ package body Sem_Elab is
 
       --  Nothing to do when the input does not denote a call or a requeue
 
-      elsif not Nkind_In (N, N_Entry_Call_Statement,
-                             N_Function_Call,
-                             N_Procedure_Call_Statement,
-                             N_Requeue_Statement)
+      elsif Nkind (N) not in N_Entry_Call_Statement
+                           | N_Function_Call
+                           | N_Procedure_Call_Statement
+                           | N_Requeue_Statement
       then
          return;
 
@@ -3624,7 +3621,7 @@ package body Sem_Elab is
       --  elaboration) is in effect.
 
       elsif Debug_Flag_Underscore_E
-        and then Nkind_In (N, N_Entry_Call_Statement, N_Requeue_Statement)
+        and then Nkind (N) in N_Entry_Call_Statement | N_Requeue_Statement
       then
          return;
 
@@ -3740,8 +3737,9 @@ package body Sem_Elab is
         (Marker, Find_Enclosing_Level (N) = Declaration_Level);
 
       Set_Is_Dispatching_Call
-        (Marker, Nkind_In (N, N_Function_Call, N_Procedure_Call_Statement)
-                   and then Present (Controlling_Argument (N)));
+        (Marker,
+         Nkind (N) in N_Function_Call | N_Procedure_Call_Statement
+           and then Present (Controlling_Argument (N)));
 
       Set_Is_Elaboration_Checks_OK_Node
         (Marker, Is_Elaboration_Checks_OK_Node (N));
@@ -4537,8 +4535,8 @@ package body Sem_Elab is
       --  statement due to expansion activities.
 
       if Nkind (Comp_Unit) = N_Null_Statement
-        and then Nkind_In (Original_Node (Comp_Unit), N_Protected_Body,
-                                                      N_Task_Body)
+        and then Nkind (Original_Node (Comp_Unit)) in
+                   N_Protected_Body | N_Task_Body
       then
          Comp_Unit := Parent (Comp_Unit);
          pragma Assert (Nkind (Comp_Unit) = N_Subunit);
@@ -4554,9 +4552,8 @@ package body Sem_Elab is
       --  the instantiated subprogram.
 
       if Nkind (Comp_Unit) = N_Package_Specification
-        and then Nkind_In (Original_Node (Parent (Comp_Unit)),
-                           N_Function_Instantiation,
-                           N_Procedure_Instantiation)
+        and then Nkind (Original_Node (Parent (Comp_Unit))) in
+                   N_Function_Instantiation | N_Procedure_Instantiation
       then
          Comp_Unit := Parent (Parent (Comp_Unit));
 
@@ -7031,7 +7028,7 @@ package body Sem_Elab is
                --  Enter encapsulators by inspecting their declarations and/or
                --  statements.
 
-               if Nkind_In (Curr, N_Block_Statement, N_Package_Body) then
+               if Nkind (Curr) in N_Block_Statement | N_Package_Body then
                   Enter_Handled_Body (Curr);
 
                elsif Nkind (Curr) = N_Package_Declaration then
@@ -7062,7 +7059,7 @@ package body Sem_Elab is
                --    amount of work, but has the beneficial effect of computing
                --    the early call regions of all preceding bodies.
 
-               elsif Nkind_In (Curr, N_Entry_Body, N_Subprogram_Body) then
+               elsif Nkind (Curr) in N_Entry_Body | N_Subprogram_Body then
                   Start :=
                     Find_Early_Call_Region
                       (Body_Decl        => Curr,
@@ -7098,9 +7095,9 @@ package body Sem_Elab is
                --    visible declarations -> upper level
                --    visible declarations -> terminate
 
-               if Nkind_In (Context, N_Package_Specification,
-                                     N_Protected_Definition,
-                                     N_Task_Definition)
+               if Nkind (Context) in N_Package_Specification
+                                   | N_Protected_Definition
+                                   | N_Task_Definition
                then
                   Transition_Spec_Declarations (Context, Curr);
 
@@ -7120,12 +7117,12 @@ package body Sem_Elab is
                --    declarations -> corresponding package spec (Elab_Body)
                --    declarations -> terminate
 
-               elsif Nkind_In (Context, N_Block_Statement,
-                                        N_Entry_Body,
-                                        N_Package_Body,
-                                        N_Protected_Body,
-                                        N_Subprogram_Body,
-                                        N_Task_Body)
+               elsif Nkind (Context) in N_Block_Statement
+                                      | N_Entry_Body
+                                      | N_Package_Body
+                                      | N_Protected_Body
+                                      | N_Subprogram_Body
+                                      | N_Task_Body
                then
                   Transition_Body_Declarations (Context, Curr);
 
@@ -7430,12 +7427,14 @@ package body Sem_Elab is
             --  The search must come from the statements of certain bodies or
             --  statements.
 
-            pragma Assert (Nkind_In (Bod, N_Block_Statement,
-                                          N_Entry_Body,
-                                          N_Package_Body,
-                                          N_Protected_Body,
-                                          N_Subprogram_Body,
-                                          N_Task_Body));
+            pragma Assert
+              (Nkind (Bod) in
+                 N_Block_Statement |
+                 N_Entry_Body      |
+                 N_Package_Body    |
+                 N_Protected_Body  |
+                 N_Subprogram_Body |
+                 N_Task_Body);
 
             --  The search must come from the statements of the handled
             --  sequence.
@@ -7831,7 +7830,7 @@ package body Sem_Elab is
          begin
             --  Nothing to do if the pragma is not related to elaboration
 
-            if not Nam_In (Prag_Nam, Name_Elaborate, Name_Elaborate_All) then
+            if Prag_Nam not in Name_Elaborate | Name_Elaborate_All then
                return;
 
             --  Nothing to do when the pragma is illegal
@@ -8006,7 +8005,7 @@ package body Sem_Elab is
          --    body -> spec
 
          if Present (Unit_Id)
-           and then Nkind_In (Unit_Id, N_Package_Body, N_Subprogram_Body)
+           and then Nkind (Unit_Id) in N_Package_Body | N_Subprogram_Body
          then
             Find_Elaboration_Context (Parent (Unit_Id));
 
@@ -8026,10 +8025,10 @@ package body Sem_Elab is
          --    parent spec -> grandparent spec and so on
 
          if Present (Unit_Id)
-           and then Nkind_In (Unit_Id, N_Generic_Package_Declaration,
-                                   N_Generic_Subprogram_Declaration,
-                                   N_Package_Declaration,
-                                   N_Subprogram_Declaration)
+           and then Nkind (Unit_Id) in N_Generic_Package_Declaration
+                                     | N_Generic_Subprogram_Declaration
+                                     | N_Package_Declaration
+                                     | N_Subprogram_Declaration
          then
             Find_Elaboration_Context (Parent (Unit_Id));
 
@@ -8110,7 +8109,7 @@ package body Sem_Elab is
          Prag_Nam : Name_Id;
          In_State : Processing_In_State)
       is
-         pragma Assert (Nam_In (Prag_Nam, Name_Elaborate, Name_Elaborate_All));
+         pragma Assert (Prag_Nam in Name_Elaborate | Name_Elaborate_All);
 
       begin
          --  Nothing to do when the need for prior elaboration came from a
@@ -8581,7 +8580,7 @@ package body Sem_Elab is
          Req_Nam  : Name_Id;
          In_State : Processing_In_State)
       is
-         pragma Assert (Nam_In (Req_Nam, Name_Elaborate, Name_Elaborate_All));
+         pragma Assert (Req_Nam in Name_Elaborate | Name_Elaborate_All);
 
          Main_Id : constant Entity_Id := Main_Unit_Entity;
          Unit_Id : constant Entity_Id := Find_Top_Unit (Targ_Id);
@@ -8777,8 +8776,7 @@ package body Sem_Elab is
             --  requirement.
 
             if Present (Unit_Prag)
-              and then Nam_In (Pragma_Name (Unit_Prag), Name_Elaborate_All,
-                                                        Req_Nam)
+              and then Pragma_Name (Unit_Prag) in Name_Elaborate_All | Req_Nam
             then
                Req_Met := True;
 
@@ -8907,10 +8905,10 @@ package body Sem_Elab is
 
       Par := N;
       while Present (Par) loop
-         if Nkind_In (Par, N_Package_Body,
-                           N_Package_Declaration,
-                           N_Subprogram_Body,
-                           N_Subprogram_Declaration)
+         if Nkind (Par) in N_Package_Body
+                         | N_Package_Declaration
+                         | N_Subprogram_Body
+                         | N_Subprogram_Declaration
            and then Is_Generic_Instance (Unique_Defining_Entity (Par))
          then
             return Par;
@@ -8983,10 +8981,10 @@ package body Sem_Elab is
       --  but are later relocated in a different context retain their original
       --  declaration level.
 
-      if Nkind_In (N, N_Call_Marker,
-                      N_Function_Instantiation,
-                      N_Package_Instantiation,
-                      N_Procedure_Instantiation)
+      if Nkind (N) in N_Call_Marker
+                    | N_Function_Instantiation
+                    | N_Package_Instantiation
+                    | N_Procedure_Instantiation
         and then Is_Declaration_Level_Node (N)
       then
          return Declaration_Level;
@@ -9007,7 +9005,7 @@ package body Sem_Elab is
          --  they are always elaborated when the enclosing context is invoked
          --  or elaborated.
 
-         elsif Nkind_In (Curr, N_Package_Body, N_Package_Declaration) then
+         elsif Nkind (Curr) in N_Package_Body | N_Package_Declaration then
             null;
 
          --  The current construct is a block statement
@@ -9039,9 +9037,8 @@ package body Sem_Elab is
 
          --  The current construct is a declaration-level encapsulator
 
-         elsif Nkind_In (Curr, N_Entry_Body,
-                               N_Subprogram_Body,
-                               N_Task_Body)
+         elsif Nkind (Curr) in
+                 N_Entry_Body | N_Subprogram_Body | N_Task_Body
          then
             --  If the traversal came from the handled sequence of statments,
             --  then the node cannot possibly appear at any level. This is
@@ -9129,8 +9126,8 @@ package body Sem_Elab is
       --  that of the "related instance".
 
       elsif Nkind (N) = N_Package_Declaration
-        and then Nkind_In (Orig_N, N_Function_Instantiation,
-                                   N_Procedure_Instantiation)
+        and then Nkind (Orig_N) in
+                   N_Function_Instantiation | N_Procedure_Instantiation
         and then Nkind (Context) = N_Compilation_Unit
       then
          return Related_Instance (Defining_Entity (N));
@@ -9141,8 +9138,8 @@ package body Sem_Elab is
 
       elsif Nkind (N) = N_Subunit
         and then Nkind (Proper_Body (N)) = N_Null_Statement
-        and then Nkind_In (Original_Node (Proper_Body (N)), N_Protected_Body,
-                                                            N_Task_Body)
+        and then Nkind (Original_Node (Proper_Body (N))) in
+                   N_Protected_Body | N_Task_Body
       then
          return Defining_Entity (Original_Node (Proper_Body (N)));
 
@@ -9168,7 +9165,7 @@ package body Sem_Elab is
          --  Handle various combinations of concurrent and private types
 
          loop
-            if Ekind_In (Typ, E_Protected_Type, E_Task_Type)
+            if Ekind (Typ) in E_Protected_Type | E_Task_Type
               and then Present (Anonymous_Object (Typ))
             then
                Typ := Anonymous_Object (Typ);
@@ -10911,13 +10908,10 @@ package body Sem_Elab is
          elsif Is_Task_Type (Id) then
             Rec := Create_Task_Rep (Id);
 
-         elsif Ekind_In (Id, E_Constant, E_Variable) then
+         elsif Ekind (Id) in E_Constant | E_Variable then
             Rec := Create_Variable_Rep (Id);
 
-         elsif Ekind_In (Id, E_Entry,
-                             E_Function,
-                             E_Operator,
-                             E_Procedure)
+         elsif Ekind (Id) in E_Entry | E_Function | E_Operator | E_Procedure
          then
             Rec := Create_Subprogram_Rep (Id);
 
@@ -12094,14 +12088,13 @@ package body Sem_Elab is
 
                --  The main unit is a body
 
-               if Ekind_In (Main_Unit_Id, E_Package_Body,
-                                          E_Subprogram_Body)
+               if Ekind (Main_Unit_Id) in E_Package_Body | E_Subprogram_Body
                then
                   return In_Body;
 
                --  The main unit is a stand-alone subprogram body
 
-               elsif Ekind_In (Main_Unit_Id, E_Function, E_Procedure)
+               elsif Ekind (Main_Unit_Id) in E_Function | E_Procedure
                  and then Nkind (Unit_Declaration_Node (Main_Unit_Id)) =
                             N_Subprogram_Body
                then
@@ -12116,8 +12109,7 @@ package body Sem_Elab is
             --  Otherwise the node is in the complementary unit of the main
             --  unit. The main unit is a body, the node is in the spec.
 
-            elsif Ekind_In (Main_Unit_Id, E_Package_Body,
-                                          E_Subprogram_Body)
+            elsif Ekind (Main_Unit_Id) in E_Package_Body | E_Subprogram_Body
             then
                return In_Spec;
 
@@ -12342,8 +12334,8 @@ package body Sem_Elab is
 
             --  Protected type
 
-            elsif Nkind_In (Decl, N_Protected_Type_Declaration,
-                                  N_Single_Protected_Declaration)
+            elsif Nkind (Decl) in N_Protected_Type_Declaration
+                                | N_Single_Protected_Declaration
             then
                Process_Protected_Type_Declaration
                  (Prot_Decl => Decl,
@@ -12351,8 +12343,8 @@ package body Sem_Elab is
 
             --  Subprogram or entry
 
-            elsif Nkind_In (Decl, N_Entry_Declaration,
-                                  N_Subprogram_Declaration)
+            elsif Nkind (Decl) in N_Entry_Declaration
+                                | N_Subprogram_Declaration
             then
                Process_Subprogram_Declaration
                  (Subp_Decl => Decl,
@@ -12376,8 +12368,8 @@ package body Sem_Elab is
 
             --  Task type
 
-            elsif Nkind_In (Decl, N_Single_Task_Declaration,
-                                  N_Task_Type_Declaration)
+            elsif Nkind (Decl) in N_Single_Task_Declaration
+                                | N_Task_Type_Declaration
             then
                Process_Task_Type_Declaration
                  (Task_Decl => Decl,
@@ -12497,7 +12489,7 @@ package body Sem_Elab is
          --  Nothing to do for an abstract subprogram because it has no body to
          --  examine.
 
-         elsif Ekind_In (Subp_Id, E_Function, E_Procedure)
+         elsif Ekind (Subp_Id) in E_Function | E_Procedure
            and then Is_Abstract_Subprogram (Subp_Id)
          then
             return;
@@ -12513,7 +12505,7 @@ package body Sem_Elab is
          --  DFS traversal into its barrier function and body.
 
          if In_Extended_Main_Code_Unit (Subp_Id) then
-            if Ekind_In (Subp_Id, E_Entry, E_Entry_Family, E_Procedure) then
+            if Ekind (Subp_Id) in E_Entry | E_Entry_Family | E_Procedure then
                Traverse_Invocation_Body
                  (N        => Barrier_Body_Declaration (Subp_Rep),
                   In_State => In_State);
@@ -12893,8 +12885,8 @@ package body Sem_Elab is
          --  Process the entries of the task type because they represent valid
          --  entry points into the task body.
 
-         if Nkind_In (Task_Decl, N_Single_Task_Declaration,
-                                 N_Task_Type_Declaration)
+         if Nkind (Task_Decl) in N_Single_Task_Declaration
+                               | N_Task_Type_Declaration
          then
             Task_Def := Task_Definition (Task_Decl);
 
@@ -13192,10 +13184,8 @@ package body Sem_Elab is
             --  Entry, operator, or subprogram call. This case must come last
             --  because most invocations above are variations of this case.
 
-            elsif Ekind_In (Targ_Id, E_Entry,
-                                     E_Function,
-                                     E_Operator,
-                                     E_Procedure)
+            elsif Ekind (Targ_Id) in
+                    E_Entry | E_Function | E_Operator | E_Procedure
             then
                Extra := Empty;
                Kind  := Call;
@@ -14460,9 +14450,7 @@ package body Sem_Elab is
       begin
          --  An abstract subprogram does not have a body
 
-         if Ekind_In (Subp_Id, E_Function,
-                               E_Operator,
-                               E_Procedure)
+         if Ekind (Subp_Id) in E_Function | E_Operator | E_Procedure
            and then Is_Abstract_Subprogram (Subp_Id)
          then
             return True;
@@ -14510,9 +14498,8 @@ package body Sem_Elab is
          Formal_Id : Entity_Id;
 
       begin
-         pragma Assert (Nam_In (Subp_Nam, Name_Adjust,
-                                          Name_Finalize,
-                                          Name_Initialize));
+         pragma Assert
+           (Subp_Nam in Name_Adjust | Name_Finalize | Name_Initialize);
 
          --  To qualify, the subprogram must denote a source procedure with
          --  name Adjust, Finalize, or Initialize where the sole formal is
@@ -14700,7 +14687,7 @@ package body Sem_Elab is
          --  protected type.
 
          return
-           Ekind_In (Id, E_Function, E_Procedure)
+           Ekind (Id) in E_Function | E_Procedure
              and then Is_Protected_Type (Non_Private_View (Scope (Id)));
       end Is_Protected_Subp;
 
@@ -14714,7 +14701,7 @@ package body Sem_Elab is
          --  Protected_Subprogram set.
 
          return
-           Ekind_In (Id, E_Function, E_Procedure)
+           Ekind (Id) in E_Function | E_Procedure
              and then Present (Protected_Subprogram (Id));
       end Is_Protected_Body_Subp;
 
@@ -14766,7 +14753,7 @@ package body Sem_Elab is
          --  is hidden within an anonymous package, and is a generic instance.
 
          return
-           Ekind_In (Id, E_Function, E_Procedure)
+           Ekind (Id) in E_Function | E_Procedure
              and then Is_Hidden (Id)
              and then Is_Generic_Instance (Id);
       end Is_Subprogram_Inst;
@@ -14835,7 +14822,7 @@ package body Sem_Elab is
              --  The attribute name must be one of the 'Access forms. Note that
              --  'Unchecked_Access cannot apply to a subprogram.
 
-             and then Nam_In (Nam, Name_Access, Name_Unrestricted_Access);
+             and then Nam in Name_Access | Name_Unrestricted_Access;
       end Is_Suitable_Access_Taken;
 
       ----------------------
@@ -15869,10 +15856,10 @@ package body Sem_Elab is
 
       --  Bodies
 
-      if Nkind_In (N, N_Package_Body,
-                      N_Protected_Body,
-                      N_Subprogram_Body,
-                      N_Task_Body)
+      if Nkind (N) in N_Package_Body
+                    | N_Protected_Body
+                    | N_Subprogram_Body
+                    | N_Task_Body
       then
          Spec_Id := Corresponding_Spec (N);
 
@@ -15892,13 +15879,13 @@ package body Sem_Elab is
 
       --  Declarations
 
-      elsif Nkind_In (N, N_Entry_Declaration,
-                         N_Generic_Package_Declaration,
-                         N_Generic_Subprogram_Declaration,
-                         N_Package_Declaration,
-                         N_Protected_Type_Declaration,
-                         N_Subprogram_Declaration,
-                         N_Task_Type_Declaration)
+      elsif Nkind (N) in N_Entry_Declaration
+                       | N_Generic_Package_Declaration
+                       | N_Generic_Subprogram_Declaration
+                       | N_Package_Declaration
+                       | N_Protected_Type_Declaration
+                       | N_Subprogram_Declaration
+                       | N_Task_Type_Declaration
       then
          Spec_Decl := N;
 
@@ -15972,12 +15959,12 @@ package body Sem_Elab is
 
       begin
          return
-           Nkind_In (Decl, N_Generic_Package_Declaration,
-                           N_Generic_Subprogram_Declaration,
-                           N_Package_Declaration,
-                           N_Protected_Type_Declaration,
-                           N_Subprogram_Declaration,
-                           N_Task_Type_Declaration)
+           Nkind (Decl) in N_Generic_Package_Declaration
+                         | N_Generic_Subprogram_Declaration
+                         | N_Package_Declaration
+                         | N_Protected_Type_Declaration
+                         | N_Subprogram_Declaration
+                         | N_Task_Type_Declaration
              and then Present (Corresponding_Body (Decl))
              and then Nkind (Parent (Unit_Declaration_Node
                         (Corresponding_Body (Decl)))) = N_Subunit;
@@ -16846,8 +16833,8 @@ package body Sem_Elab is
          if Nkind (Decl) = N_Subprogram_Body then
             Body_Acts_As_Spec := True;
 
-         elsif Nkind_In (Decl, N_Subprogram_Declaration,
-                               N_Subprogram_Body_Stub)
+         elsif Nkind (Decl) in
+                 N_Subprogram_Declaration | N_Subprogram_Body_Stub
            or else Inst_Case
          then
             Body_Acts_As_Spec := False;
@@ -17523,8 +17510,7 @@ package body Sem_Elab is
 
       P := Parent (N);
       while Present (P) loop
-         if Nkind_In (P, N_Parameter_Specification,
-                         N_Component_Declaration)
+         if Nkind (P) in N_Parameter_Specification | N_Component_Declaration
          then
             return;
 
@@ -17619,8 +17605,8 @@ package body Sem_Elab is
                   --  Filter out case of default expressions, where we do not
                   --  do the check at this stage.
 
-                  if Nkind_In (P, N_Parameter_Specification,
-                                  N_Component_Declaration)
+                  if Nkind (P) in
+                       N_Parameter_Specification | N_Component_Declaration
                   then
                      return;
                   end if;
@@ -17631,10 +17617,10 @@ package body Sem_Elab is
                   if Nkind (P) = N_Protected_Body then
                      return;
 
-                  elsif Nkind_In (P, N_Subprogram_Body,
-                                     N_Task_Body,
-                                     N_Block_Statement,
-                                     N_Entry_Body)
+                  elsif Nkind (P) in N_Subprogram_Body
+                                   | N_Task_Body
+                                   | N_Block_Statement
+                                   | N_Entry_Body
                   then
                      if L = Declarations (P) then
                         exit;
@@ -17857,10 +17843,7 @@ package body Sem_Elab is
       --  then there is nothing to do (we do not know what is being assigned),
       --  but otherwise this is an assignment to the prefix.
 
-      if Nkind_In (N, N_Indexed_Component,
-                      N_Selected_Component,
-                      N_Slice)
-      then
+      if Nkind (N) in N_Indexed_Component | N_Selected_Component | N_Slice then
          if not Is_Access_Type (Etype (Prefix (N))) then
             Check_Elab_Assign (Prefix (N));
          end if;
@@ -18285,9 +18268,9 @@ package body Sem_Elab is
       --  If not function or procedure call, instantiation, or 'Access, then
       --  ignore call (this happens in some error cases and rewriting cases).
 
-      elsif not Nkind_In (N, N_Attribute_Reference,
-                             N_Function_Call,
-                             N_Procedure_Call_Statement)
+      elsif Nkind (N) not in N_Attribute_Reference
+                           | N_Function_Call
+                           | N_Procedure_Call_Statement
         and then not Inst_Case
       then
          return;
@@ -18387,8 +18370,8 @@ package body Sem_Elab is
          --  code, do not trace past an accept statement, because the rendez-
          --  vous will happen after elaboration.
 
-         if Nkind_In (Original_Node (N), N_Accept_Statement,
-                                         N_Selective_Accept)
+         if Nkind (Original_Node (N)) in
+              N_Accept_Statement | N_Selective_Accept
            and then Restriction_Active (No_Entry_Calls_In_Elaboration_Code)
          then
             return Abandon;
@@ -18421,8 +18404,8 @@ package body Sem_Elab is
 
          elsif not Debug_Flag_Dot_UU
            and then Nkind (N) = N_Attribute_Reference
-           and then Nam_In (Attribute_Name (N), Name_Access,
-                                                Name_Unrestricted_Access)
+           and then
+             Attribute_Name (N) in Name_Access | Name_Unrestricted_Access
            and then Is_Entity_Name (Prefix (N))
            and then Is_Subprogram (Entity (Prefix (N)))
          then
@@ -18503,7 +18486,7 @@ package body Sem_Elab is
 
       Sbody := Unit_Declaration_Node (E);
 
-      if not Nkind_In (Sbody, N_Subprogram_Body, N_Package_Body) then
+      if Nkind (Sbody) not in N_Subprogram_Body | N_Package_Body then
          Ebody := Corresponding_Body (Sbody);
 
          if No (Ebody) then
@@ -18597,7 +18580,7 @@ package body Sem_Elab is
                --  Check we have an If statement or a null statement (happens
                --  when the If has been expanded to be True).
 
-               exit when not Nkind_In (P, N_If_Statement, N_Null_Statement);
+               exit when Nkind (P) not in N_If_Statement | N_Null_Statement;
 
                --  Our special case will be indicated either by the pragma
                --  coming from an aspect ...
@@ -18758,9 +18741,9 @@ package body Sem_Elab is
                --  A rather specific check. For Finalize/Adjust/Initialize, if
                --  the type has Warnings_Off set, suppress the warning.
 
-               if Nam_In (Chars (E), Name_Adjust,
-                                     Name_Finalize,
-                                     Name_Initialize)
+               if Chars (E) in Name_Adjust
+                             | Name_Finalize
+                             | Name_Initialize
                  and then Present (First_Formal (E))
                then
                   declare
@@ -19378,7 +19361,7 @@ package body Sem_Elab is
 
    function Is_Call_Of_Generic_Formal (N : Node_Id) return Boolean is
    begin
-      return Nkind_In (N, N_Function_Call, N_Procedure_Call_Statement)
+      return Nkind (N) in N_Function_Call | N_Procedure_Call_Statement
 
         --  Always return False if debug flag -gnatd.G is set
 
@@ -19545,7 +19528,7 @@ package body Sem_Elab is
       S1 := Scop1;
       while S1 /= Standard_Standard
         and then not Is_Compilation_Unit (S1)
-        and then Ekind_In (S1, E_Package, E_Protected_Type, E_Block)
+        and then Ekind (S1) in E_Package | E_Protected_Type | E_Block
       loop
          S1 := Scope (S1);
       end loop;
@@ -19555,7 +19538,7 @@ package body Sem_Elab is
       S2 := Scop2;
       while S2 /= Standard_Standard
         and then not Is_Compilation_Unit (S2)
-        and then Ekind_In (S2, E_Package, E_Protected_Type, E_Block)
+        and then Ekind (S2) in E_Package | E_Protected_Type | E_Block
       loop
          S2 := Scope (S2);
       end loop;
@@ -19680,7 +19663,7 @@ package body Sem_Elab is
       --  Check for case of body entity
       --  Why is the check for E_Void needed???
 
-      if Ekind_In (E, E_Void, E_Subprogram_Body, E_Package_Body) then
+      if Ekind (E) in E_Void | E_Subprogram_Body | E_Package_Body then
          Decl := E;
 
          loop
index 1ecb1bd31e3d420836146309f6254ce31a4d32fa..d693a8de453836c4e90d28049e4492657e58c589 100644 (file)
@@ -428,7 +428,7 @@ package body Sem_Elim is
 
             --  Check for case of subprogram
 
-            elsif Ekind_In (E, E_Function, E_Procedure) then
+            elsif Ekind (E) in E_Function | E_Procedure then
 
                --  If Source_Location present, then see if it matches
 
index 6707aaa5ded55c7c70c8866f88ad48f8c7dd2d1c..8c13abc7000979a8dcf4bca09a189f5b7c3df56f 100644 (file)
@@ -626,8 +626,8 @@ package body Sem_Eval is
             --  Determine if the out-of-range violation constitutes a warning
             --  or an error based on context, according to RM 4.9 (34/3).
 
-            elsif Nkind_In (Original_Node (N), N_Type_Conversion,
-                                               N_Qualified_Expression)
+            elsif Nkind (Original_Node (N)) in
+                    N_Type_Conversion | N_Qualified_Expression
               and then Comes_From_Source (Original_Node (N))
             then
                Apply_Compile_Time_Constraint_Error
@@ -958,7 +958,7 @@ package body Sem_Eval is
          --  Fixup only required for First/Last attribute reference
 
          if Nkind (N) = N_Attribute_Reference
-           and then Nam_In (Attribute_Name (N), Name_First, Name_Last)
+           and then Attribute_Name (N) in Name_First | Name_Last
          then
             Xtyp := Etype (Prefix (N));
 
@@ -1111,8 +1111,8 @@ package body Sem_Eval is
          --  Values are the same if they refer to the same entity and the
          --  entity is nonvolatile.
 
-         elsif Nkind_In (Lf, N_Identifier, N_Expanded_Name)
-           and then Nkind_In (Rf, N_Identifier, N_Expanded_Name)
+         elsif Nkind (Lf) in N_Identifier | N_Expanded_Name
+           and then Nkind (Rf) in N_Identifier | N_Expanded_Name
            and then Entity (Lf) = Entity (Rf)
 
            --  If the entity is a discriminant, the two expressions may be
@@ -1154,9 +1154,9 @@ package body Sem_Eval is
 
          elsif Nkind (Lf) = N_Attribute_Reference
            and then Attribute_Name (Lf) = Attribute_Name (Rf)
-           and then Nam_In (Attribute_Name (Lf), Name_First, Name_Last)
-           and then Nkind_In (Prefix (Lf), N_Identifier, N_Expanded_Name)
-           and then Nkind_In (Prefix (Rf), N_Identifier, N_Expanded_Name)
+           and then Attribute_Name (Lf) in Name_First | Name_Last
+           and then Nkind (Prefix (Lf)) in N_Identifier | N_Expanded_Name
+           and then Nkind (Prefix (Rf)) in N_Identifier | N_Expanded_Name
            and then Entity (Prefix (Lf)) = Entity (Prefix (Rf))
            and then Is_Same_Subscript (Expressions (Lf), Expressions (Rf))
          then
@@ -1849,11 +1849,8 @@ package body Sem_Eval is
 
          --  Other literals and NULL are known at compile time
 
-         elsif
-            Nkind_In (K, N_Character_Literal,
-                         N_Real_Literal,
-                         N_String_Literal,
-                         N_Null)
+         elsif K in
+           N_Character_Literal | N_Real_Literal | N_String_Literal | N_Null
          then
             return True;
          end if;
@@ -2830,11 +2827,11 @@ package body Sem_Eval is
          --  so we can safely ignore these cases.
 
          return
-           Nkind_In (Context, N_Attribute_Definition_Clause,
-                              N_Attribute_Reference,
-                              N_Modular_Type_Definition,
-                              N_Number_Declaration,
-                              N_Signed_Integer_Type_Definition);
+           Nkind (Context) in N_Attribute_Definition_Clause
+                            | N_Attribute_Reference
+                            | N_Modular_Type_Definition
+                            | N_Number_Declaration
+                            | N_Signed_Integer_Type_Definition;
       end In_Any_Integer_Context;
 
       --  Local variables
@@ -2857,10 +2854,10 @@ package body Sem_Eval is
       --  Check_Non_Static_Context on an expanded literal may lead to spurious
       --  and misleading warnings.
 
-      if (Nkind_In (Par, N_Case_Expression_Alternative, N_If_Expression)
+      if (Nkind (Par) in N_Case_Expression_Alternative | N_If_Expression
            or else Nkind (Par) not in N_Subexpr)
-        and then (not Nkind_In (Par, N_Case_Expression_Alternative,
-                                     N_If_Expression)
+        and then (Nkind (Par) not in N_Case_Expression_Alternative
+                                   | N_If_Expression
                    or else Comes_From_Source (N))
         and then not In_Any_Integer_Context (Par)
       then
@@ -3720,7 +3717,7 @@ package body Sem_Eval is
       if Is_Array_Type (Left_Typ)
         and then Left_Typ /= Any_Composite
         and then Number_Dimensions (Left_Typ) = 1
-        and then Nkind_In (N, N_Op_Eq, N_Op_Ne)
+        and then Nkind (N) in N_Op_Eq | N_Op_Ne
       then
          if Raises_Constraint_Error (Left)
               or else
@@ -3775,7 +3772,7 @@ package body Sem_Eval is
          if Is_String_Type (Left_Typ) then
             if Ada_Version < Ada_2020
               and then (Comes_From_Source (N)
-                         or else not Nkind_In (N, N_Op_Eq, N_Op_Ne))
+                         or else Nkind (N) not in N_Op_Eq | N_Op_Ne)
             then
                Is_Static_Expression := False;
                Set_Is_Static_Expression (N, False);
@@ -5005,7 +5002,7 @@ package body Sem_Eval is
 
    function Get_String_Val (N : Node_Id) return Node_Id is
    begin
-      if Nkind_In (N, N_String_Literal, N_Character_Literal) then
+      if Nkind (N) in N_String_Literal | N_Character_Literal then
          return N;
       else
          pragma Assert (Is_Entity_Name (N));
@@ -6593,8 +6590,8 @@ package body Sem_Eval is
          if Can_Never_Be_Null (T1) /= Can_Never_Be_Null (T2) then
             return False;
 
-         elsif Ekind_In (T1, E_Access_Subprogram_Type,
-                             E_Anonymous_Access_Subprogram_Type)
+         elsif Ekind (T1) in E_Access_Subprogram_Type
+                           | E_Anonymous_Access_Subprogram_Type
          then
             return
               Subtype_Conformant
@@ -7302,9 +7299,8 @@ package body Sem_Eval is
             --  Flag array cases
 
             elsif Is_Array_Type (E) then
-               if not Nam_In (Attribute_Name (N), Name_First,
-                                                  Name_Last,
-                                                  Name_Length)
+               if Attribute_Name (N)
+                    not in Name_First | Name_Last | Name_Length
                then
                   Error_Msg_N
                     ("!static array attribute must be Length, First, or Last "
index fcb9ce3237c498e78051502aec9322ae06fd6509..15bb146f5ba4f3a8a537606661c2142bb0b7ec24 100644 (file)
@@ -76,7 +76,7 @@ package body Sem_Intr is
 
    procedure Check_Exception_Function (E : Entity_Id; N : Node_Id) is
    begin
-      if not Ekind_In (E, E_Function, E_Generic_Function) then
+      if Ekind (E) not in E_Function | E_Generic_Function then
          Errint
            ("intrinsic exception subprogram must be a function", E, N);
 
@@ -129,9 +129,9 @@ package body Sem_Intr is
       --  literal is legal even in Ada 83 mode, where such literals are
       --  not static.
 
-      if Nam_In (Cnam, Name_Import_Address,
-                       Name_Import_Largest_Value,
-                       Name_Import_Value)
+      if Cnam in Name_Import_Address
+               | Name_Import_Largest_Value
+               | Name_Import_Value
       then
          if Etype (Arg1) = Any_Type
            or else Raises_Constraint_Error (Arg1)
@@ -190,13 +190,14 @@ package body Sem_Intr is
    begin
       --  Arithmetic operators
 
-      if Nam_In (Nam, Name_Op_Add, Name_Op_Subtract, Name_Op_Multiply,
-                      Name_Op_Divide, Name_Op_Rem, Name_Op_Mod, Name_Op_Abs)
+      if Nam in Name_Op_Add    | Name_Op_Subtract | Name_Op_Multiply |
+                Name_Op_Divide | Name_Op_Rem      | Name_Op_Mod      |
+                Name_Op_Abs
       then
          T1 := Etype (First_Formal (E));
 
          if No (Next_Formal (First_Formal (E))) then
-            if Nam_In (Nam, Name_Op_Add, Name_Op_Subtract, Name_Op_Abs) then
+            if Nam in Name_Op_Add | Name_Op_Subtract | Name_Op_Abs then
                T2 := T1;
 
             --  Previous error in declaration
@@ -231,8 +232,8 @@ package body Sem_Intr is
 
       --  Comparison operators
 
-      elsif Nam_In (Nam, Name_Op_Eq, Name_Op_Ge, Name_Op_Gt, Name_Op_Le,
-                         Name_Op_Lt, Name_Op_Ne)
+      elsif Nam in Name_Op_Eq | Name_Op_Ge | Name_Op_Gt | Name_Op_Le |
+                   Name_Op_Lt | Name_Op_Ne
       then
          T1 := Etype (First_Formal (E));
 
@@ -327,8 +328,8 @@ package body Sem_Intr is
       --  Shift cases. We allow user specification of intrinsic shift operators
       --  for any numeric types.
 
-      elsif Nam_In (Nam, Name_Rotate_Left, Name_Rotate_Right, Name_Shift_Left,
-                         Name_Shift_Right, Name_Shift_Right_Arithmetic)
+      elsif Nam in Name_Rotate_Left | Name_Rotate_Right | Name_Shift_Left |
+                   Name_Shift_Right | Name_Shift_Right_Arithmetic
       then
          Check_Shift (E, N);
 
@@ -344,9 +345,9 @@ package body Sem_Intr is
 
       --  Exception functions
 
-      elsif Nam_In (Nam, Name_Exception_Information,
-                         Name_Exception_Message,
-                         Name_Exception_Name)
+      elsif Nam in Name_Exception_Information
+                 | Name_Exception_Message
+                 | Name_Exception_Name
       then
          Check_Exception_Function (E, N);
 
@@ -357,13 +358,13 @@ package body Sem_Intr is
 
       --  Source_Location and navigation functions
 
-      elsif Nam_In (Nam, Name_File,
-                         Name_Line,
-                         Name_Source_Location,
-                         Name_Enclosing_Entity,
-                         Name_Compilation_ISO_Date,
-                         Name_Compilation_Date,
-                         Name_Compilation_Time)
+      elsif Nam in Name_File
+                 | Name_Line
+                 | Name_Source_Location
+                 | Name_Enclosing_Entity
+                 | Name_Compilation_ISO_Date
+                 | Name_Compilation_Date
+                 | Name_Compilation_Time
       then
          null;
 
@@ -388,7 +389,7 @@ package body Sem_Intr is
       Ptyp2 : Node_Id;
 
    begin
-      if not Ekind_In (E, E_Function, E_Generic_Function) then
+      if Ekind (E) not in E_Function | E_Generic_Function then
          Errint ("intrinsic shift subprogram must be a function", E, N);
          return;
       end if;
index 0c6c822ca632a36dc6dffc706ba8d83de8614660..4130cd811b6e0cacf1f66755509a12ebcffee4a9 100644 (file)
@@ -230,8 +230,8 @@ package body Sem_Mech is
                      --  OUT and IN OUT parameters of record types are passed
                      --  by reference regardless of pragmas (RM B.3 (69/2)).
 
-                     elsif Ekind_In (Formal, E_Out_Parameter,
-                                             E_In_Out_Parameter)
+                     elsif Ekind (Formal) in
+                             E_Out_Parameter | E_In_Out_Parameter
                      then
                         Set_Mechanism (Formal, By_Reference);
 
index a8f89876702829ea54344e066ced9222a710646c..b7148d80f8ce962f16a05219ca5bdb2c9e484ccb 100644 (file)
@@ -697,8 +697,8 @@ package body Sem_Prag is
          elsif Ekind (Item_Id) = E_Constant then
             Add_Str_To_Name_Buffer ("constant");
 
-         elsif Ekind_In (Item_Id, E_Generic_In_Out_Parameter,
-                                  E_Generic_In_Parameter)
+         elsif Ekind (Item_Id) in
+                 E_Generic_In_Out_Parameter | E_Generic_In_Parameter
          then
             Add_Str_To_Name_Buffer ("generic parameter");
 
@@ -972,32 +972,32 @@ package body Sem_Prag is
 
                   --  Constants
 
-                  if Ekind_In (Item_Id, E_Constant, E_Loop_Parameter)
+                  if Ekind (Item_Id) in E_Constant | E_Loop_Parameter
                       or else
 
                     --  Current instances of concurrent types
 
-                    Ekind_In (Item_Id, E_Protected_Type, E_Task_Type)
+                    Ekind (Item_Id) in E_Protected_Type | E_Task_Type
                       or else
 
                     --  Formal parameters
 
-                    Ekind_In (Item_Id, E_Generic_In_Out_Parameter,
-                                       E_Generic_In_Parameter,
-                                       E_In_Parameter,
-                                       E_In_Out_Parameter,
-                                       E_Out_Parameter)
+                    Ekind (Item_Id) in E_Generic_In_Out_Parameter
+                                     | E_Generic_In_Parameter
+                                     | E_In_Parameter
+                                     | E_In_Out_Parameter
+                                     | E_Out_Parameter
                       or else
 
                     --  States, variables
 
-                    Ekind_In (Item_Id, E_Abstract_State, E_Variable)
+                    Ekind (Item_Id) in E_Abstract_State | E_Variable
                   then
                      --  A [generic] function is not allowed to have Output
                      --  items in its dependency relations. Note that "null"
                      --  and attribute 'Result are still valid items.
 
-                     if Ekind_In (Spec_Id, E_Function, E_Generic_Function)
+                     if Ekind (Spec_Id) in E_Function | E_Generic_Function
                        and then not Is_Input
                      then
                         SPARK_Msg_N
@@ -1009,7 +1009,7 @@ package body Sem_Prag is
                      --  they behave as objects in the context of pragma
                      --  [Refined_]Depends.
 
-                     if Ekind_In (Item_Id, E_Protected_Type, E_Task_Type) then
+                     if Ekind (Item_Id) in E_Protected_Type | E_Task_Type then
 
                         --  This use is legal as long as the concurrent type is
                         --  the current instance of an enclosing type.
@@ -1144,9 +1144,9 @@ package body Sem_Prag is
                            Ref    => Item);
                      end if;
 
-                     if Ekind_In (Item_Id, E_Abstract_State,
-                                           E_Constant,
-                                           E_Variable)
+                     if Ekind (Item_Id) in E_Abstract_State
+                                         | E_Constant
+                                         | E_Variable
                        and then Present (Encapsulating_State (Item_Id))
                      then
                         Append_New_Elmt (Item_Id, Constits_Seen);
@@ -1222,7 +1222,7 @@ package body Sem_Prag is
 
       procedure Check_Function_Return is
       begin
-         if Ekind_In (Spec_Id, E_Function, E_Generic_Function)
+         if Ekind (Spec_Id) in E_Function | E_Generic_Function
            and then not Result_Seen
          then
             SPARK_Msg_NE
@@ -1269,9 +1269,9 @@ package body Sem_Prag is
             Adjusted_Kind : Entity_Kind := Ekind (Item_Id);
 
          begin
-            if Ekind_In (Item_Id, E_Constant,
-                                  E_Generic_In_Parameter,
-                                  E_In_Parameter)
+            if Ekind (Item_Id) in E_Constant
+                                | E_Generic_In_Parameter
+                                | E_In_Parameter
               and then Is_Access_Type (Etype (Item_Id))
             then
                Adjusted_Kind := E_Variable;
@@ -2280,7 +2280,7 @@ package body Sem_Prag is
                --  the current instance of an enclosing protected or task type
                --  (SPARK RM 6.1.4).
 
-               elsif Ekind_In (Item_Id, E_Protected_Type, E_Task_Type) then
+               elsif Ekind (Item_Id) in E_Protected_Type | E_Task_Type then
                   if Is_CCT_Instance (Item_Id, Spec_Id) then
 
                      --  Pragma [Refined_]Global associated with a protected
@@ -2367,10 +2367,10 @@ package body Sem_Prag is
                --  The only legal references are those to abstract states,
                --  objects and various kinds of constants (SPARK RM 6.1.4(4)).
 
-               elsif not Ekind_In (Item_Id, E_Abstract_State,
-                                            E_Constant,
-                                            E_Loop_Parameter,
-                                            E_Variable)
+               elsif Ekind (Item_Id) not in E_Abstract_State
+                                          | E_Constant
+                                          | E_Loop_Parameter
+                                          | E_Variable
                then
                   SPARK_Msg_N
                     ("global item must denote object, state or current "
@@ -2414,7 +2414,7 @@ package body Sem_Prag is
                   --  nonvolatile function (SPARK RM 7.1.3(8)).
 
                   elsif Is_External_State (Item_Id)
-                    and then Ekind_In (Spec_Id, E_Function, E_Generic_Function)
+                    and then Ekind (Spec_Id) in E_Function | E_Generic_Function
                     and then not Is_Volatile_Function (Spec_Id)
                   then
                      SPARK_Msg_NE
@@ -2441,7 +2441,7 @@ package body Sem_Prag is
                   --  Unless it is of an access type, a constant is a read-only
                   --  item, therefore it cannot act as an output.
 
-                  if Nam_In (Global_Mode, Name_In_Out, Name_Output) then
+                  if Global_Mode in Name_In_Out | Name_Output then
                      SPARK_Msg_NE
                        ("constant & cannot act as output", Item, Item_Id);
                      return;
@@ -2454,7 +2454,7 @@ package body Sem_Prag is
                   --  A loop parameter is a read-only item, therefore it cannot
                   --  act as an output.
 
-                  if Nam_In (Global_Mode, Name_In_Out, Name_Output) then
+                  if Global_Mode in Name_In_Out | Name_Output then
                      SPARK_Msg_NE
                        ("loop parameter & cannot act as output",
                         Item, Item_Id);
@@ -2472,7 +2472,7 @@ package body Sem_Prag is
                   --  An effectively volatile object cannot appear as a global
                   --  item of a nonvolatile function (SPARK RM 7.1.3(8)).
 
-                  if Ekind_In (Spec_Id, E_Function, E_Generic_Function)
+                  if Ekind (Spec_Id) in E_Function | E_Generic_Function
                     and then not Is_Volatile_Function (Spec_Id)
                   then
                      Error_Msg_NE
@@ -2515,7 +2515,7 @@ package body Sem_Prag is
             --  Verify that an output does not appear as an input in an
             --  enclosing subprogram.
 
-            if Nam_In (Global_Mode, Name_In_Out, Name_Output) then
+            if Global_Mode in Name_In_Out | Name_Output then
                Check_Mode_Restriction_In_Enclosing_Context (Item, Item_Id);
             end if;
 
@@ -2546,7 +2546,7 @@ package body Sem_Prag is
                      Ref    => Item);
                end if;
 
-               if Ekind_In (Item_Id, E_Abstract_State, E_Constant, E_Variable)
+               if Ekind (Item_Id) in E_Abstract_State | E_Constant | E_Variable
                  and then Present (Encapsulating_State (Item_Id))
                then
                   Append_New_Elmt (Item_Id, Constits_Seen);
@@ -2650,7 +2650,7 @@ package body Sem_Prag is
 
          procedure Check_Mode_Restriction_In_Function (Mode : Node_Id) is
          begin
-            if Ekind_In (Spec_Id, E_Function, E_Generic_Function) then
+            if Ekind (Spec_Id) in E_Function | E_Generic_Function then
                SPARK_Msg_N
                  ("global mode & is not applicable to functions", Mode);
             end if;
@@ -2670,9 +2670,9 @@ package body Sem_Prag is
 
          --  Single global item declaration
 
-         elsif Nkind_In (List, N_Expanded_Name,
-                               N_Identifier,
-                               N_Selected_Component)
+         elsif Nkind (List) in N_Expanded_Name
+                             | N_Identifier
+                             | N_Selected_Component
          then
             Analyze_Global_Item (List, Global_Mode);
 
@@ -2927,9 +2927,8 @@ package body Sem_Prag is
             Item_Id := Entity_Of (Item);
 
             if Present (Item_Id)
-              and then Ekind_In (Item_Id, E_Abstract_State,
-                                          E_Constant,
-                                          E_Variable)
+              and then Ekind (Item_Id) in
+                         E_Abstract_State | E_Constant | E_Variable
             then
                --  When the initialization item is undefined, it appears as
                --  Any_Id. Do not continue with the analysis of the item.
@@ -3039,16 +3038,16 @@ package body Sem_Prag is
                   Input_Id := Entity_Of (Input);
 
                   if Present (Input_Id)
-                    and then Ekind_In (Input_Id, E_Abstract_State,
-                                                 E_Constant,
-                                                 E_Generic_In_Out_Parameter,
-                                                 E_Generic_In_Parameter,
-                                                 E_In_Parameter,
-                                                 E_In_Out_Parameter,
-                                                 E_Out_Parameter,
-                                                 E_Protected_Type,
-                                                 E_Task_Type,
-                                                 E_Variable)
+                    and then Ekind (Input_Id) in E_Abstract_State
+                                               | E_Constant
+                                               | E_Generic_In_Out_Parameter
+                                               | E_Generic_In_Parameter
+                                               | E_In_Parameter
+                                               | E_In_Out_Parameter
+                                               | E_Out_Parameter
+                                               | E_Protected_Type
+                                               | E_Task_Type
+                                               | E_Variable
                   then
                      --  The input cannot denote states or objects declared
                      --  within the related package (SPARK RM 7.1.5(4)).
@@ -3061,12 +3060,12 @@ package body Sem_Prag is
                         --  it is allowed for an initialization item to depend
                         --  on an input item.
 
-                        if Ekind_In (Input_Id, E_Generic_In_Out_Parameter,
-                                               E_Generic_In_Parameter)
+                        if Ekind (Input_Id) in E_Generic_In_Out_Parameter
+                                             | E_Generic_In_Parameter
                         then
                            null;
 
-                        elsif Ekind_In (Input_Id, E_Constant, E_Variable)
+                        elsif Ekind (Input_Id) in E_Constant | E_Variable
                           and then Present (Corresponding_Generic_Association
                                      (Declaration_Node (Input_Id)))
                         then
@@ -3098,9 +3097,9 @@ package body Sem_Prag is
                         Append_New_Elmt (Input_Id, States_Seen);
                      end if;
 
-                     if Ekind_In (Input_Id, E_Abstract_State,
-                                            E_Constant,
-                                            E_Variable)
+                     if Ekind (Input_Id) in E_Abstract_State
+                                          | E_Constant
+                                          | E_Variable
                        and then Present (Encapsulating_State (Input_Id))
                      then
                         Append_New_Elmt (Input_Id, Constits_Seen);
@@ -3201,8 +3200,8 @@ package body Sem_Prag is
             Decl := First (Visible_Declarations (Pack_Spec));
             while Present (Decl) loop
                if Comes_From_Source (Decl)
-                 and then Nkind_In (Decl, N_Object_Declaration,
-                                          N_Object_Renaming_Declaration)
+                 and then Nkind (Decl) in N_Object_Declaration
+                                        | N_Object_Renaming_Declaration
                then
                   Append_New_Elmt (Defining_Entity (Decl), States_And_Objs);
 
@@ -3508,7 +3507,7 @@ package body Sem_Prag is
          --  Only abstract states and variables can act as constituents of an
          --  encapsulating single concurrent type.
 
-         if Ekind_In (Item_Id, E_Abstract_State, E_Variable) then
+         if Ekind (Item_Id) in E_Abstract_State | E_Variable then
             null;
 
          --  The constituent is a constant
@@ -3551,9 +3550,9 @@ package body Sem_Prag is
          --  the single concurrent type (SPARK RM 9(3)).
 
          if Item_Context = Encap_Context then
-            if Nkind_In (Item_Context, N_Package_Specification,
-                                       N_Protected_Definition,
-                                       N_Task_Definition)
+            if Nkind (Item_Context) in N_Package_Specification
+                                     | N_Protected_Definition
+                                     | N_Task_Definition
             then
                Prv_Decls := Private_Declarations (Item_Context);
                Vis_Decls := Visible_Declarations (Item_Context);
@@ -3638,9 +3637,8 @@ package body Sem_Prag is
       Encap_Id := Empty;
       Legal    := False;
 
-      if Nkind_In (Encap, N_Expanded_Name,
-                          N_Identifier,
-                          N_Selected_Component)
+      if Nkind (Encap) in
+           N_Expanded_Name | N_Identifier | N_Selected_Component
       then
          Analyze       (Encap);
          Resolve_State (Encap);
@@ -4630,12 +4628,12 @@ package body Sem_Prag is
          --  original pragma name by routine Original_Aspect_Pragma_Name.
 
          if Comes_From_Source (N) then
-            if Nam_In (Pname, Name_Pre, Name_Pre_Class) then
+            if Pname in Name_Pre | Name_Pre_Class then
                Is_Pre_Post := True;
                Set_Class_Present (N, Pname = Name_Pre_Class);
                Rewrite (Prag_Iden, Make_Identifier (Loc, Name_Precondition));
 
-            elsif Nam_In (Pname, Name_Post, Name_Post_Class) then
+            elsif Pname in Name_Post | Name_Post_Class then
                Is_Pre_Post := True;
                Set_Class_Present (N, Pname = Name_Post_Class);
                Rewrite (Prag_Iden, Make_Identifier (Loc, Name_Postcondition));
@@ -4646,7 +4644,7 @@ package body Sem_Prag is
          --  in a body. Pragmas Precondition and Postcondition were introduced
          --  before aspects and are not subject to the same aspect-like rules.
 
-         if Nam_In (Pname, Name_Precondition, Name_Postcondition) then
+         if Pname in Name_Precondition | Name_Postcondition then
             Duplicates_OK := True;
             In_Body_OK    := True;
          end if;
@@ -4803,9 +4801,9 @@ package body Sem_Prag is
          --  Fully analyze the pragma when it appears inside an entry or
          --  subprogram body because it cannot benefit from forward references.
 
-         if Nkind_In (Subp_Decl, N_Entry_Body,
-                                 N_Subprogram_Body,
-                                 N_Subprogram_Body_Stub)
+         if Nkind (Subp_Decl) in N_Entry_Body
+                               | N_Subprogram_Body
+                               | N_Subprogram_Body_Stub
          then
             --  The legality checks of pragmas Precondition and Postcondition
             --  are affected by the SPARK mode in effect and the volatility of
@@ -4845,11 +4843,9 @@ package body Sem_Prag is
 
          Body_Decl := Find_Related_Declaration_Or_Body (N, Do_Checks => True);
 
-         if not Nkind_In (Body_Decl, N_Entry_Body,
-                                     N_Subprogram_Body,
-                                     N_Subprogram_Body_Stub,
-                                     N_Task_Body,
-                                     N_Task_Body_Stub)
+         if Nkind (Body_Decl) not in
+              N_Entry_Body | N_Subprogram_Body | N_Subprogram_Body_Stub |
+              N_Task_Body  | N_Task_Body_Stub
          then
             Pragma_Misplaced;
             return;
@@ -4882,10 +4878,10 @@ package body Sem_Prag is
          --  When dealing with protected entries or protected subprograms, use
          --  the enclosing protected type as the proper context.
 
-         if Ekind_In (Spec_Id, E_Entry,
-                               E_Entry_Family,
-                               E_Function,
-                               E_Procedure)
+         if Ekind (Spec_Id) in E_Entry
+                             | E_Entry_Family
+                             | E_Function
+                             | E_Procedure
            and then Ekind (Scope (Spec_Id)) = E_Protected_Type
          then
             Spec_Decl := Declaration_Node (Scope (Spec_Id));
@@ -4907,7 +4903,7 @@ package body Sem_Prag is
 
          Mark_Ghost_Pragma (N, Spec_Id);
 
-         if Nam_In (Pname, Name_Refined_Depends, Name_Refined_Global) then
+         if Pname in Name_Refined_Depends | Name_Refined_Global then
             Ensure_Aggregate_Form (Get_Argument (N, Spec_Id));
          end if;
       end Analyze_Refined_Depends_Global_Post;
@@ -5472,7 +5468,7 @@ package body Sem_Prag is
       begin
          Check_Arg_Is_Identifier (Argx);
 
-         if not Nam_In (Chars (Argx), N1, N2) then
+         if Chars (Argx) not in N1 | N2 then
             Error_Msg_Name_2 := N1;
             Error_Msg_Name_3 := N2;
             Error_Pragma_Arg ("argument for pragma% must be% or%", Argx);
@@ -5488,7 +5484,7 @@ package body Sem_Prag is
       begin
          Check_Arg_Is_Identifier (Argx);
 
-         if not Nam_In (Chars (Argx), N1, N2, N3) then
+         if Chars (Argx) not in N1 | N2 | N3 then
             Error_Pragma_Arg ("invalid argument for pragma%", Argx);
          end if;
       end Check_Arg_Is_One_Of;
@@ -5502,7 +5498,7 @@ package body Sem_Prag is
       begin
          Check_Arg_Is_Identifier (Argx);
 
-         if not Nam_In (Chars (Argx), N1, N2, N3, N4) then
+         if Chars (Argx) not in N1 | N2 | N3 | N4 then
             Error_Pragma_Arg ("invalid argument for pragma%", Argx);
          end if;
       end Check_Arg_Is_One_Of;
@@ -5516,7 +5512,7 @@ package body Sem_Prag is
       begin
          Check_Arg_Is_Identifier (Argx);
 
-         if not Nam_In (Chars (Argx), N1, N2, N3, N4, N5) then
+         if Chars (Argx) not in N1 | N2 | N3 | N4 | N5 then
             Error_Pragma_Arg ("invalid argument for pragma%", Argx);
          end if;
       end Check_Arg_Is_One_Of;
@@ -5899,7 +5895,7 @@ package body Sem_Prag is
             --  For a single protected or a single task object, the error is
             --  issued on the original entity.
 
-            if Ekind_In (Id, E_Task_Type, E_Protected_Type) then
+            if Ekind (Id) in E_Task_Type | E_Protected_Type then
                Id := Defining_Identifier (Original_Node (Parent (Id)));
             end if;
 
@@ -5912,7 +5908,7 @@ package body Sem_Prag is
                --  [No_]Inline which is suspicious but not an error, generate
                --  an error for other pragmas.
 
-               if Nam_In (Pragma_Name (N), Name_Inline, Name_No_Inline) then
+               if Pragma_Name (N) in Name_Inline | Name_No_Inline then
                   if Warn_On_Redundant_Constructs then
                      Error_Msg_NE
                        ("?r?pragma% for & duplicates pragma#", N, Id);
@@ -6338,9 +6334,8 @@ package body Sem_Prag is
 
             if Nkind (Original_Node (Stmt)) = N_Pragma then
                return
-                 Nam_In (Pragma_Name_Unmapped (Original_Node (Stmt)),
-                         Name_Loop_Invariant,
-                         Name_Loop_Variant);
+                 Pragma_Name_Unmapped (Original_Node (Stmt))
+                   in Name_Loop_Invariant | Name_Loop_Variant;
             else
                return False;
             end if;
@@ -6465,9 +6460,7 @@ package body Sem_Prag is
             elsif Nkind (P) = N_Handled_Sequence_Of_Statements then
                exit;
 
-            elsif Nkind_In (P, N_Package_Specification,
-                               N_Block_Statement)
-            then
+            elsif Nkind (P) in N_Package_Specification | N_Block_Statement then
                return;
 
             --  Note: the following tests seem a little peculiar, because
@@ -6476,10 +6469,8 @@ package body Sem_Prag is
             --  sequence, so the only way we get here is by being in the
             --  declarative part of the body.
 
-            elsif Nkind_In (P, N_Subprogram_Body,
-                               N_Package_Body,
-                               N_Task_Body,
-                               N_Entry_Body)
+            elsif Nkind (P) in
+              N_Subprogram_Body | N_Package_Body | N_Task_Body | N_Entry_Body
             then
                return;
             end if;
@@ -6977,9 +6968,9 @@ package body Sem_Prag is
          if Nkind (P) = N_Compilation_Unit then
             Unit_Kind := Nkind (Unit (P));
 
-            if Nkind_In (Unit_Kind, N_Subprogram_Declaration,
-                                    N_Package_Declaration)
-              or else Unit_Kind in N_Generic_Declaration
+            if Unit_Kind in N_Subprogram_Declaration
+                          | N_Package_Declaration
+                          | N_Generic_Declaration
             then
                Unit_Name := Defining_Entity (Unit (P));
 
@@ -7685,12 +7676,12 @@ package body Sem_Prag is
 
          if SPARK_Mode = On
            and then Prag_Id = Pragma_Volatile
-           and then not Nkind_In (Original_Node (Decl),
-                                  N_Full_Type_Declaration,
-                                  N_Formal_Type_Declaration,
-                                  N_Object_Declaration,
-                                  N_Single_Protected_Declaration,
-                                  N_Single_Task_Declaration)
+           and then Nkind (Original_Node (Decl)) not in
+                      N_Full_Type_Declaration        |
+                      N_Formal_Type_Declaration      |
+                      N_Object_Declaration           |
+                      N_Single_Protected_Declaration |
+                      N_Single_Task_Declaration
          then
             Error_Pragma_Arg
               ("argument of pragma % must denote a full type or object "
@@ -7772,7 +7763,7 @@ package body Sem_Prag is
          else
             while Present (P) and then Nkind (P) not in N_Generic_Declaration
             loop
-               if Nkind_In (P, N_Package_Body, N_Subprogram_Body) then
+               if Nkind (P) in N_Package_Body | N_Subprogram_Body then
                   P := Corresponding_Spec (P);
                else
                   P := Parent (P);
@@ -7918,17 +7909,17 @@ package body Sem_Prag is
                   then
                      --  Give error if same as our pragma or Export/Convention
 
-                     if Nam_In (Pragma_Name_Unmapped (Decl),
-                                Name_Export,
-                                Name_Convention,
-                                Pragma_Name_Unmapped (N))
+                     if Pragma_Name_Unmapped (Decl)
+                          in Name_Export
+                           | Name_Convention
+                           | Pragma_Name_Unmapped (N)
                      then
                         exit;
 
                      --  Case of Import/Interface or the other way round
 
-                     elsif Nam_In (Pragma_Name_Unmapped (Decl),
-                                   Name_Interface, Name_Import)
+                     elsif Pragma_Name_Unmapped (Decl)
+                             in Name_Interface | Name_Import
                      then
                         --  Here we know that we have Import and Interface. It
                         --  doesn't matter which way round they are. See if
@@ -8028,9 +8019,9 @@ package body Sem_Prag is
                      while Present (Comp) loop
                         if Present (Etype (Comp))
                           and then
-                            Ekind_In (Etype (Comp),
-                                      E_Anonymous_Access_Type,
-                                      E_Anonymous_Access_Subprogram_Type)
+                            Ekind (Etype (Comp)) in
+                              E_Anonymous_Access_Type |
+                              E_Anonymous_Access_Subprogram_Type
                           and then not Has_Convention_Pragma (Comp)
                         then
                            Set_Convention (Comp, C);
@@ -8041,9 +8032,9 @@ package body Sem_Prag is
                   end;
 
                elsif Is_Array_Type (E)
-                 and then Ekind_In (Component_Type (E),
-                                    E_Anonymous_Access_Type,
-                                    E_Anonymous_Access_Subprogram_Type)
+                 and then Ekind (Component_Type (E)) in
+                            E_Anonymous_Access_Type |
+                            E_Anonymous_Access_Subprogram_Type
                then
                   Set_Convention (Designated_Type (Component_Type (E)), C);
                end if;
@@ -8205,8 +8196,8 @@ package body Sem_Prag is
 
                E := Alias (E);
 
-            elsif Nkind_In (Parent (E), N_Full_Type_Declaration,
-                                        N_Private_Extension_Declaration)
+            elsif Nkind (Parent (E)) in
+                    N_Full_Type_Declaration | N_Private_Extension_Declaration
               and then Scope (E) = Scope (Alias (E))
             then
                E := Alias (E);
@@ -8230,7 +8221,7 @@ package body Sem_Prag is
 
          --  Check that we are not applying this to a named constant
 
-         if Ekind_In (E, E_Named_Integer, E_Named_Real) then
+         if Ekind (E) in E_Named_Integer | E_Named_Real then
             Error_Msg_Name_1 := Pname;
             Error_Msg_N
               ("cannot apply pragma% to named constant!",
@@ -8586,7 +8577,7 @@ package body Sem_Prag is
          Process_Extended_Import_Export_Internal_Arg (Arg_Internal);
          Def_Id := Entity (Arg_Internal);
 
-         if not Ekind_In (Def_Id, E_Constant, E_Variable) then
+         if Ekind (Def_Id) not in E_Constant | E_Variable then
             Error_Pragma_Arg
               ("pragma% must designate an object", Arg_Internal);
          end if;
@@ -8811,8 +8802,8 @@ package body Sem_Prag is
                   Match := False;
 
                elsif Etype (Def_Id) /= Standard_Void_Type
-                 and then Nam_In (Pname, Name_Export_Procedure,
-                                         Name_Import_Procedure)
+                 and then
+                   Pname in Name_Export_Procedure | Name_Import_Procedure
                then
                   Match := False;
 
@@ -9223,7 +9214,7 @@ package body Sem_Prag is
 
          --  Various error checks
 
-         if Ekind_In (Def_Id, E_Variable, E_Constant) then
+         if Ekind (Def_Id) in E_Variable | E_Constant then
 
             --  We do not permit Import to apply to a renaming declaration
 
@@ -9722,9 +9713,9 @@ package body Sem_Prag is
                   --       pragma Inline_Always (Proc);
                   --    end Pack;
 
-                  elsif Nkind_In (Context, N_Package_Specification,
-                                           N_Protected_Definition,
-                                           N_Task_Definition)
+                  elsif Nkind (Context) in N_Package_Specification
+                                         | N_Protected_Definition
+                                         | N_Task_Definition
                     and then Init_List = Visible_Declarations (Context)
                     and then Prag_List = Private_Declarations (Context)
                   then
@@ -11844,10 +11835,10 @@ package body Sem_Prag is
                   --  external properties.
 
                   elsif Nkind (Prop) = N_Identifier
-                    and then Nam_In (Chars (Prop), Name_Async_Readers,
-                                                   Name_Async_Writers,
-                                                   Name_Effective_Reads,
-                                                   Name_Effective_Writes)
+                    and then Chars (Prop) in Name_Async_Readers
+                                           | Name_Async_Writers
+                                           | Name_Effective_Reads
+                                           | Name_Effective_Writes
                   then
                      null;
 
@@ -12324,8 +12315,8 @@ package body Sem_Prag is
 
             Pack_Decl := Find_Related_Package_Or_Body (N, Do_Checks => True);
 
-            if not Nkind_In (Pack_Decl, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+            if Nkind (Pack_Decl) not in
+                 N_Generic_Package_Declaration | N_Package_Declaration
             then
                Pragma_Misplaced;
                return;
@@ -13160,9 +13151,7 @@ package body Sem_Prag is
                      --  The Ghost policy must be either Check or Ignore
                      --  (SPARK RM 6.9(6)).
 
-                     if not Nam_In (Chars (Policy), Name_Check,
-                                                    Name_Ignore)
-                     then
+                     if Chars (Policy) not in Name_Check | Name_Ignore then
                         Error_Pragma_Arg
                           ("argument of pragma % Ghost must be Check or "
                            & "Ignore", Policy);
@@ -13310,12 +13299,12 @@ package body Sem_Prag is
 
             if Nkind (Obj_Or_Type_Decl) /= N_Object_Declaration then
                if Prag_Id = Pragma_No_Caching
-                  or not Nkind_In (Original_Node (Obj_Or_Type_Decl),
-                                   N_Full_Type_Declaration,
-                                   N_Private_Type_Declaration,
-                                   N_Formal_Type_Declaration,
-                                   N_Task_Type_Declaration,
-                                   N_Protected_Type_Declaration)
+                  or else Nkind (Original_Node (Obj_Or_Type_Decl)) not in
+                            N_Full_Type_Declaration    |
+                            N_Private_Type_Declaration |
+                            N_Formal_Type_Declaration  |
+                            N_Task_Type_Declaration    |
+                            N_Protected_Type_Declaration
                then
                   Pragma_Misplaced;
                   return;
@@ -13570,7 +13559,7 @@ package body Sem_Prag is
             if (Nkind (D) = N_Full_Type_Declaration and then Is_Array_Type (E))
               or else
                 (Nkind (D) = N_Object_Declaration
-                   and then Ekind_In (E, E_Constant, E_Variable)
+                   and then Ekind (E) in E_Constant | E_Variable
                    and then Nkind (Object_Definition (D)) =
                                        N_Constrained_Array_Definition)
               or else
@@ -14003,7 +13992,7 @@ package body Sem_Prag is
             --  identifier is Name.
 
             if Nkind (Arg1) /= N_Pragma_Argument_Association
-              or else Nam_In (Chars (Arg1), No_Name, Name_Name)
+              or else Chars (Arg1) in No_Name | Name_Name
             then
                --  Old syntax
 
@@ -14016,7 +14005,7 @@ package body Sem_Prag is
 
                --  Check forbidden check kind
 
-               if Nam_In (Chars (Kind), Name_Name, Name_Policy) then
+               if Chars (Kind) in Name_Name | Name_Policy then
                   Error_Msg_Name_2 := Chars (Kind);
                   Error_Pragma_Arg
                     ("pragma% does not allow% as check name", Arg1);
@@ -14539,9 +14528,9 @@ package body Sem_Prag is
             --  or subprogram body because it cannot benefit from forward
             --  references.
 
-            if Nkind_In (Subp_Decl, N_Entry_Body,
-                                    N_Subprogram_Body,
-                                    N_Subprogram_Body_Stub)
+            if Nkind (Subp_Decl) in N_Entry_Body
+                                  | N_Subprogram_Body
+                                  | N_Subprogram_Body_Stub
             then
                --  The legality checks of pragma Contract_Cases are affected by
                --  the SPARK mode in effect and the volatility of the context.
@@ -15092,11 +15081,11 @@ package body Sem_Prag is
                Call := Get_Pragma_Arg (Arg1);
             end if;
 
-            if Nkind_In (Call, N_Expanded_Name,
-                               N_Function_Call,
-                               N_Identifier,
-                               N_Indexed_Component,
-                               N_Selected_Component)
+            if Nkind (Call) in N_Expanded_Name
+                             | N_Function_Call
+                             | N_Identifier
+                             | N_Indexed_Component
+                             | N_Selected_Component
             then
                --  If this pragma Debug comes from source, its argument was
                --  parsed as a name form (which is syntactically identical).
@@ -15231,8 +15220,8 @@ package body Sem_Prag is
                --  The associated private type [extension] has been found, stop
                --  the search.
 
-               elsif Nkind_In (Stmt, N_Private_Extension_Declaration,
-                                     N_Private_Type_Declaration)
+               elsif Nkind (Stmt) in N_Private_Extension_Declaration
+                                   | N_Private_Type_Declaration
                then
                   Typ := Defining_Entity (Stmt);
                   exit;
@@ -15481,9 +15470,9 @@ package body Sem_Prag is
                --  or subprogram body because it cannot benefit from forward
                --  references.
 
-               if Nkind_In (Subp_Decl, N_Entry_Body,
-                                       N_Subprogram_Body,
-                                       N_Subprogram_Body_Stub)
+               if Nkind (Subp_Decl) in N_Entry_Body
+                                     | N_Subprogram_Body
+                                     | N_Subprogram_Body_Stub
                then
                   --  The legality checks of pragmas Depends and Global are
                   --  affected by the SPARK mode in effect and the volatility
@@ -15837,8 +15826,8 @@ package body Sem_Prag is
 
             Mark_Ghost_Pragma (N, Cunit_Ent);
 
-            if Nkind_In (Unit (Cunit_Node), N_Package_Body,
-                                            N_Subprogram_Body)
+            if Nkind (Unit (Cunit_Node)) in
+                 N_Package_Body | N_Subprogram_Body
             then
                Error_Pragma ("pragma% must refer to a spec, not a body");
             else
@@ -16812,8 +16801,8 @@ package body Sem_Prag is
                --  Task unit declared without a definition cannot be subject to
                --  pragma Ghost (SPARK RM 6.9(19)).
 
-               elsif Nkind_In (Stmt, N_Single_Task_Declaration,
-                                     N_Task_Type_Declaration)
+               elsif Nkind (Stmt) in
+                       N_Single_Task_Declaration | N_Task_Type_Declaration
                then
                   Error_Pragma ("pragma % cannot apply to a task type");
                   return;
@@ -16826,8 +16815,8 @@ package body Sem_Prag is
                   --  When pragma Ghost applies to an untagged derivation, the
                   --  derivation is transformed into a [sub]type declaration.
 
-                  if Nkind_In (Stmt, N_Full_Type_Declaration,
-                                     N_Subtype_Declaration)
+                  if Nkind (Stmt) in
+                       N_Full_Type_Declaration | N_Subtype_Declaration
                     and then Comes_From_Source (Orig_Stmt)
                     and then Nkind (Orig_Stmt) = N_Full_Type_Declaration
                     and then Nkind (Type_Definition (Orig_Stmt)) =
@@ -16861,14 +16850,14 @@ package body Sem_Prag is
 
                --  The pragma applies to a legal construct, stop the traversal
 
-               elsif Nkind_In (Stmt, N_Abstract_Subprogram_Declaration,
-                                     N_Full_Type_Declaration,
-                                     N_Generic_Subprogram_Declaration,
-                                     N_Object_Declaration,
-                                     N_Private_Extension_Declaration,
-                                     N_Private_Type_Declaration,
-                                     N_Subprogram_Declaration,
-                                     N_Subtype_Declaration)
+               elsif Nkind (Stmt) in N_Abstract_Subprogram_Declaration
+                                   | N_Full_Type_Declaration
+                                   | N_Generic_Subprogram_Declaration
+                                   | N_Object_Declaration
+                                   | N_Private_Extension_Declaration
+                                   | N_Private_Type_Declaration
+                                   | N_Subprogram_Declaration
+                                   | N_Subtype_Declaration
                then
                   Id := Defining_Entity (Stmt);
                   exit;
@@ -16897,12 +16886,12 @@ package body Sem_Prag is
             --  Protected and task types cannot be subject to pragma Ghost
             --  (SPARK RM 6.9(19)).
 
-            if Nkind_In (Context, N_Protected_Body, N_Protected_Definition)
+            if Nkind (Context) in N_Protected_Body | N_Protected_Definition
             then
                Error_Pragma ("pragma % cannot apply to a protected type");
                return;
 
-            elsif Nkind_In (Context, N_Task_Body, N_Task_Definition) then
+            elsif Nkind (Context) in N_Task_Body | N_Task_Definition then
                Error_Pragma ("pragma % cannot apply to a task type");
                return;
             end if;
@@ -17096,9 +17085,9 @@ package body Sem_Prag is
                --  or subprogram body because it cannot benefit from forward
                --  references.
 
-               if Nkind_In (Subp_Decl, N_Entry_Body,
-                                       N_Subprogram_Body,
-                                       N_Subprogram_Body_Stub)
+               if Nkind (Subp_Decl) in N_Entry_Body
+                                     | N_Subprogram_Body
+                                     | N_Subprogram_Body_Stub
                then
                   --  The legality checks of pragmas Depends and Global are
                   --  affected by the SPARK mode in effect and the volatility
@@ -17149,8 +17138,8 @@ package body Sem_Prag is
             begin
                GP := Parent (Parent (N));
 
-               if Nkind_In (GP, N_Package_Declaration,
-                                N_Generic_Package_Declaration)
+               if Nkind (GP) in
+                    N_Package_Declaration | N_Generic_Package_Declaration
                then
                   GP := Parent (GP);
                end if;
@@ -17298,8 +17287,8 @@ package body Sem_Prag is
                   --  "synchronized".
 
                    or else
-                    (Ekind_In (Typ, E_Record_Type_With_Private,
-                                    E_Record_Subtype_With_Private)
+                    (Ekind (Typ) in E_Record_Type_With_Private
+                                  | E_Record_Subtype_With_Private
                        and then Synchronized_Present (Parent (Typ))))
                then
                   null;
@@ -17755,8 +17744,8 @@ package body Sem_Prag is
 
             Pack_Decl := Find_Related_Package_Or_Body (N, Do_Checks => True);
 
-            if not Nkind_In (Pack_Decl, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+            if Nkind (Pack_Decl) not in
+                 N_Generic_Package_Declaration | N_Package_Declaration
             then
                Pragma_Misplaced;
                return;
@@ -18027,8 +18016,8 @@ package body Sem_Prag is
 
             Pack_Decl := Find_Related_Package_Or_Body (N, Do_Checks => True);
 
-            if not Nkind_In (Pack_Decl, N_Generic_Package_Declaration,
-                                        N_Package_Declaration)
+            if Nkind (Pack_Decl) not in
+                 N_Generic_Package_Declaration | N_Package_Declaration
             then
                Pragma_Misplaced;
                return;
@@ -18365,7 +18354,7 @@ package body Sem_Prag is
                Preanalyze_Spec_Expression (Arg, RTE (RE_Interrupt_Priority));
             end if;
 
-            if not Nkind_In (P, N_Task_Definition, N_Protected_Definition) then
+            if Nkind (P) not in N_Task_Definition | N_Protected_Definition then
                Pragma_Misplaced;
                return;
 
@@ -18564,9 +18553,9 @@ package body Sem_Prag is
             --  A [class-wide] invariant may be associated a [limited] private
             --  type or a private extension.
 
-            elsif Ekind_In (Typ, E_Limited_Private_Type,
-                                 E_Private_Type,
-                                 E_Record_Type_With_Private)
+            elsif Ekind (Typ) in E_Limited_Private_Type
+                               | E_Private_Type
+                               | E_Record_Type_With_Private
             then
                null;
 
@@ -19217,8 +19206,7 @@ package body Sem_Prag is
                if Chars (Variant) = No_Name then
                   Error_Pragma_Arg_Ident ("expect name `Increases`", Variant);
 
-               elsif not Nam_In (Chars (Variant), Name_Decreases,
-                                                  Name_Increases)
+               elsif Chars (Variant) not in Name_Decreases | Name_Increases
                then
                   declare
                      Name : String := Get_Name_String (Chars (Variant));
@@ -19531,11 +19519,11 @@ package body Sem_Prag is
 
             --  Must appear for a spec or generic spec
 
-            if not Nkind_In (Unit (Cunit (Current_Sem_Unit)),
-                             N_Generic_Package_Declaration,
-                             N_Generic_Subprogram_Declaration,
-                             N_Package_Declaration,
-                             N_Subprogram_Declaration)
+            if Nkind (Unit (Cunit (Current_Sem_Unit))) not in
+                 N_Generic_Package_Declaration    |
+                 N_Generic_Subprogram_Declaration |
+                 N_Package_Declaration            |
+                 N_Subprogram_Declaration
             then
                Error_Pragma
                  (Fix_Error
@@ -19666,7 +19654,7 @@ package body Sem_Prag is
 
                --  The pragma must apply to an access-to-object type
 
-               if Ekind_In (Typ, E_Access_Type, E_General_Access_Type) then
+               if Ekind (Typ) in E_Access_Type | E_General_Access_Type then
                   null;
 
                --  Give a detailed error message on all other access type kinds
@@ -19794,10 +19782,10 @@ package body Sem_Prag is
                loop
                   --  Ada 2020 (AI12-0269): A function can be No_Return
 
-                  if Ekind_In (E, E_Generic_Procedure, E_Procedure)
+                  if Ekind (E) in E_Generic_Procedure | E_Procedure
                     or else (Ada_Version >= Ada_2020
                               and then
-                             Ekind_In (E, E_Generic_Function, E_Function))
+                             Ekind (E) in E_Generic_Function | E_Function)
                   then
                      --  Check that the pragma is not applied to a body.
                      --  First check the specless body case, to give a
@@ -20189,9 +20177,8 @@ package body Sem_Prag is
               and then
                 (Chars (Arg1) = Name_Entity
                    or else
-                     Nkind_In (Get_Pragma_Arg (Arg1), N_Character_Literal,
-                                                      N_Identifier,
-                                                      N_Operator_Symbol))
+                     Nkind (Get_Pragma_Arg (Arg1)) in
+                       N_Character_Literal | N_Identifier | N_Operator_Symbol)
             then
                Ename := Get_Pragma_Arg (Arg1);
 
@@ -20627,9 +20614,8 @@ package body Sem_Prag is
                      --  they may not depend on variable input. This check is
                      --  left to the SPARK prover.
 
-                     elsif Ekind_In (Item_Id, E_Abstract_State,
-                                              E_Constant,
-                                              E_Variable)
+                     elsif Ekind (Item_Id) in
+                             E_Abstract_State | E_Constant | E_Variable
                      then
                         Has_Item := True;
                         Constits := Part_Of_Constituents (State_Id);
@@ -20946,9 +20932,9 @@ package body Sem_Prag is
                Check_Arg_Is_Library_Level_Local_Name (Arg1);
 
                if not Is_Entity_Name (Get_Pragma_Arg (Arg1))
-                 or else not
-                   Ekind_In (Entity (Get_Pragma_Arg (Arg1)), E_Variable,
-                                                             E_Constant)
+                 or else
+                   Ekind (Entity (Get_Pragma_Arg (Arg1))) not in
+                     E_Variable | E_Constant
                then
                   Error_Pragma_Arg ("pragma% only applies to objects", Arg1);
                end if;
@@ -21404,7 +21390,7 @@ package body Sem_Prag is
 
             --  Task or Protected, must be of type Integer
 
-            elsif Nkind_In (P, N_Protected_Definition, N_Task_Definition) then
+            elsif Nkind (P) in N_Protected_Definition | N_Task_Definition then
                Arg := Get_Pragma_Arg (Arg1);
                Ent := Defining_Identifier (Parent (P));
 
@@ -21816,9 +21802,8 @@ package body Sem_Prag is
 
             procedure Check_Arg (Arg : Node_Id) is
             begin
-               if not Nkind_In (Original_Node (Arg),
-                                N_String_Literal,
-                                N_Identifier)
+               if Nkind (Original_Node (Arg)) not in
+                    N_String_Literal | N_Identifier
                then
                   Error_Pragma_Arg
                     ("inappropriate argument for pragma %", Arg);
@@ -21834,7 +21819,7 @@ package body Sem_Prag is
 
             Def_Id := Entity (Internal);
 
-            if not Ekind_In (Def_Id, E_Constant, E_Variable) then
+            if Ekind (Def_Id) not in E_Constant | E_Variable then
                Error_Pragma_Arg
                  ("pragma% must designate an object", Internal);
             end if;
@@ -21984,9 +21969,8 @@ package body Sem_Prag is
                loop
                   Def_Id := Get_Base_Subprogram (E);
 
-                  if not Ekind_In (Def_Id, E_Function,
-                                           E_Generic_Function,
-                                           E_Operator)
+                  if Ekind (Def_Id) not in
+                       E_Function | E_Generic_Function | E_Operator
                   then
                      Error_Pragma_Arg
                        ("pragma% requires a function name", Arg1);
@@ -22521,8 +22505,8 @@ package body Sem_Prag is
 
             Mark_Ghost_Pragma (N, Cunit_Ent);
 
-            if not Nkind_In (Unit (Cunit_Node), N_Package_Declaration,
-                                                N_Generic_Package_Declaration)
+            if Nkind (Unit (Cunit_Node)) not in
+                 N_Package_Declaration | N_Generic_Package_Declaration
             then
                Error_Pragma
                  ("pragma% can only apply to a package declaration");
@@ -22721,8 +22705,8 @@ package body Sem_Prag is
 
             Mark_Ghost_Pragma (N, Cunit_Ent);
 
-            if not Nkind_In (Unit (Cunit_Node), N_Package_Declaration,
-                                                N_Generic_Package_Declaration)
+            if Nkind (Unit (Cunit_Node)) not in
+                 N_Package_Declaration | N_Generic_Package_Declaration
             then
                Error_Pragma
                  ("pragma% can only apply to a package declaration");
@@ -23024,7 +23008,7 @@ package body Sem_Prag is
                   --  anonymous type whose name cannot be used to issue error
                   --  messages. Recover the original entity of the type.
 
-                  if Ekind_In (Entity, E_Protected_Type, E_Task_Type) then
+                  if Ekind (Entity) in E_Protected_Type | E_Task_Type then
                      Err_Id :=
                        Defining_Entity
                          (Original_Node (Unit_Declaration_Node (Entity)));
@@ -23086,28 +23070,28 @@ package body Sem_Prag is
 
                procedure Add_Entity_To_Name_Buffer is
                begin
-                  if Ekind_In (E, E_Entry, E_Entry_Family) then
+                  if Ekind (E) in E_Entry | E_Entry_Family then
                      Add_Str_To_Name_Buffer ("entry");
 
-                  elsif Ekind_In (E, E_Generic_Package,
-                                     E_Package,
-                                     E_Package_Body)
+                  elsif Ekind (E) in E_Generic_Package
+                                   | E_Package
+                                   | E_Package_Body
                   then
                      Add_Str_To_Name_Buffer ("package");
 
-                  elsif Ekind_In (E, E_Protected_Body, E_Protected_Type) then
+                  elsif Ekind (E) in E_Protected_Body | E_Protected_Type then
                      Add_Str_To_Name_Buffer ("protected type");
 
-                  elsif Ekind_In (E, E_Function,
-                                     E_Generic_Function,
-                                     E_Generic_Procedure,
-                                     E_Procedure,
-                                     E_Subprogram_Body)
+                  elsif Ekind (E) in E_Function
+                                   | E_Generic_Function
+                                   | E_Generic_Procedure
+                                   | E_Procedure
+                                   | E_Subprogram_Body
                   then
                      Add_Str_To_Name_Buffer ("subprogram");
 
                   else
-                     pragma Assert (Ekind_In (E, E_Task_Body, E_Task_Type));
+                     pragma Assert (Ekind (E) in E_Task_Body | E_Task_Type);
                      Add_Str_To_Name_Buffer ("task type");
                   end if;
                end Add_Entity_To_Name_Buffer;
@@ -23166,7 +23150,7 @@ package body Sem_Prag is
                --    * The mode of the context
                --    * The mode of the spec (if any)
 
-               if Nkind_In (Decl, N_Entry_Body, N_Subprogram_Body) then
+               if Nkind (Decl) in N_Entry_Body | N_Subprogram_Body then
 
                   --  A stand-alone subprogram body
 
@@ -23216,7 +23200,7 @@ package body Sem_Prag is
 
                else
                   pragma Assert
-                    (Nkind_In (Decl, N_Protected_Body, N_Task_Body));
+                    (Nkind (Decl) in N_Protected_Body | N_Task_Body);
 
                   Check_Pragma_Conformance
                     (Context_Pragma => SPARK_Pragma (Body_Id),
@@ -23338,8 +23322,8 @@ package body Sem_Prag is
                --  SPARK_Mode of the context because the task does not have any
                --  entries that could inherit the mode.
 
-               if not Nkind_In (Decl, N_Single_Task_Declaration,
-                                      N_Task_Type_Declaration)
+               if Nkind (Decl) not in
+                    N_Single_Task_Declaration | N_Task_Type_Declaration
                then
                   Set_SPARK_Context;
                end if;
@@ -23500,8 +23484,8 @@ package body Sem_Prag is
                   --    procedure Proc ...;
                   --    pragma SPARK_Mode ...;
 
-                  elsif Nkind_In (Stmt, N_Generic_Subprogram_Declaration,
-                                        N_Subprogram_Declaration)
+                  elsif Nkind (Stmt) in N_Generic_Subprogram_Declaration
+                                      | N_Subprogram_Declaration
                     or else (Nkind (Stmt) = N_Entry_Declaration
                               and then Is_Protected_Type
                                          (Scope (Defining_Entity (Stmt))))
@@ -23546,11 +23530,11 @@ package body Sem_Prag is
                --    protected body Prot is
                --       pragma SPARK_Mode ...;
 
-               if Nkind_In (Context, N_Entry_Body,
-                                     N_Package_Body,
-                                     N_Protected_Body,
-                                     N_Subprogram_Body,
-                                     N_Task_Body)
+               if Nkind (Context) in N_Entry_Body
+                                   | N_Package_Body
+                                   | N_Protected_Body
+                                   | N_Subprogram_Body
+                                   | N_Task_Body
                then
                   Process_Body (Context);
 
@@ -23567,9 +23551,9 @@ package body Sem_Prag is
                --    private
                --       pragma SPARK_Mode ...;
 
-               elsif Nkind_In (Context, N_Package_Specification,
-                                        N_Protected_Definition,
-                                        N_Task_Definition)
+               elsif Nkind (Context) in N_Package_Specification
+                                      | N_Protected_Definition
+                                      | N_Task_Definition
                then
                   if List_Containing (N) = Visible_Declarations (Context) then
                      Process_Visible_Part (Parent (Context));
@@ -23595,8 +23579,8 @@ package body Sem_Prag is
                --    procedure Proc ...;
                --    pragma SPARK_Mode ...;
 
-               elsif Nkind_In (Context, N_Generic_Subprogram_Declaration,
-                                        N_Subprogram_Declaration)
+               elsif Nkind (Context) in N_Generic_Subprogram_Declaration
+                                      | N_Subprogram_Declaration
                then
                   Process_Overloadable (Context);
 
@@ -24357,8 +24341,8 @@ package body Sem_Prag is
             --  in a library-level package. First determine whether the current
             --  compilation unit is a legal context.
 
-            if Nkind_In (Pack_Decl, N_Package_Declaration,
-                                    N_Generic_Package_Declaration)
+            if Nkind (Pack_Decl) in N_Package_Declaration
+                                  | N_Generic_Package_Declaration
             then
                null;
 
@@ -24394,11 +24378,11 @@ package body Sem_Prag is
             --  The context is a [generic] subprogram declared at the top level
             --  of the [generic] package unit.
 
-            elsif Nkind_In (Subp_Decl, N_Generic_Subprogram_Declaration,
-                                       N_Subprogram_Declaration)
+            elsif Nkind (Subp_Decl) in N_Generic_Subprogram_Declaration
+                                     | N_Subprogram_Declaration
               and then Present (Context)
-              and then Nkind_In (Context, N_Generic_Package_Declaration,
-                                          N_Package_Declaration)
+              and then Nkind (Context) in N_Generic_Package_Declaration
+                                        | N_Package_Declaration
             then
                null;
 
@@ -24452,9 +24436,9 @@ package body Sem_Prag is
             --  or subprogram body because it cannot benefit from forward
             --  references.
 
-            if Nkind_In (Subp_Decl, N_Entry_Body,
-                                    N_Subprogram_Body,
-                                    N_Subprogram_Body_Stub)
+            if Nkind (Subp_Decl) in N_Entry_Body
+                                  | N_Subprogram_Body
+                                  | N_Subprogram_Body_Stub
             then
                --  The legality checks of pragma Test_Case are affected by the
                --  SPARK mode in effect and the volatility of the context.
@@ -25117,7 +25101,7 @@ package body Sem_Prag is
 
             Spec_Id := Unique_Defining_Entity (Subp_Decl);
 
-            if not Ekind_In (Spec_Id, E_Function, E_Generic_Function) then
+            if Ekind (Spec_Id) not in E_Function | E_Generic_Function then
                Pragma_Misplaced;
                return;
             end if;
@@ -25278,7 +25262,7 @@ package body Sem_Prag is
                --  was given otherwise, by shifting the arguments.
 
                if Nkind (Argx) = N_Identifier
-                 and then Nam_In (Chars (Argx), Name_Gnat, Name_Gnatprove)
+                 and then Chars (Argx) in Name_Gnat | Name_Gnatprove
                then
                   if Chars (Argx) = Name_Gnat then
                      if CodePeer_Mode or GNATprove_Mode then
@@ -25331,7 +25315,7 @@ package body Sem_Prag is
                   --  On/Off one argument case was processed by parser
 
                   if Nkind (Argx) = N_Identifier
-                    and then Nam_In (Chars (Argx), Name_On, Name_Off)
+                    and then Chars (Argx) in Name_On | Name_Off
                   then
                      null;
 
@@ -25703,7 +25687,7 @@ package body Sem_Prag is
            and then
              (Etype (Nod) = Disp_Typ
                or else Etype (Nod) = Class_Wide_Type (Disp_Typ))
-           and then Ekind_In (Entity (Nod), E_Constant, E_Variable)
+           and then Ekind (Entity (Nod)) in E_Constant | E_Variable
          then
             Error_Msg_NE
               ("object in class-wide condition must be formal of type &",
@@ -26081,9 +26065,8 @@ package body Sem_Prag is
                      if Is_Entity_Name (Ref_Item) then
                         Ref_Item_Id := Entity_Of (Ref_Item);
 
-                        if Ekind_In (Ref_Item_Id, E_Abstract_State,
-                                                  E_Constant,
-                                                  E_Variable)
+                        if Ekind (Ref_Item_Id) in
+                             E_Abstract_State | E_Constant | E_Variable
                           and then Present (Encapsulating_State (Ref_Item_Id))
                           and then Find_Encapsulating_State
                                      (Dep_States, Ref_Item_Id) = Dep_Item_Id
@@ -26720,9 +26703,8 @@ package body Sem_Prag is
 
                --  The input must be a constituent of a state
 
-               if Ekind_In (Input_Id, E_Abstract_State,
-                                      E_Constant,
-                                      E_Variable)
+               if Ekind (Input_Id) in
+                    E_Abstract_State | E_Constant | E_Variable
                  and then Present (Encapsulating_State (Input_Id))
                then
                   State_Id := Encapsulating_State (Input_Id);
@@ -27630,9 +27612,7 @@ package body Sem_Prag is
          --  Start of processing for Check_Refined_Global_Item
 
          begin
-            if Ekind_In (Item_Id, E_Abstract_State,
-                                  E_Constant,
-                                  E_Variable)
+            if Ekind (Item_Id) in E_Abstract_State | E_Constant | E_Variable
             then
                Enc_State := Find_Encapsulating_State (States, Item_Id);
             end if;
@@ -27726,9 +27706,9 @@ package body Sem_Prag is
 
          --  Single global item declaration
 
-         elsif Nkind_In (List, N_Expanded_Name,
-                               N_Identifier,
-                               N_Selected_Component)
+         elsif Nkind (List) in N_Expanded_Name
+                             | N_Identifier
+                             | N_Selected_Component
          then
             Check_Refined_Global_Item (List, Global_Mode);
 
@@ -27858,9 +27838,9 @@ package body Sem_Prag is
 
          --  Single global item declaration
 
-         elsif Nkind_In (List, N_Expanded_Name,
-                               N_Identifier,
-                               N_Selected_Component)
+         elsif Nkind (List) in N_Expanded_Name
+                             | N_Identifier
+                             | N_Selected_Component
          then
             Collect_Global_Item (List, Mode);
 
@@ -28547,9 +28527,8 @@ package body Sem_Prag is
 
                   --  The constituent is a valid state or object
 
-                  elsif Ekind_In (Constit_Id, E_Abstract_State,
-                                              E_Constant,
-                                              E_Variable)
+                  elsif Ekind (Constit_Id) in
+                          E_Abstract_State | E_Constant | E_Variable
                   then
                      Match_Constituent (Constit_Id);
 
@@ -29238,11 +29217,11 @@ package body Sem_Prag is
             if Ename = Pnm
               or else Pnm = Name_Assertion
               or else (Pnm = Name_Statement_Assertions
-                        and then Nam_In (Ename, Name_Assert,
-                                                Name_Assert_And_Cut,
-                                                Name_Assume,
-                                                Name_Loop_Invariant,
-                                                Name_Loop_Variant))
+                        and then Ename in Name_Assert
+                                        | Name_Assert_And_Cut
+                                        | Name_Assume
+                                        | Name_Loop_Invariant
+                                        | Name_Loop_Variant)
             then
                Policy := Chars (Get_Pragma_Arg (Last (PPA)));
 
@@ -29377,11 +29356,11 @@ package body Sem_Prag is
               or else (Pnm = Name_Assertion
                         and then Is_Valid_Assertion_Kind (Nam))
               or else (Pnm = Name_Statement_Assertions
-                        and then Nam_In (Nam, Name_Assert,
-                                              Name_Assert_And_Cut,
-                                              Name_Assume,
-                                              Name_Loop_Invariant,
-                                              Name_Loop_Variant))
+                        and then Nam in Name_Assert
+                                      | Name_Assert_And_Cut
+                                      | Name_Assume
+                                      | Name_Loop_Invariant
+                                      | Name_Loop_Variant)
             then
                case (Chars (Get_Pragma_Arg (Last (PPA)))) is
                   when Name_Check
@@ -29461,7 +29440,7 @@ package body Sem_Prag is
             --  they depend on variable input. This check is left to the SPARK
             --  prover.
 
-            elsif Ekind_In (Item_Id, E_Abstract_State, E_Variable) then
+            elsif Ekind (Item_Id) in E_Abstract_State | E_Variable then
                return True;
 
             --  Recursively peek into nested packages and instantiations
@@ -29698,8 +29677,8 @@ package body Sem_Prag is
          Prag := Pre_Post_Conditions (Prags);
 
          while Present (Prag) loop
-            if Nam_In (Pragma_Name_Unmapped (Prag),
-                       Name_Precondition, Name_Postcondition)
+            if Pragma_Name_Unmapped (Prag)
+                 in Name_Precondition | Name_Postcondition
               and then Class_Present (Prag)
             then
                --  The generated pragma must be analyzed in the context of
@@ -29852,11 +29831,11 @@ package body Sem_Prag is
 
          procedure Collect_Global_Item (Item : Node_Id; Mode : Name_Id) is
          begin
-            if Nam_In (Mode, Name_In_Out, Name_Input) then
+            if Mode in Name_In_Out | Name_Input then
                Append_New_Elmt (Item, Subp_Inputs);
             end if;
 
-            if Nam_In (Mode, Name_In_Out, Name_Output) then
+            if Mode in Name_In_Out | Name_Output then
                Append_New_Elmt (Item, Subp_Outputs);
             end if;
          end Collect_Global_Item;
@@ -29874,9 +29853,9 @@ package body Sem_Prag is
 
          --  Single global item declaration
 
-         elsif Nkind_In (List, N_Expanded_Name,
-                               N_Identifier,
-                               N_Selected_Component)
+         elsif Nkind (List) in N_Expanded_Name
+                             | N_Identifier
+                             | N_Selected_Component
          then
             Collect_Global_Item (List, Mode);
 
@@ -29928,13 +29907,13 @@ package body Sem_Prag is
       --  Process all formal parameters of entries, [generic] subprograms, and
       --  their bodies.
 
-      if Ekind_In (Subp_Id, E_Entry,
-                            E_Entry_Family,
-                            E_Function,
-                            E_Generic_Function,
-                            E_Generic_Procedure,
-                            E_Procedure,
-                            E_Subprogram_Body)
+      if Ekind (Subp_Id) in E_Entry
+                          | E_Entry_Family
+                          | E_Function
+                          | E_Generic_Function
+                          | E_Generic_Procedure
+                          | E_Procedure
+                          | E_Subprogram_Body
       then
          Subp_Decl := Unit_Declaration_Node (Subp_Id);
          Spec_Id   := Unique_Defining_Entity (Subp_Decl);
@@ -29943,11 +29922,11 @@ package body Sem_Prag is
 
          Formal := First_Entity (Spec_Id);
          while Present (Formal) loop
-            if Ekind_In (Formal, E_In_Out_Parameter, E_In_Parameter) then
+            if Ekind (Formal) in E_In_Out_Parameter | E_In_Parameter then
                Append_New_Elmt (Formal, Subp_Inputs);
             end if;
 
-            if Ekind_In (Formal, E_In_Out_Parameter, E_Out_Parameter) then
+            if Ekind (Formal) in E_In_Out_Parameter | E_Out_Parameter then
                Append_New_Elmt (Formal, Subp_Outputs);
 
                --  Out parameters can act as inputs when the related type is
@@ -29967,7 +29946,7 @@ package body Sem_Prag is
       --  Otherwise the input denotes a task type, a task body, or the
       --  anonymous object created for a single task type.
 
-      elsif Ekind_In (Subp_Id, E_Task_Type, E_Task_Body)
+      elsif Ekind (Subp_Id) in E_Task_Type | E_Task_Body
         or else Is_Single_Task_Object (Subp_Id)
       then
          Subp_Decl := Declaration_Node (Subp_Id);
@@ -29979,7 +29958,7 @@ package body Sem_Prag is
       --  outputs.
 
       if Is_Entry_Body (Subp_Id)
-        or else Ekind_In (Subp_Id, E_Subprogram_Body, E_Task_Body)
+        or else Ekind (Subp_Id) in E_Subprogram_Body | E_Task_Body
       then
          Depends := Get_Pragma (Subp_Id, Pragma_Refined_Depends);
          Global  := Get_Pragma (Subp_Id, Pragma_Refined_Global);
@@ -30037,7 +30016,7 @@ package body Sem_Prag is
 
          Append_New_Elmt (Typ, Subp_Inputs);
 
-         if Ekind_In (Spec_Id, E_Entry, E_Entry_Family, E_Procedure) then
+         if Ekind (Spec_Id) in E_Entry | E_Entry_Family | E_Procedure then
             Append_New_Elmt (Typ, Subp_Outputs);
          end if;
 
@@ -30086,8 +30065,8 @@ package body Sem_Prag is
 
    function Delay_Config_Pragma_Analyze (N : Node_Id) return Boolean is
    begin
-      return Nam_In (Pragma_Name_Unmapped (N),
-                     Name_Interrupt_State, Name_Priority_Specific_Dispatching);
+      return Pragma_Name_Unmapped (N)
+        in Name_Interrupt_State | Name_Priority_Specific_Dispatching;
    end Delay_Config_Pragma_Analyze;
 
    -----------------------
@@ -30244,10 +30223,10 @@ package body Sem_Prag is
       Stmt    : Node_Id;
 
       Look_For_Body : constant Boolean :=
-                        Nam_In (Prag_Nam, Name_Refined_Depends,
-                                          Name_Refined_Global,
-                                          Name_Refined_Post,
-                                          Name_Refined_State);
+                        Prag_Nam in Name_Refined_Depends
+                                  | Name_Refined_Global
+                                  | Name_Refined_Post
+                                  | Name_Refined_State;
       --  Refinement pragmas must be associated with a subprogram body [stub]
 
    --  Start of processing for Find_Related_Declaration_Or_Body
@@ -31994,10 +31973,8 @@ package body Sem_Prag is
       Args   : Node_Id;
 
    begin
-      pragma Assert (Nam_In (Arg_Nam, Name_Ensures,
-                                      Name_Mode,
-                                      Name_Name,
-                                      Name_Requires));
+      pragma Assert
+        (Arg_Nam in Name_Ensures | Name_Mode | Name_Name | Name_Requires);
 
       --  The caller requests the aspect argument
 
index f1c01779b918b3e191c224ee4b77d0bf8b2e495c..c1c5b3e36f22e61a6b65a067ab7b68a92bd3203d 100644 (file)
@@ -455,8 +455,8 @@ package body Sem_Res is
               and then not
                 (Nkind (Parent (P)) = N_Subtype_Indication
                   and then
-                    Nkind_In (Parent (Parent (P)), N_Component_Definition,
-                                                   N_Subtype_Declaration)
+                    Nkind (Parent (Parent (P))) in N_Component_Definition
+                                                 | N_Subtype_Declaration
                   and then Paren_Count (N) = 0)
             then
                Error_Msg_N
@@ -580,8 +580,8 @@ package body Sem_Res is
 
       --  Legal case is in index or discriminant constraint
 
-      elsif Nkind_In (PN, N_Index_Or_Discriminant_Constraint,
-                          N_Discriminant_Association)
+      elsif Nkind (PN) in N_Index_Or_Discriminant_Constraint
+                        | N_Discriminant_Association
       then
          if Paren_Count (N) > 0 then
             Error_Msg_N
@@ -602,9 +602,8 @@ package body Sem_Res is
       else
          D := PN;
          P := Parent (PN);
-         while not Nkind_In (P, N_Component_Declaration,
-                                N_Subtype_Indication,
-                                N_Entry_Declaration)
+         while Nkind (P) not in
+           N_Component_Declaration | N_Subtype_Indication | N_Entry_Declaration
          loop
             D := P;
             P := Parent (P);
@@ -617,8 +616,8 @@ package body Sem_Res is
          --  course a double fault.
 
          if (Nkind (P) = N_Subtype_Indication
-              and then Nkind_In (Parent (P), N_Component_Definition,
-                                             N_Derived_Type_Definition)
+              and then Nkind (Parent (P)) in N_Component_Definition
+                                           | N_Derived_Type_Definition
               and then D = Constraint (P))
 
            --  The constraint itself may be given by a subtype indication,
@@ -810,12 +809,12 @@ package body Sem_Res is
       function Is_Conditional_Statement (N : Node_Id) return Boolean is
       begin
          return
-           Nkind_In (N, N_And_Then,
-                        N_Case_Expression,
-                        N_Case_Statement,
-                        N_If_Expression,
-                        N_If_Statement,
-                        N_Or_Else);
+           Nkind (N) in N_And_Then
+                      | N_Case_Expression
+                      | N_Case_Statement
+                      | N_If_Expression
+                      | N_If_Statement
+                      | N_Or_Else;
       end Is_Conditional_Statement;
 
       -------------------------------
@@ -841,7 +840,7 @@ package body Sem_Res is
       begin
          return
            Nkind (HSS) = N_Handled_Sequence_Of_Statements
-             and then Nkind_In (Parent (HSS), N_Entry_Body, N_Subprogram_Body)
+             and then Nkind (Parent (HSS)) in N_Entry_Body | N_Subprogram_Body
              and then Is_List_Member (N)
              and then List_Containing (N) = Statements (HSS);
       end Is_Immediately_Within_Body;
@@ -1149,9 +1148,8 @@ package body Sem_Res is
          --  functions, this is never a parameterless call (RM 4.1.4(6)).
 
          if Nkind (Parent (N)) = N_Attribute_Reference
-            and then Nam_In (Attribute_Name (Parent (N)), Name_Address,
-                                                          Name_Code_Address,
-                                                          Name_Access)
+            and then Attribute_Name (Parent (N))
+                       in Name_Address | Name_Code_Address | Name_Access
          then
             return False;
          end if;
@@ -1201,9 +1199,9 @@ package body Sem_Res is
         and then Ekind (Entity (N)) = E_Procedure
         and then not Is_Overloaded (N)
         and then
-         Nkind_In (Parent (N), N_Parameter_Association,
-                               N_Function_Call,
-                               N_Procedure_Call_Statement)
+         Nkind (Parent (N)) in N_Parameter_Association
+                             | N_Function_Call
+                             | N_Procedure_Call_Statement
       then
          return;
       end if;
@@ -1238,8 +1236,8 @@ package body Sem_Res is
         (Nkind (N) = N_Selected_Component
           and then (Ekind (Entity (Selector_Name (N))) = E_Function
                      or else
-                       (Ekind_In (Entity (Selector_Name (N)), E_Entry,
-                                                              E_Procedure)
+                       (Ekind (Entity (Selector_Name (N))) in
+                          E_Entry | E_Procedure
                          and then Is_Overloaded (Selector_Name (N)))))
 
       --  If one of the above three conditions is met, rewrite as call. Apply
@@ -1547,7 +1545,7 @@ package body Sem_Res is
          elsif In_Instance then
             null;
 
-         elsif Nam_In (Op_Name, Name_Op_Multiply, Name_Op_Divide)
+         elsif Op_Name in Name_Op_Multiply | Name_Op_Divide
            and then Is_Fixed_Point_Type (Etype (Act1))
            and then Is_Fixed_Point_Type (Etype (Act2))
          then
@@ -1559,7 +1557,7 @@ package body Sem_Res is
          --  available.
 
          elsif Ada_Version >= Ada_2005
-           and then Nam_In (Op_Name, Name_Op_Eq, Name_Op_Ne)
+           and then Op_Name in Name_Op_Eq | Name_Op_Ne
            and then (Is_Anonymous_Access_Type (Etype (Act1))
                       or else Is_Anonymous_Access_Type (Etype (Act2)))
          then
@@ -1670,7 +1668,7 @@ package body Sem_Res is
            and then not In_Instance
          then
             if Is_Fixed_Point_Type (Typ)
-              and then Nam_In (Op_Name, Name_Op_Multiply, Name_Op_Divide)
+              and then Op_Name in Name_Op_Multiply | Name_Op_Divide
             then
                --  Already checked above
 
@@ -1707,7 +1705,7 @@ package body Sem_Res is
       --  the equality node will not resolve any remaining ambiguity, and it
       --  assumes that the first operand is not overloaded.
 
-      if Nam_In (Op_Name, Name_Op_Eq, Name_Op_Ne)
+      if Op_Name in Name_Op_Eq | Name_Op_Ne
         and then Ekind (Func) = E_Function
         and then Is_Overloaded (Act1)
       then
@@ -2162,9 +2160,9 @@ package body Sem_Res is
       --  access-to-subprogram type.
 
       if Nkind (N) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (N), Name_Access,
-                                             Name_Unrestricted_Access,
-                                             Name_Unchecked_Access)
+        and then Attribute_Name (N) in Name_Access
+                                     | Name_Unrestricted_Access
+                                     | Name_Unchecked_Access
         and then Comes_From_Source (N)
         and then Is_Entity_Name (Prefix (N))
         and then Is_Subprogram (Entity (Prefix (N)))
@@ -2582,10 +2580,10 @@ package body Sem_Res is
                   Set_Entity (N, Seen);
                   Generate_Reference (Seen, N);
 
-               elsif Nkind_In (N, N_Case_Expression,
-                                  N_Character_Literal,
-                                  N_Delta_Aggregate,
-                                  N_If_Expression)
+               elsif Nkind (N) in N_Case_Expression
+                                | N_Character_Literal
+                                | N_Delta_Aggregate
+                                | N_If_Expression
                then
                   Set_Etype (N, Expr_Type);
 
@@ -2651,15 +2649,15 @@ package body Sem_Res is
                --  with a name that is an explicit dereference, there is
                --  nothing to be done at this point.
 
-               elsif Nkind_In (N, N_Attribute_Reference,
-                                  N_And_Then,
-                                  N_Explicit_Dereference,
-                                  N_Identifier,
-                                  N_Indexed_Component,
-                                  N_Or_Else,
-                                  N_Range,
-                                  N_Selected_Component,
-                                  N_Slice)
+               elsif Nkind (N) in N_Attribute_Reference
+                                | N_And_Then
+                                | N_Explicit_Dereference
+                                | N_Identifier
+                                | N_Indexed_Component
+                                | N_Or_Else
+                                | N_Range
+                                | N_Selected_Component
+                                | N_Slice
                  or else Nkind (Name (N)) = N_Explicit_Dereference
                then
                   null;
@@ -4546,7 +4544,7 @@ package body Sem_Res is
 
             --  Apply appropriate constraint/predicate checks for IN [OUT] case
 
-            if Ekind_In (F, E_In_Parameter, E_In_Out_Parameter) then
+            if Ekind (F) in E_In_Parameter | E_In_Out_Parameter then
 
                --  Apply predicate tests except in certain special cases. Note
                --  that it might be more consistent to apply these only when
@@ -4628,7 +4626,7 @@ package body Sem_Res is
 
             --  Checks for OUT parameters and IN OUT parameters
 
-            if Ekind_In (F, E_Out_Parameter, E_In_Out_Parameter) then
+            if Ekind (F) in E_Out_Parameter | E_In_Out_Parameter then
 
                --  If there is a type conversion, make sure the return value
                --  meets the constraints of the variable before the conversion.
@@ -4947,7 +4945,7 @@ package body Sem_Res is
 
             if Comes_From_Source (Nam)
               and then Is_Ghost_Entity (Nam)
-              and then Ekind_In (F, E_In_Out_Parameter, E_Out_Parameter)
+              and then Ekind (F) in E_In_Out_Parameter | E_Out_Parameter
               and then Is_Entity_Name (A)
               and then Present (Entity (A))
               and then not Is_Ghost_Entity (Entity (A))
@@ -5234,7 +5232,7 @@ package body Sem_Res is
             Aggr := Original_Node (Expression (E));
 
             if Has_Discriminants (Subtyp)
-              and then Nkind_In (Aggr, N_Aggregate, N_Extension_Aggregate)
+              and then Nkind (Aggr) in N_Aggregate | N_Extension_Aggregate
             then
                Discrim := First_Discriminant (Base_Type (Subtyp));
 
@@ -5591,18 +5589,18 @@ package body Sem_Res is
          --  N is the expression after "delta" in a fixed_point_definition;
          --  see RM-3.5.9(6):
 
-         return Nkind_In (Parent (N), N_Ordinary_Fixed_Point_Definition,
-                                      N_Decimal_Fixed_Point_Definition,
+         return Nkind (Parent (N)) in N_Ordinary_Fixed_Point_Definition
+                                    | N_Decimal_Fixed_Point_Definition
 
          --  N is one of the bounds in a real_range_specification;
          --  see RM-3.5.7(5):
 
-                                      N_Real_Range_Specification,
+                                    | N_Real_Range_Specification
 
          --  N is the expression of a delta_constraint;
          --  see RM-J.3(3):
 
-                                      N_Delta_Constraint);
+                                    | N_Delta_Constraint;
       end Expected_Type_Is_Any_Real;
 
       -----------------------------
@@ -5684,7 +5682,7 @@ package body Sem_Res is
             --  a conversion will be applied to each operand, so resolve it
             --  with its own type.
 
-            if Nkind_In (Parent (N), N_Op_Divide, N_Op_Multiply) then
+            if Nkind (Parent (N)) in N_Op_Divide | N_Op_Multiply then
                Resolve (N);
 
             else
@@ -5772,7 +5770,7 @@ package body Sem_Res is
          --  involving a fixed-point operand) the conditional expression must
          --  resolve to a unique visible fixed_point type, normally Duration.
 
-         elsif Nkind_In (N, N_Case_Expression, N_If_Expression)
+         elsif Nkind (N) in N_Case_Expression | N_If_Expression
            and then Etype (N) = Universal_Real
            and then Is_Fixed_Point_Type (B_Typ)
          then
@@ -5837,7 +5835,7 @@ package body Sem_Res is
                         and then (Is_Integer_Or_Universal (L)
                                     or else
                                   Is_Integer_Or_Universal (R))))
-        and then Nkind_In (N, N_Op_Multiply, N_Op_Divide)
+        and then Nkind (N) in N_Op_Multiply | N_Op_Divide
       then
          if TL = Universal_Integer or else TR = Universal_Integer then
             Check_For_Visible_Operator (N, B_Typ);
@@ -5883,8 +5881,8 @@ package body Sem_Res is
          then
             if B_Typ = Universal_Fixed
               and then not Expected_Type_Is_Any_Real (N)
-              and then not Nkind_In (Parent (N), N_Type_Conversion,
-                                                 N_Unchecked_Type_Conversion)
+              and then Nkind (Parent (N)) not in
+                         N_Type_Conversion | N_Unchecked_Type_Conversion
             then
                Error_Msg_N ("type cannot be determined from context!", N);
                Error_Msg_N ("\explicit conversion to result type required", N);
@@ -5895,9 +5893,8 @@ package body Sem_Res is
             else
                if Ada_Version = Ada_83
                  and then Etype (N) = Universal_Fixed
-                 and then not
-                   Nkind_In (Parent (N), N_Type_Conversion,
-                                         N_Unchecked_Type_Conversion)
+                 and then Nkind (Parent (N)) not in
+                            N_Type_Conversion | N_Unchecked_Type_Conversion
                then
                   Error_Msg_N
                     ("(Ada 83) fixed-point operation needs explicit "
@@ -5985,7 +5982,7 @@ package body Sem_Res is
 
          --  Give warning if explicit division by zero
 
-         if Nkind_In (N, N_Op_Divide, N_Op_Rem, N_Op_Mod)
+         if Nkind (N) in N_Op_Divide | N_Op_Rem | N_Op_Mod
            and then not Division_Checks_Suppressed (Etype (N))
          then
             Rop := Right_Opnd (N);
@@ -6066,7 +6063,7 @@ package body Sem_Res is
          --  if both operands can be negative.
 
          if Restriction_Check_Required (No_Implicit_Conditionals)
-           and then Nkind_In (N, N_Op_Rem, N_Op_Mod)
+           and then Nkind (N) in N_Op_Rem | N_Op_Mod
          then
             declare
                Lo : Uint;
@@ -6216,7 +6213,7 @@ package body Sem_Res is
       --  operations use the same circuitry because the name in the call
       --  can be an arbitrary expression with special resolution rules.
 
-      elsif Nkind_In (Subp, N_Selected_Component, N_Indexed_Component)
+      elsif Nkind (Subp) in N_Selected_Component | N_Indexed_Component
         or else (Is_Entity_Name (Subp) and then Is_Entry (Entity (Subp)))
       then
          Resolve_Entry_Call (N, Typ);
@@ -6647,8 +6644,8 @@ package body Sem_Res is
                         begin
                            P := Prev (N);
                            while Present (P) loop
-                              if not Nkind_In (P, N_Assignment_Statement,
-                                                  N_Raise_Constraint_Error)
+                              if Nkind (P) not in N_Assignment_Statement
+                                                | N_Raise_Constraint_Error
                               then
                                  exit Scope_Loop;
                               end if;
@@ -6765,7 +6762,7 @@ package body Sem_Res is
       --  secondary stack (or any other one).
 
       elsif Expander_Active
-        and then Ekind_In (Nam, E_Function, E_Subprogram_Type)
+        and then Ekind (Nam) in E_Function | E_Subprogram_Type
         and then Requires_Transient_Scope (Etype (Nam))
         and then not Is_Ignored_Ghost_Entity (Nam)
       then
@@ -6864,7 +6861,7 @@ package body Sem_Res is
             F := First_Formal (Nam);
             A := First_Actual (N);
             while Present (F) and then Present (A) loop
-               if Ekind_In (F, E_Out_Parameter, E_In_Out_Parameter)
+               if Ekind (F) in E_Out_Parameter | E_In_Out_Parameter
                  and then Warn_On_Modified_As_Out_Parameter (F)
                  and then Is_Entity_Name (A)
                  and then Present (Entity (A))
@@ -7579,8 +7576,8 @@ package body Sem_Res is
          Expr    : Node_Id) return Boolean
       is
       begin
-         if Nkind_In (Context, N_Assignment_Statement,
-                               N_Object_Declaration)
+         if Nkind (Context) in
+              N_Assignment_Statement | N_Object_Declaration
            and then Expression (Context) = Expr
          then
             return True;
@@ -7588,15 +7585,15 @@ package body Sem_Res is
          --  Check whether a construct that yields a name is the expression of
          --  an assignment statement or an object declaration.
 
-         elsif (Nkind_In (Context, N_Attribute_Reference,
-                                   N_Explicit_Dereference,
-                                   N_Indexed_Component,
-                                   N_Selected_Component,
-                                   N_Slice)
+         elsif (Nkind (Context) in N_Attribute_Reference
+                                 | N_Explicit_Dereference
+                                 | N_Indexed_Component
+                                 | N_Selected_Component
+                                 | N_Slice
                   and then Prefix (Context) = Expr)
            or else
-               (Nkind_In (Context, N_Type_Conversion,
-                                   N_Unchecked_Type_Conversion)
+               (Nkind (Context) in N_Type_Conversion
+                                 | N_Unchecked_Type_Conversion
                   and then Expression (Context) = Expr)
          then
             return
@@ -8460,13 +8457,11 @@ package body Sem_Res is
          S   : Entity_Id;
 
       begin
-         if Ekind_In (Etype (R), E_Allocator_Type,
-                                 E_Access_Attribute_Type)
+         if Ekind (Etype (R)) in E_Allocator_Type | E_Access_Attribute_Type
          then
             Acc := Designated_Type (Etype (R));
 
-         elsif Ekind_In (Etype (L), E_Allocator_Type,
-                                    E_Access_Attribute_Type)
+         elsif Ekind (Etype (L)) in E_Allocator_Type | E_Access_Attribute_Type
          then
             Acc := Designated_Type (Etype (L));
          else
@@ -8519,7 +8514,7 @@ package body Sem_Res is
             return;
 
          elsif T = Any_Access
-           or else Ekind_In (T, E_Allocator_Type, E_Access_Attribute_Type)
+           or else Ekind (T) in E_Allocator_Type | E_Access_Attribute_Type
          then
             T := Find_Unique_Access_Type;
 
@@ -8660,8 +8655,8 @@ package body Sem_Res is
 
          if Expander_Active
            and then
-             (Ekind_In (T, E_Anonymous_Access_Type,
-                           E_Anonymous_Access_Subprogram_Type)
+             (Ekind (T) in E_Anonymous_Access_Type
+                         | E_Anonymous_Access_Subprogram_Type
                or else Is_Private_Type (T))
          then
             if Etype (L) /= T then
@@ -9258,7 +9253,7 @@ package body Sem_Res is
          Res : Node_Id;
 
       begin
-         if Nkind_In (Opnd, N_Integer_Literal, N_Real_Literal) then
+         if Nkind (Opnd) in N_Integer_Literal | N_Real_Literal then
             Res :=
               Make_Qualified_Expression (Loc,
                 Subtype_Mark => New_Occurrence_Of (Btyp, Loc),
@@ -9451,7 +9446,7 @@ package body Sem_Res is
 
       if Short_Circuit_And_Or
         and then B_Typ = Standard_Boolean
-        and then Nkind_In (N, N_Op_And, N_Op_Or)
+        and then Nkind (N) in N_Op_And | N_Op_Or
       then
          --  Mark the corresponding putative SCO operator as truly a logical
          --  (and short-circuit) operator.
@@ -9584,9 +9579,9 @@ package body Sem_Res is
                Alt := First (Alternatives (N));
                while Present (Alt) loop
                   if Is_OK_Static_Expression (Alt)
-                    and then (Nkind_In (Alt, N_Integer_Literal,
-                                             N_Character_Literal)
-                               or else Nkind (Alt) in N_Has_Entity)
+                    and then Nkind (Alt) in N_Integer_Literal
+                                          | N_Character_Literal
+                                          | N_Has_Entity
                   then
                      Nalts := Nalts + 1;
                      Alts (Nalts) := (Alt, Expr_Value (Alt));
@@ -10239,7 +10234,7 @@ package body Sem_Res is
 
          begin
             if B_Typ = Standard_Boolean
-              and then Nkind_In (Opnd, N_Op_Eq, N_Op_Ne)
+              and then Nkind (Opnd) in N_Op_Eq | N_Op_Ne
               and then Is_Overloaded (Opnd)
             then
                Resolve_Equality_Op (Opnd, B_Typ);
@@ -11257,10 +11252,10 @@ package body Sem_Res is
 
       elsif Nkind (Parent (N)) = N_Op_Concat
         and then not Need_Check
-        and then not Nkind_In (Original_Node (N), N_Character_Literal,
-                                                  N_Attribute_Reference,
-                                                  N_Qualified_Expression,
-                                                  N_Type_Conversion)
+        and then Nkind (Original_Node (N)) not in N_Character_Literal
+                                                | N_Attribute_Reference
+                                                | N_Qualified_Expression
+                                                | N_Type_Conversion
       then
          Subtype_Id := Typ;
 
@@ -11546,14 +11541,14 @@ package body Sem_Res is
          --  precision.
 
          if Is_Fixed_Point_Type (Typ)
-           and then Nkind_In (Operand, N_Op_Divide, N_Op_Multiply)
+           and then Nkind (Operand) in N_Op_Divide | N_Op_Multiply
            and then Etype (Left_Opnd  (Operand)) = Any_Fixed
            and then Etype (Right_Opnd (Operand)) = Any_Fixed
          then
             Set_Etype (Operand, Universal_Real);
 
          elsif Is_Numeric_Type (Typ)
-           and then Nkind_In (Operand, N_Op_Multiply, N_Op_Divide)
+           and then Nkind (Operand) in N_Op_Multiply | N_Op_Divide
            and then (Etype (Right_Opnd (Operand)) = Universal_Real
                        or else
                      Etype (Left_Opnd  (Operand)) = Universal_Real)
@@ -11715,11 +11710,11 @@ package body Sem_Res is
             --  newer language version.
 
             elsif Nkind (Orig_N) = N_Qualified_Expression
-              and then Nkind_In (Parent (N), N_Attribute_Reference,
-                                             N_Indexed_Component,
-                                             N_Selected_Component,
-                                             N_Slice,
-                                             N_Explicit_Dereference)
+              and then Nkind (Parent (N)) in N_Attribute_Reference
+                                           | N_Indexed_Component
+                                           | N_Selected_Component
+                                           | N_Slice
+                                           | N_Explicit_Dereference
             then
                null;
 
@@ -11849,7 +11844,7 @@ package body Sem_Res is
 
                --  Handle subtypes
 
-               if Ekind_In (Opnd, E_Protected_Subtype, E_Task_Subtype) then
+               if Ekind (Opnd) in E_Protected_Subtype | E_Task_Subtype then
                   Opnd := Etype (Opnd);
                end if;
 
@@ -12007,7 +12002,7 @@ package body Sem_Res is
             --  mod. These are the cases where the grouping can affect results.
 
             if Paren_Count (Rorig) = 0
-              and then Nkind_In (Rorig, N_Op_Mod, N_Op_Multiply, N_Op_Divide)
+              and then Nkind (Rorig) in N_Op_Mod | N_Op_Multiply | N_Op_Divide
             then
                --  For mod, we always give the warning, since the value is
                --  affected by the parenthesization (e.g. (-5) mod 315 /=
@@ -12089,7 +12084,7 @@ package body Sem_Res is
                --  overflow is impossible (divisor > 1) or we have a case of
                --  division by zero in any case.
 
-               if Nkind_In (Rorig, N_Op_Divide, N_Op_Rem)
+               if Nkind (Rorig) in N_Op_Divide | N_Op_Rem
                  and then Compile_Time_Known_Value (Right_Opnd (Rorig))
                  and then UI_Abs (Expr_Value (Right_Opnd (Rorig))) /= 1
                then
@@ -12567,9 +12562,9 @@ package body Sem_Res is
                   or else (Is_Fixed_Point_Type (Target_Typ)
                             and then Conversion_OK (N)))
               and then Nkind (Operand) = N_Attribute_Reference
-              and then Nam_In (Attribute_Name (Operand), Name_Rounding,
-                                                         Name_Machine_Rounding,
-                                                         Name_Truncation)
+              and then Attribute_Name (Operand) in Name_Rounding
+                                                 | Name_Machine_Rounding
+                                                 | Name_Truncation
             then
                declare
                   Truncate : constant Boolean :=
@@ -12702,7 +12697,7 @@ package body Sem_Res is
          --  When the context is a type conversion, issue the warning on the
          --  expression of the conversion because it is the actual operation.
 
-         if Nkind_In (N, N_Type_Conversion, N_Unchecked_Type_Conversion) then
+         if Nkind (N) in N_Type_Conversion | N_Unchecked_Type_Conversion then
             ErrN := Expression (N);
          else
             ErrN := N;
@@ -12923,11 +12918,10 @@ package body Sem_Res is
          --     <prefix>.all.Access_Discrim.all.Access_Discrim case,
          --  where the correct result depends on <prefix>.
 
-         return Nkind_In (Associated_Node,
-           N_Procedure_Specification, -- access parameter
-           N_Function_Specification,  -- access parameter
-           N_Object_Declaration       -- saooaaat
-           )
+         return Nkind (Associated_Node) in
+                  N_Procedure_Specification |  -- access parameter
+                  N_Function_Specification  |  -- access parameter
+                  N_Object_Declaration         -- saooaaat
            or else Is_Discrim_Of_Bad_Access_Conversion_Argument (Deref_Prefix);
       end Is_Discrim_Of_Bad_Access_Conversion_Argument;
 
@@ -13001,9 +12995,9 @@ package body Sem_Res is
                --  checks that must be applied to such conversions to prevent
                --  out-of-scope references.
 
-            elsif Ekind_In
-                    (Target_Comp_Base, E_Anonymous_Access_Type,
-                                       E_Anonymous_Access_Subprogram_Type)
+            elsif Ekind (Target_Comp_Base) in
+                    E_Anonymous_Access_Type
+                  | E_Anonymous_Access_Subprogram_Type
               and then Ekind (Opnd_Comp_Base) = Ekind (Target_Comp_Base)
               and then
                 Subtypes_Statically_Match (Target_Comp_Type, Opnd_Comp_Type)
@@ -13312,8 +13306,8 @@ package body Sem_Res is
       --  interface type.
 
       elsif Is_Access_Type (Opnd_Type)
-        and then Ekind_In (Target_Type, E_General_Access_Type,
-                                        E_Anonymous_Access_Type)
+        and then Ekind (Target_Type) in
+                   E_General_Access_Type | E_Anonymous_Access_Type
         and then Is_Interface (Directly_Designated_Type (Target_Type))
       then
          --  Check the static accessibility rule of 4.6(17). Note that the
@@ -13393,7 +13387,7 @@ package body Sem_Res is
                if Is_Entity_Name (Operand)
                  and then not Is_Local_Anonymous_Access (Opnd_Type)
                  and then
-                   Ekind_In (Entity (Operand), E_In_Parameter, E_Constant)
+                   Ekind (Entity (Operand)) in E_In_Parameter | E_Constant
                  and then Present (Discriminal_Link (Entity (Operand)))
                then
                   Conversion_Error_N
@@ -13408,14 +13402,15 @@ package body Sem_Res is
 
       --  General and anonymous access types
 
-      elsif Ekind_In (Target_Type, E_General_Access_Type,
-                                   E_Anonymous_Access_Type)
+      elsif Ekind (Target_Type) in
+              E_General_Access_Type | E_Anonymous_Access_Type
           and then
             Conversion_Check
               (Is_Access_Type (Opnd_Type)
-                and then not
-                  Ekind_In (Opnd_Type, E_Access_Subprogram_Type,
-                                       E_Access_Protected_Subprogram_Type),
+                and then
+                  Ekind (Opnd_Type) not in
+                    E_Access_Subprogram_Type |
+                    E_Access_Protected_Subprogram_Type,
                "must be an access-to-object type")
       then
          if Is_Access_Constant (Opnd_Type)
@@ -13471,10 +13466,10 @@ package body Sem_Res is
                   --  as universal_access "=".
 
                   elsif not Is_Local_Anonymous_Access (Opnd_Type)
-                    and then Nkind_In (Associated_Node_For_Itype (Opnd_Type),
-                                       N_Function_Specification,
-                                       N_Procedure_Specification)
-                    and then not Nkind_In (Parent (N), N_Op_Eq, N_Op_Ne)
+                    and then Nkind (Associated_Node_For_Itype (Opnd_Type)) in
+                               N_Function_Specification |
+                               N_Procedure_Specification
+                    and then Nkind (Parent (N)) not in N_Op_Eq | N_Op_Ne
                   then
                      Conversion_Error_N
                        ("implicit conversion of anonymous access parameter "
@@ -13588,7 +13583,7 @@ package body Sem_Res is
 
                if Is_Entity_Name (Operand)
                  and then
-                   Ekind_In (Entity (Operand), E_In_Parameter, E_Constant)
+                   Ekind (Entity (Operand)) in E_In_Parameter | E_Constant
                  and then Present (Discriminal_Link (Entity (Operand)))
                then
                   Conversion_Error_N
index aa226ed2ec14d26bb92c2bbdde625c4e4b273f66..f8ad56bb5fa413b9c8ae3a3b45834c6db003a77c 100644 (file)
@@ -86,8 +86,8 @@ package body Sem_SCIL is
             --  object or parameter declaration. Interface types are still
             --  unsupported.
 
-            elsif Nkind_In (Ctrl_Tag, N_Object_Declaration,
-                                      N_Parameter_Specification)
+            elsif Nkind (Ctrl_Tag) in
+                    N_Object_Declaration | N_Parameter_Specification
             then
                Ctrl_Typ := Etype (Defining_Identifier (Ctrl_Tag));
 
@@ -132,10 +132,10 @@ package body Sem_SCIL is
             --  Check contents of the boolean expression associated with the
             --  membership test.
 
-            pragma Assert (Nkind_In (N, N_Identifier,
-                                        N_And_Then,
-                                        N_Or_Else,
-                                        N_Expression_With_Actions)
+            pragma Assert
+              (Nkind (N) in
+                 N_Identifier | N_And_Then | N_Or_Else |
+                 N_Expression_With_Actions
               and then Etype (N) = Standard_Boolean);
 
             --  Check the entity identifier of the associated tagged type (that
index d975edc26fe77cfead986e627c45e03c68eddb80..a5e62a72cd92d469d0f3237e69c1999a840a412f 100644 (file)
@@ -1039,8 +1039,8 @@ package body Sem_Type is
       --  An Access_To_Subprogram is compatible with itself, or with an
       --  anonymous type created for an attribute reference Access.
 
-      elsif Ekind_In (BT1, E_Access_Subprogram_Type,
-                           E_Access_Protected_Subprogram_Type)
+      elsif Ekind (BT1) in E_Access_Subprogram_Type
+                         | E_Access_Protected_Subprogram_Type
         and then Is_Access_Type (T2)
         and then (not Comes_From_Source (T1)
                    or else not Comes_From_Source (T2))
@@ -1055,8 +1055,8 @@ package body Sem_Type is
       --  with itself, or with an anonymous type created for an attribute
       --  reference Access.
 
-      elsif Ekind_In (BT1, E_Anonymous_Access_Subprogram_Type,
-                           E_Anonymous_Access_Protected_Subprogram_Type)
+      elsif Ekind (BT1) in E_Anonymous_Access_Subprogram_Type
+                         | E_Anonymous_Access_Protected_Subprogram_Type
         and then Is_Access_Type (T2)
         and then (not Comes_From_Source (T1)
                    or else not Comes_From_Source (T2))
@@ -1106,7 +1106,7 @@ package body Sem_Type is
       --  imposed by context.
 
       elsif Ekind (T2) = E_Access_Attribute_Type
-        and then Ekind_In (BT1, E_General_Access_Type, E_Access_Type)
+        and then Ekind (BT1) in E_General_Access_Type | E_Access_Type
         and then Covers (Designated_Type (T1), Designated_Type (T2))
       then
          --  If the target type is a RACW type while the source is an access
@@ -1599,10 +1599,10 @@ package body Sem_Type is
                  and then Is_Overloaded (Act1)
                  and then
                    (Nkind (Act1) in N_Unary_Op
-                     or else Nkind_In (Left_Opnd (Act1), N_Integer_Literal,
-                                                         N_Real_Literal))
-                 and then Nkind_In (Right_Opnd (Act1), N_Integer_Literal,
-                                                       N_Real_Literal)
+                     or else Nkind (Left_Opnd (Act1)) in
+                               N_Integer_Literal | N_Real_Literal)
+                 and then Nkind (Right_Opnd (Act1)) in
+                            N_Integer_Literal | N_Real_Literal
                  and then Has_Compatible_Type (Act1, Standard_Boolean)
                  and then Etype (F1) = Standard_Boolean
                then
@@ -1627,8 +1627,8 @@ package body Sem_Type is
                   elsif Present (Act2)
                     and then Nkind (Act2) in N_Op
                     and then Is_Overloaded (Act2)
-                    and then Nkind_In (Right_Opnd (Act2), N_Integer_Literal,
-                                                          N_Real_Literal)
+                    and then Nkind (Right_Opnd (Act2)) in
+                               N_Integer_Literal | N_Real_Literal
                     and then Has_Compatible_Type (Act2, Standard_Boolean)
                   then
                      --  The preference rule on the first actual is not
@@ -2094,7 +2094,7 @@ package body Sem_Type is
            and then not In_Instance
          then
             if Is_Fixed_Point_Type (Typ)
-              and then Nam_In (Chars (Nam1), Name_Op_Multiply, Name_Op_Divide)
+              and then Chars (Nam1) in Name_Op_Multiply | Name_Op_Divide
               and then
                 (Ada_Version = Ada_83
                   or else (Ada_Version >= Ada_2012
@@ -2114,7 +2114,7 @@ package body Sem_Type is
             --  declared in the same declarative list as the type. The node
             --  may be an operator or a function call.
 
-            elsif Nam_In (Chars (Nam1), Name_Op_Eq, Name_Op_Ne)
+            elsif Chars (Nam1) in Name_Op_Eq | Name_Op_Ne
               and then Ada_Version >= Ada_2005
               and then Etype (User_Subp) = Standard_Boolean
               and then Is_Anonymous_Access_Type (Operand_Type)
@@ -3105,7 +3105,7 @@ package body Sem_Type is
       elsif Num = 1 then
          T1 := Etype (New_First_F);
 
-         if Nam_In (Op_Name, Name_Op_Subtract, Name_Op_Add, Name_Op_Abs) then
+         if Op_Name in Name_Op_Subtract | Name_Op_Add | Name_Op_Abs then
             return Base_Type (T1) = Base_Type (T)
               and then Is_Numeric_Type (T);
 
@@ -3123,24 +3123,23 @@ package body Sem_Type is
          T1 := Etype (New_First_F);
          T2 := Etype (Next_Formal (New_First_F));
 
-         if Nam_In (Op_Name, Name_Op_And, Name_Op_Or, Name_Op_Xor) then
+         if Op_Name in Name_Op_And | Name_Op_Or | Name_Op_Xor then
             return Base_Type (T1) = Base_Type (T2)
               and then Base_Type (T1) = Base_Type (T)
               and then Valid_Boolean_Arg (Base_Type (T));
 
-         elsif Nam_In (Op_Name, Name_Op_Eq, Name_Op_Ne) then
+         elsif Op_Name in Name_Op_Eq | Name_Op_Ne then
             return Base_Type (T1) = Base_Type (T2)
               and then not Is_Limited_Type (T1)
               and then Is_Boolean_Type (T);
 
-         elsif Nam_In (Op_Name, Name_Op_Lt, Name_Op_Le,
-                                Name_Op_Gt, Name_Op_Ge)
+         elsif Op_Name in Name_Op_Lt | Name_Op_Le | Name_Op_Gt | Name_Op_Ge
          then
             return Base_Type (T1) = Base_Type (T2)
               and then Valid_Comparison_Arg (T1)
               and then Is_Boolean_Type (T);
 
-         elsif Nam_In (Op_Name, Name_Op_Add, Name_Op_Subtract) then
+         elsif Op_Name in Name_Op_Add | Name_Op_Subtract then
             return Base_Type (T1) = Base_Type (T2)
               and then Base_Type (T1) = Base_Type (T)
               and then Is_Numeric_Type (T);
@@ -3193,7 +3192,7 @@ package body Sem_Type is
                         and then Is_Floating_Point_Type (T2)
                         and then Base_Type (T2) = Base_Type (T));
 
-         elsif Nam_In (Op_Name, Name_Op_Mod, Name_Op_Rem) then
+         elsif Op_Name in Name_Op_Mod | Name_Op_Rem then
             return Base_Type (T1) = Base_Type (T2)
               and then Base_Type (T1) = Base_Type (T)
               and then Is_Integer_Type (T);
@@ -3423,26 +3422,26 @@ package body Sem_Type is
       then
          return T2;
 
-      elsif Ekind_In (B1, E_Access_Subprogram_Type,
-                          E_Access_Protected_Subprogram_Type)
+      elsif Ekind (B1) in E_Access_Subprogram_Type
+                        | E_Access_Protected_Subprogram_Type
         and then Ekind (Designated_Type (B1)) /= E_Subprogram_Type
         and then Is_Access_Type (T2)
       then
          return T2;
 
-      elsif Ekind_In (B2, E_Access_Subprogram_Type,
-                          E_Access_Protected_Subprogram_Type)
+      elsif Ekind (B2) in E_Access_Subprogram_Type
+                        | E_Access_Protected_Subprogram_Type
         and then Ekind (Designated_Type (B2)) /= E_Subprogram_Type
         and then Is_Access_Type (T1)
       then
          return T1;
 
-      elsif Ekind_In (T1, E_Allocator_Type, E_Access_Attribute_Type)
+      elsif Ekind (T1) in E_Allocator_Type | E_Access_Attribute_Type
         and then Is_Access_Type (T2)
       then
          return T2;
 
-      elsif Ekind_In (T2, E_Allocator_Type, E_Access_Attribute_Type)
+      elsif Ekind (T2) in E_Allocator_Type | E_Access_Attribute_Type
         and then Is_Access_Type (T1)
       then
          return T1;
index b2f41de1689c107054de24bc702d9bb11f294d1a..917538258510356cec9bfe80539ef4d47e74561a 100644 (file)
@@ -195,8 +195,7 @@ package body Sem_Util is
 
          Nod := Declaration_Node (Base_Type (Typ));
 
-         if Nkind_In (Nod, N_Full_Type_Declaration,
-                           N_Private_Type_Declaration)
+         if Nkind (Nod) in N_Full_Type_Declaration | N_Private_Type_Declaration
          then
             return Empty_List;
          end if;
@@ -1024,11 +1023,13 @@ package body Sem_Util is
       HSS : Node_Id;
 
    begin
-      pragma Assert (Nkind_In (N, N_Block_Statement,
-                                  N_Entry_Body,
-                                  N_Package_Body,
-                                  N_Subprogram_Body,
-                                  N_Task_Body));
+      pragma Assert
+        (Nkind (N) in
+           N_Block_Statement |
+           N_Entry_Body      |
+           N_Package_Body    |
+           N_Subprogram_Body |
+           N_Task_Body);
 
       HSS := Handled_Statement_Sequence (N);
 
@@ -2570,10 +2571,8 @@ package body Sem_Util is
 
                --  Don't collect identifiers of packages, called functions, etc
 
-               elsif Ekind_In (Entity (N), E_Package,
-                                           E_Function,
-                                           E_Procedure,
-                                           E_Entry)
+               elsif Ekind (Entity (N)) in
+                       E_Package | E_Function | E_Procedure | E_Entry
                then
                   return Skip;
 
@@ -2593,9 +2592,8 @@ package body Sem_Util is
                --  to identify a corner case???
 
                elsif Nkind (Parent (N)) = N_Component_Association
-                  and then Nkind_In (Parent (Parent (N)),
-                                     N_Aggregate,
-                                     N_Extension_Aggregate)
+                  and then Nkind (Parent (Parent (N))) in
+                             N_Aggregate | N_Extension_Aggregate
                then
                   declare
                      Choice : constant Node_Id := First (Choices (Parent (N)));
@@ -2629,15 +2627,15 @@ package body Sem_Util is
                         return Abandon;
                      end if;
 
-                     if Ekind_In (Id, E_Function, E_Generic_Function)
+                     if Ekind (Id) in E_Function | E_Generic_Function
                        and then Has_Out_Or_In_Out_Parameter (Id)
                      then
                         Formal := First_Formal (Id);
                         Actual := First_Actual (Call);
                         while Present (Actual) and then Present (Formal) loop
                            if Actual = N then
-                              if Ekind_In (Formal, E_Out_Parameter,
-                                                   E_In_Out_Parameter)
+                              if Ekind (Formal) in E_Out_Parameter
+                                                 | E_In_Out_Parameter
                               then
                                  Is_Writable_Actual := True;
                               end if;
@@ -2788,15 +2786,15 @@ package body Sem_Util is
 
       if Ada_Version < Ada_2012
         or else not Check_Actuals (N)
-        or else (not (Nkind (N) in N_Op)
-                  and then not (Nkind (N) in N_Membership_Test)
-                  and then not Nkind_In (N, N_Range,
-                                            N_Aggregate,
-                                            N_Extension_Aggregate,
-                                            N_Full_Type_Declaration,
-                                            N_Function_Call,
-                                            N_Procedure_Call_Statement,
-                                            N_Entry_Call_Statement))
+        or else Nkind (N) not in N_Op
+                               | N_Membership_Test
+                               | N_Range
+                               | N_Aggregate
+                               | N_Extension_Aggregate
+                               | N_Full_Type_Declaration
+                               | N_Function_Call
+                               | N_Procedure_Call_Statement
+                               | N_Entry_Call_Statement
         or else (Nkind (N) = N_Full_Type_Declaration
                   and then not Is_Record_Type (Defining_Identifier (N)))
 
@@ -2836,7 +2834,7 @@ package body Sem_Util is
                   Collect_Identifiers (Right_Opnd (N));
                end if;
 
-               if Nkind_In (N, N_In, N_Not_In)
+               if Nkind (N) in N_In | N_Not_In
                  and then Present (Alternatives (N))
                then
                   Expr := First (Alternatives (N));
@@ -2914,8 +2912,7 @@ package body Sem_Util is
                Formal := First_Formal (Id);
                Actual := First_Actual (N);
                while Present (Actual) and then Present (Formal) loop
-                  if Ekind_In (Formal, E_Out_Parameter,
-                                       E_In_Out_Parameter)
+                  if Ekind (Formal) in E_Out_Parameter | E_In_Out_Parameter
                   then
                      Collect_Identifiers (Actual);
                   end if;
@@ -2982,8 +2979,8 @@ package body Sem_Util is
 
                            --  Count several components
 
-                           elsif Nkind_In (Choice, N_Range,
-                                                   N_Subtype_Indication)
+                           elsif Nkind (Choice) in
+                                   N_Range | N_Subtype_Indication
                              or else (Is_Entity_Name (Choice)
                                        and then Is_Type (Entity (Choice)))
                            then
@@ -3085,8 +3082,8 @@ package body Sem_Util is
                      while Present (Assoc) loop
                         Choice := First (Choices (Assoc));
                         while Present (Choice) loop
-                           if Nkind_In (Choice, N_Range,
-                                                   N_Subtype_Indication)
+                           if Nkind (Choice) in
+                                N_Range | N_Subtype_Indication
                              or else (Is_Entity_Name (Choice)
                                        and then Is_Type (Entity (Choice)))
                            then
@@ -3446,8 +3443,8 @@ package body Sem_Util is
 
                elsif Nkind (P) = N_Parameter_Specification
                  and then Scope (Current_Scope) = Scope (Nam)
-                 and then Nkind_In (Parent (P), N_Entry_Declaration,
-                                                N_Subprogram_Declaration)
+                 and then Nkind (Parent (P)) in
+                            N_Entry_Declaration | N_Subprogram_Declaration
                then
                   Error_Msg_N
                     ("internal call cannot appear in default for formal of "
@@ -3516,7 +3513,8 @@ package body Sem_Util is
       --  Loop through sequence of basic declarative items
 
       Outer : while Present (Decl) loop
-         if not Nkind_In (Decl, N_Subprogram_Body, N_Package_Body, N_Task_Body)
+         if Nkind (Decl) not in
+              N_Subprogram_Body | N_Package_Body | N_Task_Body
            and then Nkind (Decl) not in N_Body_Stub
          then
             Next (Decl);
@@ -3554,7 +3552,7 @@ package body Sem_Util is
       Scop        : Entity_Id;
 
    begin
-      pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
+      pragma Assert (Ekind (Id) in E_Abstract_State | E_Variable);
 
       --  Nothing to do for internally-generated abstract states and variables
       --  because they do not represent the hidden state of the source unit.
@@ -3585,7 +3583,7 @@ package body Sem_Util is
          --  or a task.
 
          elsif Is_Subprogram_Or_Entry (Context)
-           or else Ekind_In (Context, E_Block, E_Task_Type)
+           or else Ekind (Context) in E_Block | E_Task_Type
          then
             return;
          end if;
@@ -3803,7 +3801,7 @@ package body Sem_Util is
             --  Initial_Condition and Initializes as this is part of the
             --  elaboration checks for the constituent (SPARK RM 9(3)).
 
-            if Nam_In (Prag_Nam, Name_Initial_Condition, Name_Initializes) then
+            if Prag_Nam in Name_Initial_Condition | Name_Initializes then
                return;
 
             --  When the reference appears within pragma Depends or Global,
@@ -3811,7 +3809,7 @@ package body Sem_Util is
             --  that the pragma may not encapsulated by the type definition,
             --  but this is still a valid context.
 
-            elsif Nam_In (Prag_Nam, Name_Depends, Name_Global)
+            elsif Prag_Nam in Name_Depends | Name_Global
               and then Is_Single_Task_Pragma (Par, Conc_Obj)
             then
                return;
@@ -3820,8 +3818,8 @@ package body Sem_Util is
          --  The reference appears somewhere in the definition of a single
          --  concurrent type (SPARK RM 9(3)).
 
-         elsif Nkind_In (Par, N_Single_Protected_Declaration,
-                              N_Single_Task_Declaration)
+         elsif Nkind (Par) in
+                 N_Single_Protected_Declaration | N_Single_Task_Declaration
            and then Defining_Entity (Par) = Conc_Obj
          then
             return;
@@ -3829,10 +3827,10 @@ package body Sem_Util is
          --  The reference appears within the declaration or body of a single
          --  concurrent type (SPARK RM 9(3)).
 
-         elsif Nkind_In (Par, N_Protected_Body,
-                              N_Protected_Type_Declaration,
-                              N_Task_Body,
-                              N_Task_Type_Declaration)
+         elsif Nkind (Par) in N_Protected_Body
+                            | N_Protected_Type_Declaration
+                            | N_Task_Body
+                            | N_Task_Type_Declaration
            and then Is_Single_Declaration_Or_Body (Par, Conc_Obj)
          then
             return;
@@ -3851,10 +3849,10 @@ package body Sem_Util is
          --  real check was already performed in the original context of the
          --  reference.
 
-         elsif Nkind_In (Par, N_Package_Body,
-                              N_Package_Declaration,
-                              N_Subprogram_Body,
-                              N_Subprogram_Declaration)
+         elsif Nkind (Par) in N_Package_Body
+                            | N_Package_Declaration
+                            | N_Subprogram_Body
+                            | N_Subprogram_Declaration
            and then Is_Internal_Declaration_Or_Body (Par)
          then
             return;
@@ -4064,10 +4062,10 @@ package body Sem_Util is
                --  Empty list (no global items) or single global item
                --  declaration (only input items).
 
-               if Nkind_In (List, N_Null,
-                                  N_Expanded_Name,
-                                  N_Identifier,
-                                  N_Selected_Component)
+               if Nkind (List) in N_Null
+                                | N_Expanded_Name
+                                | N_Identifier
+                                | N_Selected_Component
                then
                   return False;
 
@@ -4118,7 +4116,7 @@ package body Sem_Util is
 
                Param := First_Formal (Subp);
                while Present (Param) loop
-                  if Ekind_In (Param, E_Out_Parameter, E_In_Out_Parameter) then
+                  if Ekind (Param) in E_Out_Parameter | E_In_Out_Parameter then
                      return False;
                   end if;
 
@@ -4183,7 +4181,7 @@ package body Sem_Util is
 
          procedure Check_Conjuncts (Expr : Node_Id) is
          begin
-            if Nkind_In (Expr, N_Op_And, N_And_Then) then
+            if Nkind (Expr) in N_Op_And | N_And_Then then
                Check_Conjuncts (Left_Opnd (Expr));
                Check_Conjuncts (Right_Opnd (Expr));
             else
@@ -4265,11 +4263,11 @@ package body Sem_Util is
                Ent : Entity_Id;
 
             begin
-               if Nkind_In (N, N_Explicit_Dereference, N_Function_Call) then
+               if Nkind (N) in N_Explicit_Dereference | N_Function_Call then
                   Post_State_Seen := True;
                   return Abandon;
 
-               elsif Nkind_In (N, N_Expanded_Name, N_Identifier) then
+               elsif Nkind (N) in N_Expanded_Name | N_Identifier then
                   Ent := Entity (N);
 
                   --  Treat an undecorated reference as OK
@@ -4279,10 +4277,10 @@ package body Sem_Util is
                     --  A reference to an assignable entity is considered a
                     --  change in the post-state of a subprogram.
 
-                    or else Ekind_In (Ent, E_Generic_In_Out_Parameter,
-                                           E_In_Out_Parameter,
-                                           E_Out_Parameter,
-                                           E_Variable)
+                    or else Ekind (Ent) in E_Generic_In_Out_Parameter
+                                         | E_In_Out_Parameter
+                                         | E_Out_Parameter
+                                         | E_Variable
 
                     --  The reference may be modified through a dereference
 
@@ -4340,8 +4338,7 @@ package body Sem_Util is
 
          --  Examine the expression of a postcondition
 
-         else pragma Assert (Nam_In (Nam, Name_Postcondition,
-                                          Name_Refined_Post));
+         else pragma Assert (Nam in Name_Postcondition | Name_Refined_Post);
             Check_Expression (Expr);
          end if;
       end Check_Result_And_Post_State_In_Pragma;
@@ -4415,8 +4412,8 @@ package body Sem_Util is
 
       Prag := Pre_Post_Conditions (Items);
       while Present (Prag) loop
-         if Nam_In (Pragma_Name_Unmapped (Prag),
-                    Name_Postcondition, Name_Refined_Post)
+         if Pragma_Name_Unmapped (Prag)
+              in Name_Postcondition | Name_Refined_Post
            and then not Error_Posted (Prag)
          then
             Post_Prag := Prag;
@@ -4443,7 +4440,7 @@ package body Sem_Util is
 
       --  Do not emit any errors if the subprogram is not a function
 
-      if not Ekind_In (Spec_Id, E_Function, E_Generic_Function) then
+      if Ekind (Spec_Id) not in E_Function | E_Generic_Function then
          null;
 
       --  Regardless of whether the function has postconditions or contract
@@ -4576,8 +4573,8 @@ package body Sem_Util is
          if Present (Decls) then
             Decl := First (Decls);
             while Present (Decl) loop
-               if Nkind_In (Decl, N_Generic_Package_Declaration,
-                                  N_Package_Declaration)
+               if Nkind (Decl) in N_Generic_Package_Declaration
+                                | N_Package_Declaration
                then
                   Check_Package (Decl);
                end if;
@@ -4620,10 +4617,10 @@ package body Sem_Util is
       --  An entry, protected, subprogram, or task body may declare a nested
       --  package.
 
-      elsif Nkind_In (Context, N_Entry_Body,
-                               N_Protected_Body,
-                               N_Subprogram_Body,
-                               N_Task_Body)
+      elsif Nkind (Context) in N_Entry_Body
+                             | N_Protected_Body
+                             | N_Subprogram_Body
+                             | N_Task_Body
       then
          --  Do not verify proper state refinement when the body is subject to
          --  pragma SPARK_Mode Off because this disables the requirement for
@@ -4648,8 +4645,8 @@ package body Sem_Util is
 
       --  A library level [generic] package may declare a nested package
 
-      elsif Nkind_In (Context, N_Generic_Package_Declaration,
-                               N_Package_Declaration)
+      elsif Nkind (Context) in
+              N_Generic_Package_Declaration | N_Package_Declaration
         and then Is_Main_Unit
       then
          Check_Package (Context);
@@ -4702,7 +4699,7 @@ package body Sem_Util is
 
          --  For indexed and selected components, recursively check the prefix
 
-         if Nkind_In (Obj, N_Indexed_Component, N_Selected_Component) then
+         if Nkind (Obj) in N_Indexed_Component | N_Selected_Component then
             return Enclosing_Protected_Type (Prefix (Obj));
 
          --  The object does not denote a protected component
@@ -4806,9 +4803,8 @@ package body Sem_Util is
                Constit_Id := Entity_Of (Constit);
 
                if Present (Constit_Id)
-                 and then Ekind_In (Constit_Id, E_Abstract_State,
-                                                E_Constant,
-                                                E_Variable)
+                 and then Ekind (Constit_Id) in
+                            E_Abstract_State | E_Constant | E_Variable
                then
                   Remove (States, Constit_Id);
                end if;
@@ -5080,7 +5076,7 @@ package body Sem_Util is
             elsif Ekind (Item_Id) = E_Abstract_State then
                Append_New_Elmt (Item_Id, States);
 
-            elsif Ekind_In (Item_Id, E_Constant, E_Variable)
+            elsif Ekind (Item_Id) in E_Constant | E_Variable
               and then Is_Visible_Object (Item_Id)
             then
                Append_New_Elmt (Item_Id, States);
@@ -6670,7 +6666,7 @@ package body Sem_Util is
    function Denotes_Same_Prefix (A1, A2 : Node_Id) return Boolean is
    begin
       if Is_Entity_Name (A1) then
-         if Nkind_In (A2, N_Selected_Component, N_Indexed_Component)
+         if Nkind (A2) in N_Selected_Component | N_Indexed_Component
            and then not Is_Access_Type (Etype (A1))
          then
             return Denotes_Same_Object (A1, Prefix (A2))
@@ -6682,9 +6678,9 @@ package body Sem_Util is
       elsif Is_Entity_Name (A2) then
          return Denotes_Same_Prefix (A1 => A2, A2 => A1);
 
-      elsif Nkind_In (A1, N_Selected_Component, N_Indexed_Component, N_Slice)
+      elsif Nkind (A1) in N_Selected_Component | N_Indexed_Component | N_Slice
               and then
-            Nkind_In (A2, N_Selected_Component, N_Indexed_Component, N_Slice)
+            Nkind (A2) in N_Selected_Component | N_Indexed_Component | N_Slice
       then
          declare
             Root1, Root2   : Node_Id;
@@ -6693,8 +6689,8 @@ package body Sem_Util is
          begin
             Root1 := Prefix (A1);
             while not Is_Entity_Name (Root1) loop
-               if not Nkind_In
-                 (Root1, N_Selected_Component, N_Indexed_Component)
+               if Nkind (Root1) not in
+                    N_Selected_Component | N_Indexed_Component
                then
                   return False;
                else
@@ -6706,8 +6702,8 @@ package body Sem_Util is
 
             Root2 := Prefix (A2);
             while not Is_Entity_Name (Root2) loop
-               if not Nkind_In (Root2, N_Selected_Component,
-                                       N_Indexed_Component)
+               if Nkind (Root2) not in
+                    N_Selected_Component | N_Indexed_Component
                then
                   return False;
                else
@@ -6817,19 +6813,19 @@ package body Sem_Util is
    --  Start of processing for Designate_Same_Unit
 
    begin
-      if Nkind_In (K1, N_Identifier, N_Defining_Identifier)
+      if K1 in N_Identifier | N_Defining_Identifier
            and then
-         Nkind_In (K2, N_Identifier, N_Defining_Identifier)
+         K2 in N_Identifier | N_Defining_Identifier
       then
          return Chars (Name1) = Chars (Name2);
 
-      elsif Nkind_In (K1, N_Expanded_Name,
-                          N_Selected_Component,
-                          N_Defining_Program_Unit_Name)
-              and then
-            Nkind_In (K2, N_Expanded_Name,
-                          N_Selected_Component,
-                          N_Defining_Program_Unit_Name)
+      elsif K1 in N_Expanded_Name
+                | N_Selected_Component
+                | N_Defining_Program_Unit_Name
+        and then
+            K2 in N_Expanded_Name
+                | N_Selected_Component
+                | N_Defining_Program_Unit_Name
       then
          return
            (Chars (Select_Node (Name1)) = Chars (Select_Node (Name2)))
@@ -6925,7 +6921,7 @@ package body Sem_Util is
          end if;
 
          if (Is_Formal (E)
-              or else Ekind_In (E, E_Variable, E_Constant))
+              or else Ekind (E) in E_Variable | E_Constant)
            and then Present (Get_Accessibility (E))
          then
             return New_Occurrence_Of (Get_Accessibility (E), Loc);
@@ -6935,7 +6931,7 @@ package body Sem_Util is
       --  Handle a constant-folded conditional expression by avoiding use of
       --  the original node.
 
-      if Nkind_In (Expr, N_Case_Expression, N_If_Expression) then
+      if Nkind (Expr) in N_Case_Expression | N_If_Expression then
          Expr := N;
       end if;
 
@@ -7254,13 +7250,13 @@ package body Sem_Util is
    begin
       Par := Parent (N);
       while Present (Par) loop
-         if Nkind_In (Par, N_Package_Body, N_Subprogram_Body) then
+         if Nkind (Par) in N_Package_Body | N_Subprogram_Body then
             Spec_Id := Corresponding_Spec (Par);
 
             if Present (Spec_Id)
-              and then Nkind_In (Unit_Declaration_Node (Spec_Id),
-                                 N_Generic_Package_Declaration,
-                                 N_Generic_Subprogram_Declaration)
+              and then Nkind (Unit_Declaration_Node (Spec_Id)) in
+                         N_Generic_Package_Declaration |
+                         N_Generic_Subprogram_Declaration
             then
                return Par;
             end if;
@@ -7284,19 +7280,19 @@ package body Sem_Util is
    begin
       Par := Parent (N);
       while Present (Par) loop
-         if Nkind_In (Par, N_Generic_Package_Declaration,
-                           N_Generic_Subprogram_Declaration)
+         if Nkind (Par) in N_Generic_Package_Declaration
+                         | N_Generic_Subprogram_Declaration
          then
             return Par;
 
-         elsif Nkind_In (Par, N_Package_Body, N_Subprogram_Body) then
+         elsif Nkind (Par) in N_Package_Body | N_Subprogram_Body then
             Spec_Id := Corresponding_Spec (Par);
 
             if Present (Spec_Id) then
                Spec_Decl := Unit_Declaration_Node (Spec_Id);
 
-               if Nkind_In (Spec_Decl, N_Generic_Package_Declaration,
-                                       N_Generic_Subprogram_Declaration)
+               if Nkind (Spec_Decl) in N_Generic_Package_Declaration
+                                     | N_Generic_Subprogram_Declaration
                then
                   return Spec_Decl;
                end if;
@@ -7366,9 +7362,8 @@ package body Sem_Util is
       elsif Dynamic_Scope = Empty then
          return Empty;
 
-      elsif Ekind_In (Dynamic_Scope, E_Generic_Package,
-                                     E_Package,
-                                     E_Package_Body)
+      elsif Ekind (Dynamic_Scope) in
+              E_Generic_Package | E_Package | E_Package_Body
       then
          return Dynamic_Scope;
 
@@ -7417,10 +7412,10 @@ package body Sem_Util is
       elsif Ekind (Dyn_Scop) = E_Subprogram_Body then
          return Corresponding_Spec (Parent (Parent (Dyn_Scop)));
 
-      elsif Ekind_In (Dyn_Scop, E_Block, E_Loop, E_Return_Statement) then
+      elsif Ekind (Dyn_Scop) in E_Block | E_Loop | E_Return_Statement then
          return Enclosing_Subprogram (Dyn_Scop);
 
-      elsif Ekind_In (Dyn_Scop, E_Entry, E_Entry_Family) then
+      elsif Ekind (Dyn_Scop) in E_Entry | E_Entry_Family then
 
          --  For a task entry or entry family, return the enclosing subprogram
          --  of the task itself.
@@ -7442,10 +7437,10 @@ package body Sem_Util is
       --  The scope may appear as a private type or as a private extension
       --  whose completion is a task or protected type.
 
-      elsif Ekind_In (Dyn_Scop, E_Limited_Private_Type,
-                                E_Record_Type_With_Private)
+      elsif Ekind (Dyn_Scop) in
+              E_Limited_Private_Type | E_Record_Type_With_Private
         and then Present (Full_View (Dyn_Scop))
-        and then Ekind_In (Full_View (Dyn_Scop), E_Task_Type, E_Protected_Type)
+        and then Ekind (Full_View (Dyn_Scop)) in E_Task_Type | E_Protected_Type
       then
          return Get_Task_Body_Procedure (Full_View (Dyn_Scop));
 
@@ -7503,11 +7498,11 @@ package body Sem_Util is
    --  Start of processing for End_Keyword_Location
 
    begin
-      if Nkind_In (N, N_Block_Statement,
-                      N_Entry_Body,
-                      N_Package_Body,
-                      N_Subprogram_Body,
-                      N_Task_Body)
+      if Nkind (N) in N_Block_Statement
+                    | N_Entry_Body
+                    | N_Package_Body
+                    | N_Subprogram_Body
+                    | N_Task_Body
       then
          Owner := Handled_Statement_Sequence (N);
 
@@ -7517,13 +7512,12 @@ package body Sem_Util is
       elsif Nkind (N) = N_Protected_Body then
          Owner := N;
 
-      elsif Nkind_In (N, N_Protected_Type_Declaration,
-                         N_Single_Protected_Declaration)
+      elsif Nkind (N) in N_Protected_Type_Declaration
+                       | N_Single_Protected_Declaration
       then
          Owner := Protected_Definition (N);
 
-      elsif Nkind_In (N, N_Single_Task_Declaration,
-                         N_Task_Type_Declaration)
+      elsif Nkind (N) in N_Single_Task_Declaration | N_Task_Type_Declaration
       then
          Owner := Task_Definition (N);
 
@@ -7779,7 +7773,7 @@ package body Sem_Util is
                --  Avoid cascaded messages with duplicate components in
                --  derived types.
 
-               if Ekind_In (E, E_Component, E_Discriminant) then
+               if Ekind (E) in E_Component | E_Discriminant then
                   return;
                end if;
             end if;
@@ -7814,7 +7808,7 @@ package body Sem_Util is
       --  of inheriting components in a derived record definition. Preserve
       --  their Ekind and Etype.
 
-      if Ekind_In (Def_Id, E_Discriminant, E_Component) then
+      if Ekind (Def_Id) in E_Discriminant | E_Component then
          null;
 
       --  If a type is already set, leave it alone (happens when a type
@@ -7837,7 +7831,7 @@ package body Sem_Util is
       --  Unless the Itype is for a record type with a corresponding remote
       --  type (what is that about, it was not commented ???)
 
-      if Ekind_In (Def_Id, E_Discriminant, E_Component)
+      if Ekind (Def_Id) in E_Discriminant | E_Component
         or else
           ((not Is_Record_Type (Def_Id)
              or else No (Corresponding_Remote_Type (Def_Id)))
@@ -8189,8 +8183,7 @@ package body Sem_Util is
 
             elsif Comes_From_Source (Decl)
               or else
-                (Nkind_In (Decl, N_Subprogram_Body,
-                                 N_Subprogram_Declaration)
+                (Nkind (Decl) in N_Subprogram_Body | N_Subprogram_Declaration
                   and then Is_Expression_Function (Defining_Entity (Decl)))
             then
                exit;
@@ -8262,7 +8255,7 @@ package body Sem_Util is
       Call_Nam : Node_Id;
 
    begin
-      if Nkind_In (Context, N_Indexed_Component, N_Selected_Component)
+      if Nkind (Context) in N_Indexed_Component | N_Selected_Component
         and then N = Prefix (Context)
       then
          Find_Actual (Context, Formal, Call);
@@ -8273,9 +8266,9 @@ package body Sem_Util is
       then
          Call := Parent (Context);
 
-      elsif Nkind_In (Context, N_Entry_Call_Statement,
-                               N_Function_Call,
-                               N_Procedure_Call_Statement)
+      elsif Nkind (Context) in N_Entry_Call_Statement
+                             | N_Function_Call
+                             | N_Procedure_Call_Statement
       then
          Call := Context;
 
@@ -8289,9 +8282,9 @@ package body Sem_Util is
       --  we exclude overloaded calls, since we don't know enough to be sure
       --  of giving the right answer in this case.
 
-      if Nkind_In (Call, N_Entry_Call_Statement,
-                         N_Function_Call,
-                         N_Procedure_Call_Statement)
+      if Nkind (Call) in N_Entry_Call_Statement
+                       | N_Function_Call
+                       | N_Procedure_Call_Statement
       then
          Call_Nam := Name (Call);
 
@@ -8717,8 +8710,7 @@ package body Sem_Util is
 
             --  Check for components
 
-            elsif
-              Nkind_In (Expr, N_Selected_Component, N_Indexed_Component)
+            elsif Nkind (Expr) in N_Selected_Component | N_Indexed_Component
             then
                Expr := Prefix (Expr);
                Off := True;
@@ -9069,7 +9061,7 @@ package body Sem_Util is
 
          --  Single global item declaration (only input items)
 
-         elsif Nkind_In (List, N_Expanded_Name, N_Identifier) then
+         elsif Nkind (List) in N_Expanded_Name | N_Identifier then
             if Global_Mode = Name_Input then
                return List;
             else
@@ -9123,10 +9115,10 @@ package body Sem_Util is
    --  Start of processing for First_Global
 
    begin
-      pragma Assert (Nam_In (Global_Mode, Name_In_Out,
-                                          Name_Input,
-                                          Name_Output,
-                                          Name_Proof_In));
+      pragma Assert (Global_Mode in Name_In_Out
+                                  | Name_Input
+                                  | Name_Output
+                                  | Name_Proof_In);
 
       --  Retrieve the suitable pragma Global or Refined_Global. In the second
       --  case, it can only be located on the body entity.
@@ -9175,7 +9167,7 @@ package body Sem_Util is
 
    function Fix_Msg (Id : Entity_Id; Msg : String) return String is
       Is_Task   : constant Boolean :=
-                    Ekind_In (Id, E_Task_Body, E_Task_Type)
+                    Ekind (Id) in E_Task_Body | E_Task_Type
                       or else Is_Single_Task_Object (Id);
       Msg_Last  : constant Natural := Msg'Last;
       Msg_Index : Natural;
@@ -10218,12 +10210,12 @@ package body Sem_Util is
       pragma Assert
         (Is_Type (Typ)
          and then
-         Nam_In (Nam, Name_Element,
-                      Name_First,
-                      Name_Has_Element,
-                      Name_Last,
-                      Name_Next,
-                      Name_Previous));
+           Nam in Name_Element
+                | Name_First
+                | Name_Has_Element
+                | Name_Last
+                | Name_Next
+                | Name_Previous);
 
       Funcs : constant Node_Id := Find_Value_Of_Aspect (Typ, Aspect_Iterable);
       Assoc : Node_Id;
@@ -10526,14 +10518,14 @@ package body Sem_Util is
       --  Strip the subprogram call
 
       loop
-         if Nkind_In (Subp, N_Explicit_Dereference,
-                            N_Indexed_Component,
-                            N_Selected_Component)
+         if Nkind (Subp) in N_Explicit_Dereference
+                          | N_Indexed_Component
+                          | N_Selected_Component
          then
             Subp := Prefix (Subp);
 
-         elsif Nkind_In (Subp, N_Type_Conversion,
-                               N_Unchecked_Type_Conversion)
+         elsif Nkind (Subp) in N_Type_Conversion
+                             | N_Unchecked_Type_Conversion
          then
             Subp := Expression (Subp);
 
@@ -10667,14 +10659,14 @@ package body Sem_Util is
             UFull_Typ := Underlying_Full_View (Full_Typ);
 
             if Present (UFull_Typ)
-              and then Ekind_In (UFull_Typ, E_Protected_Type, E_Task_Type)
+              and then Ekind (UFull_Typ) in E_Protected_Type | E_Task_Type
             then
                CRec_Typ := Corresponding_Record_Type (UFull_Typ);
             end if;
 
          else
             if Present (Full_Typ)
-              and then Ekind_In (Full_Typ, E_Protected_Type, E_Task_Type)
+              and then Ekind (Full_Typ) in E_Protected_Type | E_Task_Type
             then
                CRec_Typ := Corresponding_Record_Type (Full_Typ);
             end if;
@@ -11069,15 +11061,15 @@ package body Sem_Util is
 
    function Has_Declarations (N : Node_Id) return Boolean is
    begin
-      return Nkind_In (Nkind (N), N_Accept_Statement,
-                                  N_Block_Statement,
-                                  N_Compilation_Unit_Aux,
-                                  N_Entry_Body,
-                                  N_Package_Body,
-                                  N_Protected_Body,
-                                  N_Subprogram_Body,
-                                  N_Task_Body,
-                                  N_Package_Specification);
+      return Nkind (N) in N_Accept_Statement
+                        | N_Block_Statement
+                        | N_Compilation_Unit_Aux
+                        | N_Entry_Body
+                        | N_Package_Body
+                        | N_Protected_Body
+                        | N_Subprogram_Body
+                        | N_Task_Body
+                        | N_Package_Specification;
    end Has_Declarations;
 
    ---------------------------------
@@ -11179,7 +11171,7 @@ package body Sem_Util is
 
       --  Inspect the return type of functions
 
-      if Ekind_In (Subp_Id, E_Function, E_Generic_Function)
+      if Ekind (Subp_Id) in E_Function | E_Generic_Function
         and then Is_Effectively_Volatile (Etype (Subp_Id))
       then
          return True;
@@ -11406,7 +11398,7 @@ package body Sem_Util is
          --  Synchronous (SPARK RM 7.1.4(9)).
 
          elsif Has_Synchronous then
-            return Nam_In (Property, Name_Async_Readers, Name_Async_Writers);
+            return Property in Name_Async_Readers | Name_Async_Writers;
          end if;
 
          return False;
@@ -11828,12 +11820,10 @@ package body Sem_Util is
 
       elsif Nkind (N) in N_Has_Entity then
          return Present (Entity (N))
-           and then Ekind_In (Entity (N), E_Variable,
-                                          E_Constant,
-                                          E_Enumeration_Literal,
-                                          E_In_Parameter,
-                                          E_Out_Parameter,
-                                          E_In_Out_Parameter)
+           and then
+             Ekind (Entity (N)) in
+               E_Variable     | E_Constant      | E_Enumeration_Literal |
+               E_In_Parameter | E_Out_Parameter | E_In_Out_Parameter
            and then not Is_Volatile (Entity (N));
 
       else
@@ -11872,7 +11862,7 @@ package body Sem_Util is
          Node := First (L);
 
          loop
-            if not Nkind_In (Node, N_Null_Statement, N_Call_Marker) then
+            if Nkind (Node) not in N_Null_Statement | N_Call_Marker then
                return True;
             end if;
 
@@ -12420,14 +12410,10 @@ package body Sem_Util is
 
    function Has_Prefix (N : Node_Id) return Boolean is
    begin
-      return
-        Nkind_In (N, N_Attribute_Reference,
-                     N_Expanded_Name,
-                     N_Explicit_Dereference,
-                     N_Indexed_Component,
-                     N_Reference,
-                     N_Selected_Component,
-                     N_Slice);
+      return Nkind (N) in
+        N_Attribute_Reference | N_Expanded_Name | N_Explicit_Dereference |
+        N_Indexed_Component   | N_Reference     | N_Selected_Component   |
+        N_Slice;
    end Has_Prefix;
 
    ---------------------------
@@ -12510,11 +12496,9 @@ package body Sem_Util is
 
       function Denotes_Relaxed_Parameter
         (Expr  : Node_Id;
-         Param : Entity_Id)
-         return Boolean
-      is
+         Param : Entity_Id) return Boolean is
       begin
-         if Nkind_In (Expr, N_Identifier, N_Expanded_Name) then
+         if Nkind (Expr) in N_Identifier | N_Expanded_Name then
             return Entity (Expr) = Param;
          else
             pragma Assert (Is_Attribute_Result (Expr));
@@ -12805,13 +12789,9 @@ package body Sem_Util is
 
    begin
       pragma Assert (Relaxed_RM_Semantics);
-      pragma Assert (Nkind_In (N, N_Null,
-                                  N_Op_Eq,
-                                  N_Op_Ge,
-                                  N_Op_Gt,
-                                  N_Op_Le,
-                                  N_Op_Lt,
-                                  N_Op_Ne));
+      pragma Assert
+        (Nkind (N) in
+           N_Null | N_Op_Eq | N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt | N_Op_Ne);
 
       if Nkind (N) = N_Null then
          Rewrite (N, New_Occurrence_Of (RTE (RE_Null_Address), Sloc (N)));
@@ -13159,7 +13139,7 @@ package body Sem_Util is
    begin
       S := Current_Scope;
       while Present (S) and then S /= Standard_Standard loop
-         if Ekind_In (S, E_Function, E_Procedure)
+         if Ekind (S) in E_Function | E_Procedure
            and then Is_Generic_Instance (S)
          then
             return True;
@@ -13187,7 +13167,7 @@ package body Sem_Util is
    begin
       S := Current_Scope;
       while Present (S) and then S /= Standard_Standard loop
-         if Ekind_In (S, E_Function, E_Procedure)
+         if Ekind (S) in E_Function | E_Procedure
            and then Is_Generic_Instance (S)
          then
             return True;
@@ -13391,15 +13371,15 @@ package body Sem_Util is
          if Nod = Cont then
             return True;
 
-         elsif Nkind_In (Nod, N_Accept_Statement,
-                              N_Block_Statement,
-                              N_Compilation_Unit,
-                              N_Entry_Body,
-                              N_Package_Body,
-                              N_Package_Declaration,
-                              N_Protected_Body,
-                              N_Subprogram_Body,
-                              N_Task_Body)
+         elsif Nkind (Nod) in N_Accept_Statement
+                            | N_Block_Statement
+                            | N_Compilation_Unit
+                            | N_Entry_Body
+                            | N_Package_Body
+                            | N_Package_Declaration
+                            | N_Protected_Body
+                            | N_Subprogram_Body
+                            | N_Task_Body
          then
             return False;
 
@@ -13564,9 +13544,9 @@ package body Sem_Util is
             --  declaration hold the partial view and the full view is an
             --  itype.
 
-            elsif Nkind_In (Decl, N_Full_Type_Declaration,
-                                  N_Private_Extension_Declaration,
-                                  N_Private_Type_Declaration)
+            elsif Nkind (Decl) in N_Full_Type_Declaration
+                                | N_Private_Extension_Declaration
+                                | N_Private_Type_Declaration
             then
                Match := Defining_Identifier (Decl);
             end if;
@@ -13983,13 +13963,12 @@ package body Sem_Util is
          --  For a retrieval of a subcomponent of some composite object,
          --  retrieve the ultimate entity if there is one.
 
-         elsif Nkind_In (New_Prefix, N_Selected_Component,
-                                     N_Indexed_Component)
+         elsif Nkind (New_Prefix) in N_Selected_Component | N_Indexed_Component
          then
             Pref := Prefix (New_Prefix);
             while Present (Pref)
-              and then Nkind_In (Pref, N_Selected_Component,
-                                       N_Indexed_Component)
+              and then Nkind (Pref) in
+                         N_Selected_Component | N_Indexed_Component
             loop
                Pref := Prefix (Pref);
             end loop;
@@ -14276,9 +14255,9 @@ package body Sem_Util is
 
       Par := Parent (N);
       while Present (Par)
-        and then Nkind_In (Par, N_Case_Expression,
-                                N_If_Expression,
-                                N_Parameter_Association)
+        and then Nkind (Par) in N_Case_Expression
+                              | N_If_Expression
+                              | N_Parameter_Association
       loop
          Par := Parent (Par);
       end loop;
@@ -14382,7 +14361,7 @@ package body Sem_Util is
                and then Has_Aliased_Components
                           (Designated_Type (Etype (Prefix (Obj)))));
 
-      elsif Nkind_In (Obj, N_Unchecked_Type_Conversion, N_Type_Conversion) then
+      elsif Nkind (Obj) in N_Unchecked_Type_Conversion | N_Type_Conversion then
          return Is_Tagged_Type (Etype (Obj))
            and then Is_Aliased_View (Expression (Obj));
 
@@ -14585,21 +14564,17 @@ package body Sem_Util is
       Context_Id : Entity_Id) return Boolean
    is
    begin
-      pragma Assert (Ekind_In (Ref_Id, E_Protected_Type, E_Task_Type));
+      pragma Assert (Ekind (Ref_Id) in E_Protected_Type | E_Task_Type);
 
       if Is_Single_Task_Object (Context_Id) then
          return Scope_Within_Or_Same (Etype (Context_Id), Ref_Id);
 
       else
-         pragma Assert (Ekind_In (Context_Id, E_Entry,
-                                              E_Entry_Family,
-                                              E_Function,
-                                              E_Package,
-                                              E_Procedure,
-                                              E_Protected_Type,
-                                              E_Task_Type)
-                          or else
-                        Is_Record_Type (Context_Id));
+         pragma Assert
+           (Ekind (Context_Id) in
+              E_Entry     | E_Entry_Family   | E_Function  | E_Package |
+              E_Procedure | E_Protected_Type | E_Task_Type
+             or else Is_Record_Type (Context_Id));
          return Scope_Within_Or_Same (Context_Id, Ref_Id);
       end if;
    end Is_CCT_Instance;
@@ -14913,10 +14888,10 @@ package body Sem_Util is
                elsif Nkind (Parent (Par)) = N_Object_Renaming_Declaration then
                   return False;
 
-               elsif Nkind_In
-                 (Nkind (Parent (Par)), N_Function_Call,
-                                        N_Procedure_Call_Statement,
-                                        N_Entry_Call_Statement)
+               elsif Nkind (Parent (Par)) in
+                       N_Function_Call            |
+                       N_Procedure_Call_Statement |
+                       N_Entry_Call_Statement
                then
                   --  Check that the element is not part of an actual for an
                   --  in-out parameter.
@@ -15076,9 +15051,9 @@ package body Sem_Util is
 
          P := Parent (N);
          while Present (P) loop
-            if Nkind_In (P, N_Full_Type_Declaration,
-                            N_Private_Type_Declaration,
-                            N_Subtype_Declaration)
+            if Nkind (P) in N_Full_Type_Declaration
+                          | N_Private_Type_Declaration
+                          | N_Subtype_Declaration
               and then Comes_From_Source (P)
               and then Defining_Entity (P) = Typ
             then
@@ -15129,7 +15104,7 @@ package body Sem_Util is
       if Is_Entity_Name (N) then
          return Present (Entity (N))
            and then Ekind (Entity (N)) = E_In_Parameter
-           and then Ekind_In (Scope (Entity (N)), E_Function, E_Procedure)
+           and then Ekind (Scope (Entity (N))) in E_Function | E_Procedure
            and then
              (Is_Predicate_Function (Scope (Entity (N)))
                or else Is_Predicate_Function_M (Scope (Entity (N)))
@@ -15306,9 +15281,8 @@ package body Sem_Util is
    begin
       --  Find the dereference node if any
 
-      while Nkind_In (Deref, N_Indexed_Component,
-                             N_Selected_Component,
-                             N_Slice)
+      while Nkind (Deref) in
+              N_Indexed_Component | N_Selected_Component | N_Slice
       loop
          Deref := Prefix (Deref);
       end loop;
@@ -15344,8 +15318,8 @@ package body Sem_Util is
             --  False (it could be a function selector in a prefix form call
             --  occurring in an iterator specification).
 
-            if not Ekind_In (Entity (Selector_Name (Object)), E_Component,
-                                                              E_Discriminant)
+            if Ekind (Entity (Selector_Name (Object))) not in
+                 E_Component | E_Discriminant
             then
                return False;
             end if;
@@ -15511,10 +15485,10 @@ package body Sem_Util is
    function Is_Dereferenced (N : Node_Id) return Boolean is
       P : constant Node_Id := Parent (N);
    begin
-      return Nkind_In (P, N_Selected_Component,
-                          N_Explicit_Dereference,
-                          N_Indexed_Component,
-                          N_Slice)
+      return Nkind (P) in N_Selected_Component
+                        | N_Explicit_Dereference
+                        | N_Indexed_Component
+                        | N_Slice
         and then Prefix (P) = N;
    end Is_Dereferenced;
 
@@ -15707,7 +15681,7 @@ package body Sem_Util is
          return Is_Object (Entity (N))
            and then Is_Effectively_Volatile (Entity (N));
 
-      elsif Nkind_In (N, N_Indexed_Component, N_Slice) then
+      elsif Nkind (N) in N_Indexed_Component | N_Slice then
          return Is_Effectively_Volatile_Object (Prefix (N));
 
       elsif Nkind (N) = N_Selected_Component then
@@ -15716,9 +15690,9 @@ package body Sem_Util is
              or else
            Is_Effectively_Volatile_Object (Selector_Name (N));
 
-      elsif Nkind_In (N, N_Qualified_Expression,
-                         N_Unchecked_Type_Conversion,
-                         N_Type_Conversion)
+      elsif Nkind (N) in N_Qualified_Expression
+                       | N_Unchecked_Type_Conversion
+                       | N_Type_Conversion
       then
          return Is_Effectively_Volatile_Object (Expression (N));
 
@@ -15769,7 +15743,7 @@ package body Sem_Util is
 
    function Is_Expression_Function (Subp : Entity_Id) return Boolean is
    begin
-      if Ekind_In (Subp, E_Function, E_Subprogram_Body) then
+      if Ekind (Subp) in E_Function | E_Subprogram_Body then
          return
            Nkind (Original_Node (Unit_Declaration_Node (Subp))) =
              N_Expression_Function;
@@ -15864,9 +15838,9 @@ package body Sem_Util is
       --  A qualified expression or a type conversion is an EVF expression when
       --  its operand is an EVF expression.
 
-      elsif Nkind_In (N, N_Qualified_Expression,
-                         N_Unchecked_Type_Conversion,
-                         N_Type_Conversion)
+      elsif Nkind (N) in N_Qualified_Expression
+                       | N_Unchecked_Type_Conversion
+                       | N_Type_Conversion
       then
          return Is_EVF_Expression (Expression (N));
 
@@ -15874,9 +15848,9 @@ package body Sem_Util is
       --  their prefix denotes an EVF expression.
 
       elsif Nkind (N) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (N), Name_Loop_Entry,
-                                             Name_Old,
-                                             Name_Update)
+        and then Attribute_Name (N) in Name_Loop_Entry
+                                     | Name_Old
+                                     | Name_Update
       then
          return Is_EVF_Expression (Prefix (N));
       end if;
@@ -16202,14 +16176,14 @@ package body Sem_Util is
    begin
       --  Package/subprogram body
 
-      if Nkind_In (Decl, N_Package_Body, N_Subprogram_Body)
+      if Nkind (Decl) in N_Package_Body | N_Subprogram_Body
         and then Present (Corresponding_Spec (Decl))
       then
          Spec_Decl := Unit_Declaration_Node (Corresponding_Spec (Decl));
 
       --  Package/subprogram body stub
 
-      elsif Nkind_In (Decl, N_Package_Body_Stub, N_Subprogram_Body_Stub)
+      elsif Nkind (Decl) in N_Package_Body_Stub | N_Subprogram_Body_Stub
         and then Present (Corresponding_Spec_Of_Stub (Decl))
       then
          Spec_Decl :=
@@ -16227,8 +16201,8 @@ package body Sem_Util is
       --  calls.
 
       return
-        Nkind_In (Spec_Decl, N_Generic_Package_Declaration,
-                             N_Generic_Subprogram_Declaration);
+        Nkind (Spec_Decl) in N_Generic_Package_Declaration
+                           | N_Generic_Subprogram_Declaration;
    end Is_Generic_Declaration_Or_Body;
 
    ---------------------------
@@ -16387,8 +16361,7 @@ package body Sem_Util is
          --  a predefined unit, i.e the one that declares iterator interfaces.
 
          return
-           Nam_In (Chars (Iter_Typ), Name_Forward_Iterator,
-                                     Name_Reversible_Iterator)
+           Chars (Iter_Typ) in Name_Forward_Iterator | Name_Reversible_Iterator
              and then In_Predefined_Unit (Root_Type (Iter_Typ));
       end Denotes_Iterator;
 
@@ -16464,7 +16437,7 @@ package body Sem_Util is
 
       --  Case of prefix of indexed or selected component or slice
 
-      elsif Nkind_In (P, N_Indexed_Component, N_Selected_Component, N_Slice)
+      elsif Nkind (P) in N_Indexed_Component | N_Selected_Component | N_Slice
         and then N = Prefix (P)
       then
          --  Here we have the case where the parent P is N.Q or N(Q .. R).
@@ -16542,7 +16515,7 @@ package body Sem_Util is
             Ent : constant Entity_Id := Entity (Expr);
             Sub : constant Entity_Id := Enclosing_Subprogram (Ent);
          begin
-            if not Ekind_In (Ent, E_Variable, E_In_Out_Parameter) then
+            if Ekind (Ent) not in E_Variable | E_In_Out_Parameter then
                return False;
             else
                return Present (Sub) and then Sub = Current_Subprogram;
@@ -16572,8 +16545,7 @@ package body Sem_Util is
          --  Attributes 'Input, 'Old and 'Result produce objects
 
          when N_Attribute_Reference =>
-            return
-              Nam_In (Attribute_Name (N), Name_Input, Name_Old, Name_Result);
+            return Attribute_Name (N) in Name_Input | Name_Old | Name_Result;
 
          when N_Selected_Component =>
             return
@@ -17022,7 +16994,7 @@ package body Sem_Util is
                         if Ekind (Id) = E_Discriminant then
                            null;
 
-                        elsif Ekind_In (Id, E_Constant, E_In_Parameter)
+                        elsif Ekind (Id) in E_Constant | E_In_Parameter
                           and then Present (Discriminal_Link (Id))
                         then
                            null;
@@ -17161,10 +17133,10 @@ package body Sem_Util is
 
             when N_Attribute_Reference =>
                return
-                 Nam_In (Attribute_Name (N), Name_Loop_Entry,
-                                             Name_Old,
-                                             Name_Priority,
-                                             Name_Result)
+                 Attribute_Name (N) in Name_Loop_Entry
+                                     | Name_Old
+                                     | Name_Priority
+                                     | Name_Result
                    or else Is_Function_Attribute_Name (Attribute_Name (N));
 
             when N_Selected_Component =>
@@ -17180,8 +17152,8 @@ package body Sem_Util is
             --  names.
 
             when N_Explicit_Dereference =>
-               return not Nkind_In (Original_Node (N), N_Case_Expression,
-                                                       N_If_Expression);
+               return Nkind (Original_Node (N)) not in
+                        N_Case_Expression | N_If_Expression;
 
             --  A view conversion of a tagged object is an object reference
 
@@ -17280,7 +17252,7 @@ package body Sem_Util is
       --  expansion of a packed array aggregate).
 
       elsif Nkind (AV) = N_Unchecked_Type_Conversion then
-         if Nkind_In (Original_Node (AV), N_Function_Call, N_Aggregate) then
+         if Nkind (Original_Node (AV)) in N_Function_Call | N_Aggregate then
             return False;
 
          elsif Comes_From_Source (AV)
@@ -17376,10 +17348,8 @@ package body Sem_Util is
                 and then Is_Protected_Type (Etype (Pref))
                 and then Is_Entity_Name (Subp)
                 and then Present (Entity (Subp))
-                and then Ekind_In (Entity (Subp), E_Entry,
-                                                  E_Entry_Family,
-                                                  E_Function,
-                                                  E_Procedure);
+                and then Ekind (Entity (Subp)) in
+                           E_Entry | E_Entry_Family | E_Function | E_Procedure;
          else
             return False;
          end if;
@@ -17424,7 +17394,7 @@ package body Sem_Util is
 
          Func_Id := Id;
          while Present (Func_Id) and then Func_Id /= Standard_Standard loop
-            if Ekind_In (Func_Id, E_Function, E_Generic_Function) then
+            if Ekind (Func_Id) in E_Function | E_Generic_Function then
                return Is_Volatile_Function (Func_Id);
             end if;
 
@@ -17504,11 +17474,12 @@ package body Sem_Util is
       --  The volatile object appears as the prefix of a name occurring in a
       --  non-interfering context.
 
-      elsif Nkind_In (Context, N_Attribute_Reference,
-                      N_Explicit_Dereference,
-                      N_Indexed_Component,
-                      N_Selected_Component,
-                      N_Slice)
+      elsif Nkind (Context) in
+              N_Attribute_Reference  |
+              N_Explicit_Dereference |
+              N_Indexed_Component    |
+              N_Selected_Component   |
+              N_Slice
         and then Prefix (Context) = Obj_Ref
         and then Is_OK_Volatile_Context
                    (Context => Parent (Context),
@@ -17522,26 +17493,26 @@ package body Sem_Util is
 
       elsif Nkind (Context) = N_Attribute_Reference
         and then Prefix (Context) = Obj_Ref
-        and then Nam_In (Attribute_Name (Context), Name_Address,
-                                                   Name_Alignment,
-                                                   Name_Component_Size,
-                                                   Name_First,
-                                                   Name_First_Bit,
-                                                   Name_Last,
-                                                   Name_Last_Bit,
-                                                   Name_Length,
-                                                   Name_Position,
-                                                   Name_Size,
-                                                   Name_Storage_Size)
+        and then Attribute_Name (Context) in Name_Address
+                                           | Name_Alignment
+                                           | Name_Component_Size
+                                           | Name_First
+                                           | Name_First_Bit
+                                           | Name_Last
+                                           | Name_Last_Bit
+                                           | Name_Length
+                                           | Name_Position
+                                           | Name_Size
+                                           | Name_Storage_Size
       then
          return True;
 
       --  The volatile object appears as the expression of a type conversion
       --  occurring in a non-interfering context.
 
-      elsif Nkind_In (Context, N_Qualified_Expression,
-                               N_Type_Conversion,
-                               N_Unchecked_Type_Conversion)
+      elsif Nkind (Context) in N_Qualified_Expression
+                             | N_Type_Conversion
+                             | N_Unchecked_Type_Conversion
         and then Expression (Context) = Obj_Ref
         and then Is_OK_Volatile_Context
                    (Context => Parent (Context),
@@ -17857,10 +17828,10 @@ package body Sem_Util is
          elsif Nkind (Par) = N_Case_Expression then
             return Expr /= Expression (Par);
 
-         elsif Nkind_In (Par, N_And_Then, N_Or_Else) then
+         elsif Nkind (Par) in N_And_Then | N_Or_Else then
             return Expr = Right_Opnd (Par);
 
-         elsif Nkind_In (Par, N_In, N_Not_In) then
+         elsif Nkind (Par) in N_In | N_Not_In then
 
             --  If the membership includes several alternatives, only the first
             --  is definitely evaluated.
@@ -18056,7 +18027,7 @@ package body Sem_Util is
            TSS_Name_Type
              (Name_Buffer (Name_Len - TSS_Name'Length + 1 .. Name_Len));
 
-         if Nam_In (Chars (E), Name_uAssign, Name_uSize)
+         if Chars (E) in Name_uAssign | Name_uSize
            or else
              (Chars (E) = Name_Op_Eq
                and then Etype (First_Formal (E)) = Etype (Last_Formal (E)))
@@ -18087,12 +18058,12 @@ package body Sem_Util is
       --  these primitives.
 
       return (Ada_Version >= Ada_2005 or else not Tagged_Type_Expansion)
-        and then Nam_In (Chars (E), Name_uDisp_Asynchronous_Select,
-                                    Name_uDisp_Conditional_Select,
-                                    Name_uDisp_Get_Prim_Op_Kind,
-                                    Name_uDisp_Get_Task_Id,
-                                    Name_uDisp_Requeue,
-                                    Name_uDisp_Timed_Select);
+        and then Chars (E) in Name_uDisp_Asynchronous_Select
+                            | Name_uDisp_Conditional_Select
+                            | Name_uDisp_Get_Prim_Op_Kind
+                            | Name_uDisp_Get_Task_Id
+                            | Name_uDisp_Requeue
+                            | Name_uDisp_Timed_Select;
    end Is_Predefined_Interface_Primitive;
 
    ---------------------------------------
@@ -18120,7 +18091,7 @@ package body Sem_Util is
            TSS_Name_Type
              (Name_Buffer (Name_Len - TSS_Name'Length + 1 .. Name_Len));
 
-         if Nam_In (Chars (E), Name_uSize, Name_uAssign)
+         if Chars (E) in Name_uSize | Name_uAssign
            or else
              (Chars (E) = Name_Op_Eq
                and then Etype (First_Formal (E)) = Etype (Last_Formal (E)))
@@ -18250,7 +18221,7 @@ package body Sem_Util is
    begin
       --  Aggregates
 
-      if Nkind_In (N, N_Aggregate, N_Extension_Aggregate) then
+      if Nkind (N) in N_Aggregate | N_Extension_Aggregate then
          return Is_Preelaborable_Aggregate (N);
 
       --  Attributes are allowed in general, even if their prefix is a formal
@@ -18275,7 +18246,7 @@ package body Sem_Util is
         and then Present (Entity (N))
         and then
           (Ekind (Entity (N)) = E_Discriminant
-            or else (Ekind_In (Entity (N), E_Constant, E_In_Parameter)
+            or else (Ekind (Entity (N)) in E_Constant | E_In_Parameter
                       and then Present (Discriminal_Link (Entity (N)))))
       then
          return True;
@@ -18609,12 +18580,12 @@ package body Sem_Util is
    begin
       if not Is_List_Member (N) then
          declare
-            P : constant Node_Id   := Parent (N);
+            P : constant Node_Id := Parent (N);
          begin
-            return Nkind_In (P, N_Expanded_Name,
-                                N_Generic_Association,
-                                N_Parameter_Association,
-                                N_Selected_Component)
+            return Nkind (P) in N_Expanded_Name
+                              | N_Generic_Association
+                              | N_Parameter_Association
+                              | N_Selected_Component
               and then Selector_Name (P) = N;
          end;
 
@@ -18649,7 +18620,7 @@ package body Sem_Util is
    function Is_Single_Concurrent_Type (Id : Entity_Id) return Boolean is
    begin
       return
-        Ekind_In (Id, E_Protected_Type, E_Task_Type)
+        Ekind (Id) in E_Protected_Type | E_Task_Type
           and then Is_Single_Concurrent_Type_Declaration
                      (Declaration_Node (Id));
    end Is_Single_Concurrent_Type;
@@ -18662,8 +18633,8 @@ package body Sem_Util is
      (N : Node_Id) return Boolean
    is
    begin
-      return Nkind_In (Original_Node (N), N_Single_Protected_Declaration,
-                                          N_Single_Task_Declaration);
+      return Nkind (Original_Node (N)) in
+               N_Single_Protected_Declaration | N_Single_Task_Declaration;
    end Is_Single_Concurrent_Type_Declaration;
 
    ---------------------------------------------
@@ -18735,9 +18706,8 @@ package body Sem_Util is
            and then Is_Aliased (Entity (P_Ult))
            and then Is_Formal  (Entity (P_Ult))
            and then Scope (Entity (P_Ult)) = Scop
-           and then Ekind_In (Scop, E_Function,
-                                    E_Operator,
-                                    E_Subprogram_Type)
+           and then Ekind (Scop) in
+                      E_Function | E_Operator | E_Subprogram_Type
            and then Needs_Result_Accessibility_Level (Scop);
       end;
    end Is_Special_Aliased_Formal_Access;
@@ -18852,7 +18822,7 @@ package body Sem_Util is
    begin
       R := Get_Referenced_Object (N);
 
-      while Nkind_In (R, N_Indexed_Component, N_Selected_Component, N_Slice)
+      while Nkind (R) in N_Indexed_Component | N_Selected_Component | N_Slice
       loop
          R := Get_Referenced_Object (Prefix (R));
 
@@ -19551,7 +19521,7 @@ package body Sem_Util is
 
    function Is_Volatile_Function (Func_Id : Entity_Id) return Boolean is
    begin
-      pragma Assert (Ekind_In (Func_Id, E_Function, E_Generic_Function));
+      pragma Assert (Ekind (Func_Id) in E_Function | E_Generic_Function);
 
       --  A function declared within a protected type is volatile
 
@@ -19682,8 +19652,8 @@ package body Sem_Util is
    begin
       pragma Assert (Is_Itype (Id));
       return Present (Parent (Id))
-        and then Nkind_In (Parent (Id), N_Full_Type_Declaration,
-                                        N_Subtype_Declaration)
+        and then Nkind (Parent (Id)) in
+                   N_Full_Type_Declaration | N_Subtype_Declaration
         and then Defining_Entity (Parent (Id)) = Id;
    end Itype_Has_Declaration;
 
@@ -20094,9 +20064,8 @@ package body Sem_Util is
       --    Obj := new ...'(new Coextension ...);
 
       if Nkind (Context_Nod) = N_Assignment_Statement then
-         Is_Dynamic :=
-           Nkind_In (Expression (Context_Nod), N_Allocator,
-                                               N_Qualified_Expression);
+         Is_Dynamic := Nkind (Expression (Context_Nod)) in
+                         N_Allocator | N_Qualified_Expression;
 
       --  An allocator that appears within the expression of a simple return
       --  statement is treated as a potentially dynamic coextension when the
@@ -20106,10 +20075,8 @@ package body Sem_Util is
       --    return new ...'(new Coextension ...);
 
       elsif Nkind (Context_Nod) = N_Simple_Return_Statement then
-         Is_Dynamic :=
-           Nkind_In (Expression (Context_Nod), N_Aggregate,
-                                               N_Allocator,
-                                               N_Qualified_Expression);
+         Is_Dynamic := Nkind (Expression (Context_Nod)) in
+                         N_Aggregate | N_Allocator | N_Qualified_Expression;
 
       --  An alloctor that appears within the initialization expression of an
       --  object declaration is considered a potentially dynamic coextension
@@ -20125,10 +20092,8 @@ package body Sem_Util is
       --    return Obj : ... := (new Coextension ...);
 
       elsif Nkind (Context_Nod) = N_Object_Declaration then
-         Is_Dynamic :=
-           Nkind_In (Root_Nod, N_Allocator, N_Qualified_Expression)
-             or else
-               Nkind (Parent (Context_Nod)) = N_Extended_Return_Statement;
+         Is_Dynamic := Nkind (Root_Nod) in N_Allocator | N_Qualified_Expression
+           or else Nkind (Parent (Context_Nod)) = N_Extended_Return_Statement;
 
       --  This routine should not be called with constructs that cannot contain
       --  coextensions.
@@ -20294,12 +20259,12 @@ package body Sem_Util is
             --  suppressed. As a result the elaboration checks of the call must
             --  be disabled in order to preserve this dependency.
 
-            if Nkind_In (N, N_Entry_Call_Statement,
-                            N_Function_Call,
-                            N_Function_Instantiation,
-                            N_Package_Instantiation,
-                            N_Procedure_Call_Statement,
-                            N_Procedure_Instantiation)
+            if Nkind (N) in N_Entry_Call_Statement
+                          | N_Function_Call
+                          | N_Function_Instantiation
+                          | N_Package_Instantiation
+                          | N_Procedure_Call_Statement
+                          | N_Procedure_Instantiation
             then
                Nam := Extract_Name (N);
 
@@ -20378,16 +20343,16 @@ package body Sem_Util is
 
       --  Obtain the complimentary unit of the main unit
 
-      if Nkind_In (Main_Unit, N_Generic_Package_Declaration,
-                              N_Generic_Subprogram_Declaration,
-                              N_Package_Declaration,
-                              N_Subprogram_Declaration)
+      if Nkind (Main_Unit) in N_Generic_Package_Declaration
+                            | N_Generic_Subprogram_Declaration
+                            | N_Package_Declaration
+                            | N_Subprogram_Declaration
       then
          Aux_Id := Corresponding_Body (Main_Unit);
 
-      elsif Nkind_In (Main_Unit, N_Package_Body,
-                                 N_Subprogram_Body,
-                                 N_Subprogram_Renaming_Declaration)
+      elsif Nkind (Main_Unit) in N_Package_Body
+                               | N_Subprogram_Body
+                               | N_Subprogram_Renaming_Declaration
       then
          Aux_Id := Corresponding_Spec (Main_Unit);
       end if;
@@ -20718,12 +20683,10 @@ package body Sem_Util is
 
       function Process (N : Node_Id) return Traverse_Result is
       begin
-         if Nkind_In (N, N_Procedure_Call_Statement,
-                         N_Function_Call,
-                         N_Raise_Statement,
-                         N_Raise_Constraint_Error,
-                         N_Raise_Program_Error,
-                         N_Raise_Storage_Error)
+         if Nkind (N) in N_Procedure_Call_Statement
+                       | N_Function_Call
+                       | N_Raise_Statement
+                       | N_Raise_xxx_Error
          then
             Result := True;
             return Abandon;
@@ -21152,9 +21115,9 @@ package body Sem_Util is
             --  subprogram call, and the caller requests this behavior.
 
             elsif not Calls_OK
-              and then Nkind_In (Par, N_Entry_Call_Statement,
-                                      N_Function_Call,
-                                      N_Procedure_Call_Statement)
+              and then Nkind (Par) in N_Entry_Call_Statement
+                                    | N_Function_Call
+                                    | N_Procedure_Call_Statement
             then
                return False;
 
@@ -21193,7 +21156,7 @@ package body Sem_Util is
 
       --  Only references warrant a marker
 
-      elsif not Nkind_In (N, N_Expanded_Name, N_Identifier) then
+      elsif Nkind (N) not in N_Expanded_Name | N_Identifier then
          return False;
 
       --  Only source references warrant a marker
@@ -21349,17 +21312,17 @@ package body Sem_Util is
                   Decl := Specification (Decl);
                end if;
 
-               if Nkind_In (Decl, N_Function_Instantiation,
-                                  N_Function_Specification,
-                                  N_Generic_Function_Renaming_Declaration,
-                                  N_Generic_Package_Renaming_Declaration,
-                                  N_Generic_Procedure_Renaming_Declaration,
-                                  N_Package_Body,
-                                  N_Package_Instantiation,
-                                  N_Package_Renaming_Declaration,
-                                  N_Package_Specification,
-                                  N_Procedure_Instantiation,
-                                  N_Procedure_Specification)
+               if Nkind (Decl) in N_Function_Instantiation
+                                | N_Function_Specification
+                                | N_Generic_Function_Renaming_Declaration
+                                | N_Generic_Package_Renaming_Declaration
+                                | N_Generic_Procedure_Renaming_Declaration
+                                | N_Package_Body
+                                | N_Package_Instantiation
+                                | N_Package_Renaming_Declaration
+                                | N_Package_Specification
+                                | N_Procedure_Instantiation
+                                | N_Procedure_Specification
                then
                   Set_Chars (New_E, Chars (Defining_Unit_Name (Decl)));
                   Set_Defining_Unit_Name (Decl, New_E);
@@ -21816,15 +21779,15 @@ package body Sem_Util is
 
          function Has_More_Ids (N : Node_Id) return Boolean is
          begin
-            if Nkind_In (N, N_Component_Declaration,
-                            N_Discriminant_Specification,
-                            N_Exception_Declaration,
-                            N_Formal_Object_Declaration,
-                            N_Number_Declaration,
-                            N_Object_Declaration,
-                            N_Parameter_Specification,
-                            N_Use_Package_Clause,
-                            N_Use_Type_Clause)
+            if Nkind (N) in N_Component_Declaration
+                          | N_Discriminant_Specification
+                          | N_Exception_Declaration
+                          | N_Formal_Object_Declaration
+                          | N_Number_Declaration
+                          | N_Object_Declaration
+                          | N_Parameter_Specification
+                          | N_Use_Package_Clause
+                          | N_Use_Type_Clause
             then
                return More_Ids (N);
             else
@@ -22065,9 +22028,9 @@ package body Sem_Util is
             --  Update the First/Next_Named_Association chain for a replicated
             --  call.
 
-            if Nkind_In (N, N_Entry_Call_Statement,
-                            N_Function_Call,
-                            N_Procedure_Call_Statement)
+            if Nkind (N) in N_Entry_Call_Statement
+                          | N_Function_Call
+                          | N_Procedure_Call_Statement
             then
                Update_Named_Associations
                  (Old_Call => N,
@@ -22489,12 +22452,9 @@ package body Sem_Util is
          --  an entity declaration that must be replaced when the expander is
          --  active if the expression has been preanalyzed or analyzed.
 
-         elsif not Ekind_In (Id, E_Block,
-                                 E_Constant,
-                                 E_Label,
-                                 E_Loop_Parameter,
-                                 E_Procedure,
-                                 E_Variable)
+         elsif Ekind (Id) not in
+                 E_Block     | E_Constant | E_Label | E_Loop_Parameter |
+                 E_Procedure | E_Variable
            and then not Is_Type (Id)
          then
             return;
@@ -22699,7 +22659,7 @@ package body Sem_Util is
          --  shared. Thus cloned_Subtype must be set to indicate the sharing.
          --  ??? What does this do?
 
-         if Ekind_In (Itype, E_Class_Wide_Subtype, E_Record_Subtype) then
+         if Ekind (Itype) in E_Class_Wide_Subtype | E_Record_Subtype then
             Set_Cloned_Subtype (New_Itype, Itype);
          end if;
 
@@ -22787,9 +22747,9 @@ package body Sem_Util is
             EWA_Level := EWA_Level + 1;
 
          elsif EWA_Level > 0
-           and then Nkind_In (N, N_Block_Statement,
-                                 N_Subprogram_Body,
-                                 N_Subprogram_Declaration)
+           and then Nkind (N) in N_Block_Statement
+                               | N_Subprogram_Body
+                               | N_Subprogram_Declaration
          then
             EWA_Inner_Scope_Level := EWA_Inner_Scope_Level + 1;
          end if;
@@ -22815,9 +22775,9 @@ package body Sem_Util is
            Par_Nod => N);
 
          if EWA_Level > 0
-           and then Nkind_In (N, N_Block_Statement,
-                                 N_Subprogram_Body,
-                                 N_Subprogram_Declaration)
+           and then Nkind (N) in N_Block_Statement
+                               | N_Subprogram_Body
+                               | N_Subprogram_Declaration
          then
             EWA_Inner_Scope_Level := EWA_Inner_Scope_Level - 1;
 
@@ -23084,9 +23044,9 @@ package body Sem_Util is
             --  In case of a build-in-place call, the call will no longer be a
             --  call; it will have been rewritten.
 
-            if Nkind_In (Par, N_Entry_Call_Statement,
-                              N_Function_Call,
-                              N_Procedure_Call_Statement)
+            if Nkind (Par) in N_Entry_Call_Statement
+                            | N_Function_Call
+                            | N_Procedure_Call_Statement
             then
                return First_Named_Actual (Par);
 
@@ -23399,7 +23359,7 @@ package body Sem_Util is
 
    function No_Heap_Finalization (Typ : Entity_Id) return Boolean is
    begin
-      if Ekind_In (Typ, E_Access_Type, E_General_Access_Type)
+      if Ekind (Typ) in E_Access_Type | E_General_Access_Type
         and then Is_Library_Level_Entity (Typ)
       then
          --  A global No_Heap_Finalization pragma applies to all library-level
@@ -23629,9 +23589,9 @@ package body Sem_Util is
                      then
                         if No (Actuals)
                           and then
-                            Nkind_In (Parent (N), N_Procedure_Call_Statement,
-                                                  N_Function_Call,
-                                                  N_Parameter_Association)
+                            Nkind (Parent (N)) in N_Procedure_Call_Statement
+                                                | N_Function_Call
+                                                | N_Parameter_Association
                           and then Ekind (S) /= E_Function
                         then
                            Set_Etype (N, Etype (S));
@@ -23783,15 +23743,13 @@ package body Sem_Util is
                end if;
             end;
 
-         elsif Nkind_In (Exp, N_Type_Conversion,
-                              N_Unchecked_Type_Conversion)
+         elsif Nkind (Exp) in N_Type_Conversion | N_Unchecked_Type_Conversion
          then
             Exp := Expression (Exp);
             goto Continue;
 
-         elsif Nkind_In (Exp, N_Slice,
-                              N_Indexed_Component,
-                              N_Selected_Component)
+         elsif Nkind (Exp) in
+                 N_Slice | N_Indexed_Component | N_Selected_Component
          then
             --  Special check, if the prefix is an access type, then return
             --  since we are modifying the thing pointed to, not the prefix.
@@ -23852,7 +23810,7 @@ package body Sem_Util is
 
                --  Follow renaming chain
 
-               if Ekind_In (Ent, E_Variable, E_Constant)
+               if Ekind (Ent) in E_Variable | E_Constant
                  and then Present (Renamed_Object (Ent))
                then
                   Exp := Renamed_Object (Ent);
@@ -23875,8 +23833,8 @@ package body Sem_Util is
                --  a modification of the container.
 
                elsif Comes_From_Source (Original_Node (Exp))
-                 and then Nkind_In (Original_Node (Exp), N_Selected_Component,
-                                                         N_Indexed_Component)
+                 and then Nkind (Original_Node (Exp)) in
+                            N_Selected_Component | N_Indexed_Component
                then
                   Exp := Prefix (Original_Node (Exp));
                   goto Continue;
@@ -23969,13 +23927,12 @@ package body Sem_Util is
 
       function Is_Null_Excluding_Def (Def : Node_Id) return Boolean is
       begin
-         return
-           Nkind_In (Def, N_Access_Definition,
-                          N_Access_Function_Definition,
-                          N_Access_Procedure_Definition,
-                          N_Access_To_Object_Definition,
-                          N_Component_Definition,
-                          N_Derived_Type_Definition)
+         return Nkind (Def) in N_Access_Definition
+                             | N_Access_Function_Definition
+                             | N_Access_Procedure_Definition
+                             | N_Access_To_Object_Definition
+                             | N_Component_Definition
+                             | N_Derived_Type_Definition
              and then Null_Exclusion_Present (Def);
       end Is_Null_Excluding_Def;
 
@@ -23997,12 +23954,12 @@ package body Sem_Util is
          if Is_Imported (Id) or else Is_Exported (Id) then
             return Unknown;
 
-         elsif Nkind_In (Decl, N_Component_Declaration,
-                               N_Discriminant_Specification,
-                               N_Formal_Object_Declaration,
-                               N_Object_Declaration,
-                               N_Object_Renaming_Declaration,
-                               N_Parameter_Specification)
+         elsif Nkind (Decl) in N_Component_Declaration
+                             | N_Discriminant_Specification
+                             | N_Formal_Object_Declaration
+                             | N_Object_Declaration
+                             | N_Object_Renaming_Declaration
+                             | N_Parameter_Specification
          then
             --  A component declaration yields a non-null value when either
             --  its component definition or access definition carries a null
@@ -24123,9 +24080,9 @@ package body Sem_Util is
       --  Taking the 'Access of something yields a non-null value
 
       elsif Nkind (N) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (N), Name_Access,
-                                             Name_Unchecked_Access,
-                                             Name_Unrestricted_Access)
+        and then Attribute_Name (N) in Name_Access
+                                     | Name_Unchecked_Access
+                                     | Name_Unrestricted_Access
       then
          return Is_Non_Null;
 
@@ -24169,7 +24126,8 @@ package body Sem_Util is
       if Nkind (N) = N_Null then
          return Present (Typ) and then Is_Descendant_Of_Address (Typ);
 
-      elsif Nkind_In (N, N_Op_Eq, N_Op_Ge, N_Op_Gt, N_Op_Le, N_Op_Lt, N_Op_Ne)
+      elsif Nkind (N) in
+              N_Op_Eq | N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt | N_Op_Ne
       then
          declare
             L : constant Node_Id := Left_Opnd (N);
@@ -24357,7 +24315,7 @@ package body Sem_Util is
             return Scope_Depth (Enclosing_Dynamic_Scope (E));
          end if;
 
-      elsif Nkind_In (Orig_Obj, N_Indexed_Component, N_Selected_Component) then
+      elsif Nkind (Orig_Obj) in N_Indexed_Component | N_Selected_Component then
          Orig_Pre := Original_Node (Prefix (Orig_Obj));
 
          if Is_Access_Type (Etype (Orig_Pre)) then
@@ -24415,8 +24373,7 @@ package body Sem_Util is
             return Type_Access_Level (Etype (Prefix (Orig_Obj)));
          end if;
 
-      elsif Nkind_In (Orig_Obj, N_Type_Conversion,
-                                N_Unchecked_Type_Conversion)
+      elsif Nkind (Orig_Obj) in N_Type_Conversion | N_Unchecked_Type_Conversion
       then
          return Object_Access_Level (Expression (Orig_Obj));
 
@@ -24559,18 +24516,16 @@ package body Sem_Util is
       --  we are trying to implement here.
 
       elsif Nkind (Orig_Obj) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (Orig_Obj),
-                         Name_Old,
-                         Name_Loop_Entry)
+        and then Attribute_Name (Orig_Obj) in Name_Old | Name_Loop_Entry
       then
          return Object_Access_Level (Current_Scope);
 
       --  Move up the attribute reference when we encounter a 'Access variation
 
       elsif Nkind (Orig_Obj) = N_Attribute_Reference
-        and then Nam_In (Attribute_Name (Orig_Obj), Name_Access,
-                                                    Name_Unchecked_Access,
-                                                    Name_Unrestricted_Access)
+        and then Attribute_Name (Orig_Obj) in Name_Access
+                                            | Name_Unchecked_Access
+                                            | Name_Unrestricted_Access
       then
          return Object_Access_Level (Prefix (Orig_Obj));
 
@@ -24691,7 +24646,7 @@ package body Sem_Util is
       Item_Nam : Name_Id;
 
    begin
-      pragma Assert (Nkind_In (N, N_Aspect_Specification, N_Pragma));
+      pragma Assert (Nkind (N) in N_Aspect_Specification | N_Pragma);
 
       Item := N;
 
@@ -24730,8 +24685,7 @@ package body Sem_Util is
          elsif Item_Nam = Name_Pre then
             Item_Nam := Name_uPre;
 
-         elsif Nam_In (Item_Nam, Name_Type_Invariant,
-                                 Name_Type_Invariant_Class)
+         elsif Item_Nam in Name_Type_Invariant | Name_Type_Invariant_Class
          then
             Item_Nam := Name_uType_Invariant;
 
@@ -24839,7 +24793,7 @@ package body Sem_Util is
             --  The current Check_Policy pragma matches the requested policy or
             --  appears in the single argument form (Assertion, policy_id).
 
-            if Nam_In (Chars (Arg1), Name_Assertion, Policy) then
+            if Chars (Arg1) in Name_Assertion | Policy then
                return Chars (Arg2);
             end if;
 
@@ -24886,7 +24840,7 @@ package body Sem_Util is
       --  assertions, unless they are disabled. Force Name_Check on
       --  ignored assertions.
 
-      if Nam_In (Kind, Name_Ignore, Name_Off)
+      if Kind in Name_Ignore | Name_Off
         and then (CodePeer_Mode or GNATprove_Mode)
       then
          Kind := Name_Check;
@@ -25615,7 +25569,7 @@ package body Sem_Util is
       --  The entity denotes a primitive subprogram. Remove it from the list of
       --  primitives of the associated controlling type.
 
-      if Ekind_In (Id, E_Function, E_Procedure) and then Is_Primitive (Id) then
+      if Ekind (Id) in E_Function | E_Procedure and then Is_Primitive (Id) then
          Formal := First_Formal (Id);
          while Present (Formal) loop
             if Is_Controlling_Formal (Formal) then
@@ -25910,7 +25864,7 @@ package body Sem_Util is
          while R_Scope /= Standard_Standard loop
             exit when R_Scope = E_Scope;
 
-            if not Ekind_In (R_Scope, E_Package, E_Block, E_Loop) then
+            if Ekind (R_Scope) not in E_Package | E_Block | E_Loop then
                return False;
             else
                R_Scope := Scope (R_Scope);
@@ -26024,7 +25978,7 @@ package body Sem_Util is
             EN2 : constant Entity_Id := Entity (N2);
          begin
             if Present (EN1) and then Present (EN2)
-              and then (Ekind_In (EN1, E_Variable, E_Constant)
+              and then (Ekind (EN1) in E_Variable | E_Constant
                          or else Is_Formal (EN1))
               and then EN1 = EN2
             then
@@ -26314,8 +26268,8 @@ package body Sem_Util is
             Typ : constant Entity_Id := Etype (E);
 
          begin
-            if Ekind_In (Typ, E_Anonymous_Access_Type,
-                              E_Anonymous_Access_Subprogram_Type)
+            if Ekind (Typ) in E_Anonymous_Access_Type
+                            | E_Anonymous_Access_Subprogram_Type
               and then not Has_Convention_Pragma (Typ)
             then
                Basic_Set_Convention (Typ, Val);
@@ -26783,8 +26737,8 @@ package body Sem_Util is
             if No (N) then
                return False;
 
-            elsif Nkind_In (N, N_Handled_Sequence_Of_Statements,
-                               N_If_Statement)
+            elsif Nkind (N) in
+                    N_Handled_Sequence_Of_Statements | N_If_Statement
             then
                return True;
             end if;
@@ -26810,8 +26764,8 @@ package body Sem_Util is
       --  never needs to be made public and furthermore, making it public can
       --  cause back end problems.
 
-      elsif Nkind_In (Parent (Id), N_Object_Declaration,
-                                   N_Function_Specification)
+      elsif Nkind (Parent (Id)) in
+              N_Object_Declaration | N_Function_Specification
         and then Within_HSS_Or_If (Id)
       then
          return;
@@ -26843,7 +26797,7 @@ package body Sem_Util is
    begin
       --  Deal with indexed or selected component where prefix is modified
 
-      if Nkind_In (N, N_Indexed_Component, N_Selected_Component) then
+      if Nkind (N) in N_Indexed_Component | N_Selected_Component then
          Pref := Prefix (N);
 
          --  If prefix is access type, then it is the designated object that is
@@ -27122,8 +27076,8 @@ package body Sem_Util is
                return False;
             end if;
 
-            if not Ekind_In (Entity (Selector_Name (N)), E_Component,
-                                                         E_Discriminant)
+            if Ekind (Entity (Selector_Name (N))) not in
+                 E_Component | E_Discriminant
             then
                return False;
             end if;
@@ -27221,7 +27175,7 @@ package body Sem_Util is
       --  'Loop_Entry attribute into a conditional block. Infinite loops lack
       --  the conditional part.
 
-      if Nkind_In (Stmt, N_Block_Statement, N_If_Statement)
+      if Nkind (Stmt) in N_Block_Statement | N_If_Statement
         and then Nkind (Original_Node (N)) = N_Loop_Statement
       then
          Stmt := Original_Node (N);
@@ -27883,10 +27837,10 @@ package body Sem_Util is
 
    begin
       Pref := N;
-      while Nkind_In (Pref, N_Explicit_Dereference,
-                            N_Indexed_Component,
-                            N_Selected_Component,
-                            N_Slice)
+      while Nkind (Pref) in N_Explicit_Dereference
+                          | N_Indexed_Component
+                          | N_Selected_Component
+                          | N_Slice
       loop
          Pref := Prefix (Pref);
       end loop;
@@ -28357,9 +28311,9 @@ package body Sem_Util is
       --  Recurse to handle unlikely case of multiple levels of qualification
       --  and/or conversion.
 
-      if Nkind_In (Expr, N_Qualified_Expression,
-                         N_Type_Conversion,
-                         N_Unchecked_Type_Conversion)
+      if Nkind (Expr) in N_Qualified_Expression
+                       | N_Type_Conversion
+                       | N_Unchecked_Type_Conversion
       then
          return Unqual_Conv (Expression (Expr));
 
@@ -28513,9 +28467,9 @@ package body Sem_Util is
 
       Par := N;
       while Present (Par) loop
-         if Nkind_In (Par, N_Entry_Call_Statement,
-                           N_Function_Call,
-                           N_Procedure_Call_Statement)
+         if Nkind (Par) in N_Entry_Call_Statement
+                         | N_Function_Call
+                         | N_Procedure_Call_Statement
          then
             return True;
 
@@ -28589,8 +28543,8 @@ package body Sem_Util is
                if No (E) then
                   return False;
 
-               elsif not Ekind_In (E, E_Discriminant, E_Component)
-                 or else Nam_In (Chars (E), Name_uTag, Name_uParent)
+               elsif Ekind (E) not in E_Discriminant | E_Component
+                 or else Chars (E) in Name_uTag | Name_uParent
                then
                   Next_Entity (E);
 
@@ -28744,7 +28698,7 @@ package body Sem_Util is
 
       elsif Is_Integer_Type (Expec_Type)
         and then Is_RTE (Found_Type, RE_Address)
-        and then Nkind_In (Parent (Expr), N_Op_Add, N_Op_Subtract)
+        and then Nkind (Parent (Expr)) in N_Op_Add | N_Op_Subtract
         and then Expr = Left_Opnd (Parent (Expr))
         and then Is_Integer_Type (Etype (Right_Opnd (Parent (Expr))))
       then
@@ -28834,7 +28788,7 @@ package body Sem_Util is
             Error_Msg_N ("\\found package name!", Expr);
 
          elsif Is_Entity_Name (Expr)
-           and then Ekind_In (Entity (Expr), E_Procedure, E_Generic_Procedure)
+           and then Ekind (Entity (Expr)) in E_Procedure | E_Generic_Procedure
          then
             if Ekind (Expec_Type) = E_Access_Subprogram_Type then
                Error_Msg_N
@@ -28882,7 +28836,7 @@ package body Sem_Util is
 
          if Expec_Type = Standard_Boolean
            and then Is_Modular_Integer_Type (Found_Type)
-           and then Nkind_In (Parent (Expr), N_Op_And, N_Op_Or, N_Op_Xor)
+           and then Nkind (Parent (Expr)) in N_Op_And | N_Op_Or | N_Op_Xor
            and then Nkind (Right_Opnd (Parent (Expr))) in N_Op_Compare
          then
             declare
@@ -29021,7 +28975,7 @@ package body Sem_Util is
    begin
       --  Integer and real literals are of a universal type
 
-      if Nkind_In (N, N_Integer_Literal, N_Real_Literal) then
+      if Nkind (N) in N_Integer_Literal | N_Real_Literal then
          return True;
 
       --  The values of certain attributes are of a universal type
index 3c7f5d5d70265e2e5517d1b9539c02f768c51e4b..b67bb7d5865668c1bccf97f365f0187ae5d407ca 100644 (file)
@@ -1165,7 +1165,7 @@ package body Sem_Warn is
 
             if Ekind (E1) = E_Variable
               or else
-                (Ekind_In (E1, E_Out_Parameter, E_In_Out_Parameter)
+                (Ekind (E1) in E_Out_Parameter | E_In_Out_Parameter
                   and then not Is_Protected_Type (Current_Scope))
             then
                --  If the formal has a class-wide type, retrieve its type
@@ -1469,9 +1469,9 @@ package body Sem_Warn is
 
                   UR := Original_Node (UR);
                   loop
-                     if Nkind_In (UR, N_Expression_With_Actions,
-                                      N_Qualified_Expression,
-                                      N_Type_Conversion)
+                     if Nkind (UR) in N_Expression_With_Actions
+                                    | N_Qualified_Expression
+                                    | N_Type_Conversion
                      then
                         UR := Expression (UR);
 
@@ -1612,9 +1612,9 @@ package body Sem_Warn is
               and then (Is_Object (E1)
                          or else Is_Type (E1)
                          or else Ekind (E1) = E_Label
-                         or else Ekind_In (E1, E_Exception,
-                                               E_Named_Integer,
-                                               E_Named_Real)
+                         or else Ekind (E1) in E_Exception
+                                             | E_Named_Integer
+                                             | E_Named_Real
                          or else Is_Overloadable (E1)
 
                          --  Package case, if the main unit is a package spec
@@ -1895,7 +1895,7 @@ package body Sem_Warn is
                E : constant Entity_Id := Entity (N);
 
             begin
-               if Ekind_In (E, E_Variable, E_Out_Parameter)
+               if Ekind (E) in E_Variable | E_Out_Parameter
                  and then Never_Set_In_Source_Check_Spec (E)
                  and then not Has_Initial_Value (E)
                  and then (No (Unset_Reference (E))
@@ -1975,10 +1975,11 @@ package body Sem_Warn is
                         Nod := Parent (N);
                         while Present (Nod) loop
                            if Nkind (Nod) = N_Pragma
-                             and then Nam_In (Pragma_Name_Unmapped (Nod),
-                                              Name_Postcondition,
-                                              Name_Refined_Post,
-                                              Name_Contract_Cases)
+                             and then
+                               Pragma_Name_Unmapped (Nod)
+                                in Name_Postcondition
+                                 | Name_Refined_Post
+                                 | Name_Contract_Cases
                            then
                               return True;
 
@@ -2102,7 +2103,7 @@ package body Sem_Warn is
                               P := Parent (P);
                               exit when No (P);
 
-                              if Nkind_In (P, N_If_Statement, N_Elsif_Part)
+                              if Nkind (P) in N_If_Statement | N_Elsif_Part
                                 and then Ref_In (Condition (P))
                               then
                                  return;
@@ -3188,7 +3189,7 @@ package body Sem_Warn is
 
       --  Reference to obsolescent component
 
-      elsif Ekind_In (E, E_Component, E_Discriminant) then
+      elsif Ekind (E) in E_Component | E_Discriminant then
          Error_Msg_NE
            ("??reference to obsolescent component& declared#", N, E);
 
@@ -3567,8 +3568,9 @@ package body Sem_Warn is
             --  node, since assert pragmas get rewritten at analysis time.
 
             elsif Nkind (Original_Node (P)) = N_Pragma
-              and then Nam_In (Pragma_Name_Unmapped (Original_Node (P)),
-                               Name_Assert, Name_Check)
+              and then
+                Pragma_Name_Unmapped (Original_Node (P))
+                  in Name_Assert | Name_Check
             then
                return;
             end if;
@@ -4232,7 +4234,7 @@ package body Sem_Warn is
       --  Only process if warnings activated
 
       if Warn_On_Suspicious_Contract then
-         if Nkind_In (Par, N_Op_Eq, N_Op_Ne) then
+         if Nkind (Par) in N_Op_Eq | N_Op_Ne then
             if N = Left_Opnd (Par) then
                Arg := Right_Opnd (Par);
             else
@@ -4422,10 +4424,10 @@ package body Sem_Warn is
                         B : constant Node_Id := Parent (Parent (Scope (E)));
                         S : Entity_Id := Empty;
                      begin
-                        if Nkind_In (B,
-                                     N_Expression_Function,
-                                     N_Subprogram_Body,
-                                     N_Subprogram_Renaming_Declaration)
+                        if Nkind (B) in
+                             N_Expression_Function |
+                             N_Subprogram_Body     |
+                             N_Subprogram_Renaming_Declaration
                         then
                            S := Corresponding_Spec (B);
                         end if;
@@ -4587,10 +4589,10 @@ package body Sem_Warn is
 
             --  When we hit a package/subprogram body, issue warning and exit
 
-            elsif Nkind_In (P, N_Entry_Body,
-                               N_Package_Body,
-                               N_Subprogram_Body,
-                               N_Task_Body)
+            elsif Nkind (P) in N_Entry_Body
+                             | N_Package_Body
+                             | N_Subprogram_Body
+                             | N_Task_Body
             then
                --  Case of assigned value never referenced
 
@@ -4614,8 +4616,8 @@ package body Sem_Warn is
                         --  Give appropriate message, distinguishing between
                         --  assignment statements and out parameters.
 
-                        if Nkind_In (Parent (LA), N_Parameter_Association,
-                                                  N_Procedure_Call_Statement)
+                        if Nkind (Parent (LA)) in N_Parameter_Association
+                                                | N_Procedure_Call_Statement
                         then
                            Error_Msg_NE
                              ("?m?& modified by call, but value might not be "
@@ -4641,8 +4643,8 @@ package body Sem_Warn is
                      --  Give appropriate message, distinguishing between
                      --  assignment statements and out parameters.
 
-                     if Nkind_In (Parent (LA), N_Procedure_Call_Statement,
-                                               N_Parameter_Association)
+                     if Nkind (Parent (LA)) in N_Procedure_Call_Statement
+                                             | N_Parameter_Association
                      then
                         Error_Msg_NE
                           ("?m?& modified by call, but value overwritten #!",
@@ -4673,10 +4675,10 @@ package body Sem_Warn is
                   --  not generate the warning, since the variable in question
                   --  may be accessed after an exception in the outer block.
 
-                  if not Nkind_In (Parent (P), N_Entry_Body,
-                                               N_Package_Body,
-                                               N_Subprogram_Body,
-                                               N_Task_Body)
+                  if Nkind (Parent (P)) not in N_Entry_Body
+                                             | N_Package_Body
+                                             | N_Subprogram_Body
+                                             | N_Task_Body
                   then
                      Set_Last_Assignment (Ent, Empty);
                      return;
index 2d4b93ec52eeb3e52f79dcb06a983580b762042c..082f06f4b2a3bd432fd79073611dfff4856beb5a 100644 (file)
@@ -7123,240 +7123,6 @@ package body Sinfo is
         UI_From_Int (Int (S) - Int (Sloc (N))));
    end Set_End_Location;
 
-   --------------
-   -- Nkind_In --
-   --------------
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8;
-   end Nkind_In;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind;
-      V9 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8 or else
-             T = V9;
-   end Nkind_In;
-
-   function Nkind_In
-     (T   : Node_Kind;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1 or else
-             T = V2 or else
-             T = V3 or else
-             T = V4 or else
-             T = V5 or else
-             T = V6 or else
-             T = V7 or else
-             T = V8 or else
-             T = V9 or else
-             T = V10;
-   end Nkind_In;
-
-   function Nkind_In
-     (T   : Node_Kind;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1  or else
-             T = V2  or else
-             T = V3  or else
-             T = V4  or else
-             T = V5  or else
-             T = V6  or else
-             T = V7  or else
-             T = V8  or else
-             T = V9  or else
-             T = V10 or else
-             T = V11;
-   end Nkind_In;
-
-   function Nkind_In
-     (T   : Node_Kind;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind;
-      V12 : Node_Kind;
-      V13 : Node_Kind;
-      V14 : Node_Kind;
-      V15 : Node_Kind;
-      V16 : Node_Kind;
-      V17 : Node_Kind) return Boolean
-   is
-   begin
-      return T = V1  or else
-             T = V2  or else
-             T = V3  or else
-             T = V4  or else
-             T = V5  or else
-             T = V6  or else
-             T = V7  or else
-             T = V8  or else
-             T = V9  or else
-             T = V10 or else
-             T = V11 or else
-             T = V12 or else
-             T = V13 or else
-             T = V14 or else
-             T = V15 or else
-             T = V16 or else
-             T = V17;
-   end Nkind_In;
-
    --------------------------
    -- Pragma_Name_Unmapped --
    --------------------------
index 98dd462a859e8ebc350c2e54bcb7dc96875b0b0f..2583f9144b165699ffa3abbf733315a11677f98b 100644 (file)
@@ -11410,136 +11410,6 @@ package Sinfo is
    --  for the argument. This is Arg itself, or, in the case where Arg is a
    --  pragma argument association node, the expression from this node.
 
-   --------------------------------
-   -- Node_Kind Membership Tests --
-   --------------------------------
-
-   --  The following functions allow a convenient notation for testing whether
-   --  a Node_Kind value matches any one of a list of possible values. In each
-   --  case True is returned if the given T argument is equal to any of the V
-   --  arguments. Note that there is a similar set of functions defined in
-   --  Atree where the first argument is a Node_Id whose Nkind field is tested.
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T  : Node_Kind;
-      V1 : Node_Kind;
-      V2 : Node_Kind;
-      V3 : Node_Kind;
-      V4 : Node_Kind;
-      V5 : Node_Kind;
-      V6 : Node_Kind;
-      V7 : Node_Kind;
-      V8 : Node_Kind;
-      V9 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T   : Node_Kind;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind) return Boolean;
-
-   function Nkind_In
-     (T   : Node_Kind;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind) return Boolean;
-
-   --  12..16-parameter versions are not yet needed
-
-   function Nkind_In
-     (T   : Node_Kind;
-      V1  : Node_Kind;
-      V2  : Node_Kind;
-      V3  : Node_Kind;
-      V4  : Node_Kind;
-      V5  : Node_Kind;
-      V6  : Node_Kind;
-      V7  : Node_Kind;
-      V8  : Node_Kind;
-      V9  : Node_Kind;
-      V10 : Node_Kind;
-      V11 : Node_Kind;
-      V12 : Node_Kind;
-      V13 : Node_Kind;
-      V14 : Node_Kind;
-      V15 : Node_Kind;
-      V16 : Node_Kind;
-      V17 : Node_Kind) return Boolean;
-
-   pragma Inline (Nkind_In);
-   --  Inline all above functions
-
    -----------------------
    -- Utility Functions --
    -----------------------
index a76b62e219aef64a17b7b831df9fb49604bcf650..3aeb95f0493cf5f556c4c4de57461f6af778cc52 100644 (file)
@@ -532,7 +532,7 @@ package body Sprint is
          --  We do not know the actual end location in the generated code and
          --  it could be much closer than in the source code, so play safe.
 
-         if Nkind_In (Dump_Node, N_Case_Statement, N_If_Statement) then
+         if Nkind (Dump_Node) in N_Case_Statement | N_If_Statement then
             Set_End_Location (Dump_Node, Debug_Sloc + Source_Ptr (Column - 1));
          end if;
 
@@ -3537,8 +3537,8 @@ package body Sprint is
       --  where the aspects are printed inside the package specification.
 
       if Has_Aspects (Node)
-        and then not Nkind_In (Node, N_Generic_Package_Declaration,
-                                     N_Package_Declaration)
+        and then Nkind (Node) not in
+                   N_Generic_Package_Declaration | N_Package_Declaration
         and then not Is_Empty_List (Aspect_Specifications (Node))
       then
          Sprint_Aspect_Specifications (Node, Semicolon => True);
@@ -4745,9 +4745,7 @@ package body Sprint is
 
       --  See if we have extra formals
 
-      if Nkind_In (N, N_Function_Specification,
-                      N_Procedure_Specification)
-      then
+      if Nkind (N) in N_Function_Specification | N_Procedure_Specification then
          Ent := Defining_Entity (N);
 
          --  Loop to write extra formals (if any)
index b90af84e821d652c086afbb303c252fadc1c60c3..565c41a2b60ce8c7b1a20e5e153c35eb2ac025ca 100644 (file)
@@ -207,13 +207,13 @@ package body Styleg is
 
       function OK_Boolean_Operand (N : Node_Id) return Boolean is
       begin
-         if Nkind_In (N, N_Identifier, N_Expanded_Name) then
+         if Nkind (N) in N_Identifier | N_Expanded_Name then
             return True;
 
          elsif Nkind (N) = N_Op_Not then
             return OK_Boolean_Operand (Original_Node (Right_Opnd (N)));
 
-         elsif Nkind_In (N, N_Op_And, N_Op_Or) then
+         elsif Nkind (N) in N_Op_And | N_Op_Or then
             return OK_Boolean_Operand (Original_Node (Left_Opnd (N)))
                      and then
                    OK_Boolean_Operand (Original_Node (Right_Opnd (N)));
@@ -233,7 +233,7 @@ package body Styleg is
             Orig : constant Node_Id := Original_Node (Node);
 
          begin
-            if Nkind_In (Orig, N_Op_And, N_Op_Or) then
+            if Nkind (Orig) in N_Op_And | N_Op_Or then
                declare
                   L : constant Node_Id := Original_Node (Left_Opnd  (Orig));
                   R : constant Node_Id := Original_Node (Right_Opnd (Orig));
index 4feb3a23edb0169d91df66e368bb1339dd015baf..3b33ee76d7d27ed355ea1cb64065fe8d5e7e0a99 100644 (file)
@@ -175,8 +175,8 @@ package body Tbuild is
               Attribute_Name => Attribute_Name);
 
    begin
-      pragma Assert (Nam_In (Attribute_Name, Name_Address,
-                                             Name_Unrestricted_Access));
+      pragma Assert
+        (Attribute_Name in Name_Address | Name_Unrestricted_Access);
       Set_Must_Be_Byte_Aligned (N, True);
       return N;
    end Make_Byte_Aligned_Attribute_Reference;
index b4fd54561659df7a94de92c15c91777b57da2e50..e76b138efb45016b32f7e9fdbaa8aa9df945bb10 100644 (file)
@@ -1274,7 +1274,7 @@ package body Treepr is
                --  Special case End_Span = Uint5
 
                when F_Field5 =>
-                  if Nkind_In (N, N_Case_Statement, N_If_Statement) then
+                  if Nkind (N) in N_Case_Statement | N_If_Statement then
                      Print_End_Span (N);
                   else
                      Print_Field (Field5 (N), Fmt);