]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Update the uses of Is_Ignored*_In_Codegen
authorViljar Indus <indus@adacore.com>
Wed, 6 Aug 2025 11:53:05 +0000 (14:53 +0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 9 Sep 2025 12:39:59 +0000 (14:39 +0200)
Replace calls to Is_Ignored_Ghost_Entity and
Predicates_Ignored with their In_Codegen versions in places where
we would analyze those nodes differently from checked nodes.

Describe the motive and use cases for those In_Codegen functions.

gcc/ada/ChangeLog:

* contracts.adb: Use the In_Codegen function instead.
* exp_ch3.adb: Likewise.
* exp_ch5.adb: Likewise.
* exp_ch6.adb: Likewise.
* exp_ch7.adb: Likewise.
* exp_ch9.adb: Likewise.
* exp_disp.adb: Likewise.
* exp_util.adb: Likewise.
* freeze.adb: Likewise.
* ghost.adb: Likewise.
* inline.adb: Likewise.
* repinfo.adb: Likewise.
* sem_ch10.adb: Likewise.
* sem_ch13.adb: Likewise.
* sem_ch3.adb: Likewise.
* sem_ch6.adb: Likewise.
* sem_elab.adb: Likewise.
* sem_res.adb: Likewise.
* sem_util.adb (Predicates_Ignored_In_Codegen): Add new function for
the Predicates_Ignored property.
(Predicates_Enabled): Use Predicates_Ignored_In_Codegen instead.
* sem_util.ads (Predicates_Ignored_In_Codegen): New function.
(Is_Ignored_In_Codegen): Add documentation on how _In_Codegen
functions should be used.

20 files changed:
gcc/ada/contracts.adb
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch5.adb
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch7.adb
gcc/ada/exp_ch9.adb
gcc/ada/exp_disp.adb
gcc/ada/exp_util.adb
gcc/ada/freeze.adb
gcc/ada/ghost.adb
gcc/ada/inline.adb
gcc/ada/repinfo.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_elab.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads

index b7b2c5078853544f2b5798a9de6900300cc67215..a6862c424165bb2bf57246103cc0d90f776ed7ce 100644 (file)
@@ -3282,7 +3282,7 @@ package body Contracts is
       --  The contract of an ignored Ghost subprogram does not need expansion,
       --  because the subprogram and all calls to it will be removed.
 
-      elsif Is_Ignored_Ghost_Entity (Subp_Id) then
+      elsif Is_Ignored_Ghost_Entity_In_Codegen (Subp_Id) then
          return;
 
       --  No action needed for helpers and indirect-call wrapper built to
index c6ef88faca22533d5d2aa1a166e7f2071787b8f0..07cb4eb84de818f32093748ae40a6ac20a7df288 100644 (file)
@@ -2145,7 +2145,7 @@ package body Exp_Ch3 is
          end if;
 
          if Policy_In_Effect (Name_Assert) = Name_Check
-           and then not Predicates_Ignored (Etype (Discr))
+           and then not Predicates_Ignored_In_Codegen (Etype (Discr))
          then
             Prepend_To (Res, Make_Predicate_Check (Typ, Val));
          end if;
@@ -5878,7 +5878,7 @@ package body Exp_Ch3 is
       --  the subtype.
 
       if not No_Exception_Handlers_Set
-        and then not Predicates_Ignored (Typ)
+        and then not Predicates_Ignored_In_Codegen (Typ)
       then
          Append_To (Lst,
            Make_Case_Statement_Alternative (Loc,
index 66a4fc0512b0c4c58144a0c333b6e6eef8b28ccf..d78df5c8315a00128292d644a29ae0d5cbefaf2b 100644 (file)
@@ -4118,7 +4118,7 @@ package body Exp_Ch5 is
 
       if Compile_Time_Known_Value (Expr)
         and then Has_Predicates (Etype (Expr))
-        and then not Predicates_Ignored (Etype (Expr))
+        and then not Predicates_Ignored_In_Codegen (Etype (Expr))
         and then not Is_OK_Static_Expression (Expr)
       then
          Rewrite (N,
@@ -4203,7 +4203,7 @@ package body Exp_Ch5 is
          --  generated case statements).
 
          if Validity_Check_Default
-           and then not Predicates_Ignored (Etype (Expr))
+           and then not Predicates_Ignored_In_Codegen (Etype (Expr))
          then
             --  Recognize the simple case where Expr is an object reference
             --  and the case statement is directly preceded by an
@@ -4378,7 +4378,7 @@ package body Exp_Ch5 is
             --  predicate, and there is no Others choice, Constraint_Error
             --  must be raised (RM 4.5.7 (21/3) and 5.4 (13)).
 
-            if Predicates_Ignored (Etype (Expr)) then
+            if Predicates_Ignored_In_Codegen (Etype (Expr)) then
                declare
                   Except  : constant Node_Id :=
                               Make_Raise_Constraint_Error (Loc,
index a7b694270d8e0bc76304d0e8aba81cd1b9e4bedf..18551d4899e3d819f98d7e3382d2b8c2da3e11cc 100644 (file)
@@ -5247,7 +5247,7 @@ package body Exp_Ch6 is
       --  the current subprogram is called.
 
       if Is_Subprogram (Subp)
-        and then not Is_Ignored_Ghost_Entity (Subp)
+        and then not Is_Ignored_Ghost_Entity_In_Codegen (Subp)
         and then Same_Or_Aliased_Subprograms (Subp, Current_Scope)
       then
          Check_Subprogram_Variant;
@@ -7274,7 +7274,7 @@ package body Exp_Ch6 is
 
       elsif (not Needs_Secondary_Stack (R_Type)
               and then not Is_Secondary_Stack_Thunk (Scope_Id))
-        or else Is_Ignored_Ghost_Entity (Scope_Id)
+        or else Is_Ignored_Ghost_Entity_In_Codegen (Scope_Id)
       then
          --  Mutable records with variable-length components are not returned
          --  on the sec-stack, so we need to make sure that the back end will
index dd864b7ffd3638fed75b86282cbb8d333e6aecaa..62e9d2cbb73f793f452d56ae88fec47171fe5d93 100644 (file)
@@ -2429,7 +2429,7 @@ package body Exp_Ch7 is
             --  Do not inspect an ignored Ghost package body because all
             --  code found within will not appear in the final tree.
 
-            if Is_Ignored_Ghost_Entity (Defining_Entity (Decl)) then
+            if Is_Ignored_Ghost_Entity_In_Codegen (Defining_Entity (Decl)) then
                null;
 
             elsif Ekind (Corresponding_Spec (Decl)) /= E_Generic_Package then
@@ -2507,7 +2507,7 @@ package body Exp_Ch7 is
                --  Ignored Ghost types do not need any cleanup actions because
                --  they will not appear in the final tree.
 
-               if Is_Ignored_Ghost_Entity (Typ) then
+               if Is_Ignored_Ghost_Entity_In_Codegen (Typ) then
                   null;
 
                elsif Is_Tagged_Type (Typ)
@@ -2553,7 +2553,7 @@ package body Exp_Ch7 is
                --  Ignored Ghost objects do not need any cleanup actions
                --  because they will not appear in the final tree.
 
-               elsif Is_Ignored_Ghost_Entity (Obj_Id) then
+               elsif Is_Ignored_Ghost_Entity_In_Codegen (Obj_Id) then
                   null;
 
                --  Conversely, if one of the above cases created a Master_Node,
@@ -2655,7 +2655,7 @@ package body Exp_Ch7 is
                --  Freeze nodes for ignored Ghost types do not need cleanup
                --  actions because they will never appear in the final tree.
 
-               if Is_Ignored_Ghost_Entity (Typ) then
+               if Is_Ignored_Ghost_Entity_In_Codegen (Typ) then
                   null;
 
                elsif (Is_Access_Object_Type (Typ)
@@ -2680,7 +2680,7 @@ package body Exp_Ch7 is
                --  Do not inspect an ignored Ghost package because all code
                --  found within will not appear in the final tree.
 
-               if Is_Ignored_Ghost_Entity (Pack_Id) then
+               if Is_Ignored_Ghost_Entity_In_Codegen (Pack_Id) then
                   null;
 
                elsif Ekind (Pack_Id) /= E_Generic_Package then
@@ -5281,7 +5281,7 @@ package body Exp_Ch7 is
             --  Ignored Ghost objects do not need any cleanup actions because
             --  they will not appear in the final tree.
 
-            if Is_Ignored_Ghost_Entity (Obj_Id) then
+            if Is_Ignored_Ghost_Entity_In_Codegen (Obj_Id) then
                return;
             end if;
 
index c979cf6899b12309e2aa0fdc53d45fa4d0e4bedb..a9eac808af6f9a98135925b0b03e7932a5c1a103 100644 (file)
@@ -4686,7 +4686,7 @@ package body Exp_Ch9 is
       --  by a missing activation chain entity; also skip generating it when
       --  it is a ghost entity.
 
-      if No (Chain) or else Is_Ignored_Ghost_Entity (Chain) then
+      if No (Chain) or else Is_Ignored_Ghost_Entity_In_Codegen (Chain) then
          return;
 
       --  The availability of the activation chain entity does not ensure
index 0f6bef17ecf100ffb29d66b8c03d4cb3f910b899..f15d5244ba8e2c4c0613c8a86689457fe5f80924 100644 (file)
@@ -6056,7 +6056,7 @@ package body Exp_Disp is
                     --  Skip ignored Ghost subprograms as those will be removed
                     --  from the executable.
 
-                    and then not Is_Ignored_Ghost_Entity (E)
+                    and then not Is_Ignored_Ghost_Entity_In_Codegen (E)
                   then
                      pragma Assert
                        (UI_To_Int (DT_Position (Prim)) <= Nb_Prim);
index ed515d0d49eec5e7d7cbf1dcd27d2191fa61a662..6ce6c0cd81d67d0d0705db93e6f8321f3a06d93d 100644 (file)
@@ -13498,7 +13498,7 @@ package body Exp_Util is
             --  Ignored Ghost types do not need any cleanup actions because
             --  they will not appear in the final tree.
 
-            if Is_Ignored_Ghost_Entity (Typ) then
+            if Is_Ignored_Ghost_Entity_In_Codegen (Typ) then
                null;
 
             elsif Is_Tagged_Type (Typ)
@@ -13544,7 +13544,7 @@ package body Exp_Util is
             --  Ignored Ghost objects do not need any cleanup actions because
             --  they will not appear in the final tree.
 
-            elsif Is_Ignored_Ghost_Entity (Obj_Id) then
+            elsif Is_Ignored_Ghost_Entity_In_Codegen (Obj_Id) then
                null;
 
             --  Conversely, if one of the above cases created a Master_Node,
@@ -13640,7 +13640,7 @@ package body Exp_Util is
             --  Freeze nodes for ignored Ghost types do not need cleanup
             --  actions because they will never appear in the final tree.
 
-            if Is_Ignored_Ghost_Entity (Typ) then
+            if Is_Ignored_Ghost_Entity_In_Codegen (Typ) then
                null;
 
             elsif ((Is_Access_Object_Type (Typ)
@@ -13663,7 +13663,7 @@ package body Exp_Util is
             --  Do not inspect an ignored Ghost package because all code found
             --  within will not appear in the final tree.
 
-            if Is_Ignored_Ghost_Entity (Pack_Id) then
+            if Is_Ignored_Ghost_Entity_In_Codegen (Pack_Id) then
                null;
 
             elsif Ekind (Pack_Id) /= E_Generic_Package
@@ -13680,7 +13680,7 @@ package body Exp_Util is
             --  Do not inspect an ignored Ghost package body because all code
             --  found within will not appear in the final tree.
 
-            if Is_Ignored_Ghost_Entity (Defining_Entity (Decl)) then
+            if Is_Ignored_Ghost_Entity_In_Codegen (Defining_Entity (Decl)) then
                null;
 
             elsif Ekind (Corresponding_Spec (Decl)) /= E_Generic_Package
index f383b57ae23e9cce66b266637b21c8f881748361..8fa25b3d851047ede280fcc5ebafb010105b7bc0 100644 (file)
@@ -4685,7 +4685,9 @@ package body Freeze is
 
          --  Declaring too big an array in disabled ghost code is OK
 
-         if Is_Array_Type (Typ) and then not Is_Ignored_Ghost_Entity (E) then
+         if Is_Array_Type (Typ)
+           and then not Is_Ignored_Ghost_Entity_In_Codegen (E)
+         then
             Check_Large_Modular_Array (Typ);
          end if;
       end Freeze_Object_Declaration;
index f0c62f3dc064e582fa9e38da232815ae869b0bfc..54153081ad56f064b66d2711374561e72f8934ce 100644 (file)
@@ -1777,7 +1777,7 @@ package body Ghost is
 
       return
         Nkind (N) = N_Compilation_Unit
-          and then Is_Ignored_Ghost_Entity
+          and then Is_Ignored_Ghost_Entity_In_Codegen
                      (Defining_Entity (Ultimate_Original_Node (Unit (N))));
    end Is_Ignored_Ghost_Unit;
 
@@ -2189,9 +2189,7 @@ package body Ghost is
       --  Inherit the "ghostness" of the generic unit, but the current Ghost
       --  policy is the relevant one for the instantiation.
 
-      elsif Is_Checked_Ghost_Entity (Gen_Id)
-        or else Is_Ignored_Ghost_Entity (Gen_Id)
-      then
+      elsif Is_Ghost_Entity (Gen_Id) then
          Policy := Ghost_Policy_In_Effect (Gen_Id);
 
          if Policy = No_Name then
@@ -2278,7 +2276,7 @@ package body Ghost is
       if Present (Nam)
         and then Is_Entity_Name (Nam)
         and then Present (Entity (Nam))
-        and then Is_Ignored_Ghost_Entity (Entity (Nam))
+        and then Is_Ignored_Ghost_Entity_In_Codegen (Entity (Nam))
       then
          Set_Is_Ignored_Ghost_Node (N);
          Record_Ignored_Ghost_Node (N);
index 5e2f033b913d8fe83c9924e9f4edb16270a7ee09..a592494500fd7ce6a33d35f1dbd3c34ed70d18aa 100644 (file)
@@ -1061,7 +1061,9 @@ package body Inline is
                E : constant Subprogram_Kind_Id := Inlined.Table (Index).Name;
 
             begin
-               if Is_Called (E) and then not Is_Ignored_Ghost_Entity (E) then
+               if Is_Called (E)
+                 and then not Is_Ignored_Ghost_Entity_In_Codegen (E)
+               then
                   Add_Inlined_Subprogram (E);
                end if;
             end;
index bbf92a7780076fe2f588eed02cb4053e23716a6b..e236e4e54be1237718f442e9e5f5d70bfe32fded 100644 (file)
@@ -455,7 +455,7 @@ package body Repinfo is
 
       if Present (Ent)
         and then Nkind (Declaration_Node (Ent)) not in N_Renaming_Declaration
-        and then not Is_Ignored_Ghost_Entity (Ent)
+        and then not Sem_Util.Is_Ignored_Ghost_Entity_In_Codegen (Ent)
       then
          --  If entity is a subprogram and we are listing mechanisms,
          --  then we need to list mechanisms for this entity. We skip this
index f58513d115fb39ae227e6aa8b1365ea26f3476ac..7b126aa0f3f9b9db907d58365cc5247a16e3c3fc 100644 (file)
@@ -1494,7 +1494,7 @@ package body Sem_Ch10 is
 
                 --  No checked needed for ignored ghost units
 
-                or else Is_Ignored_Ghost_Entity (Spec_Id)
+                or else Is_Ignored_Ghost_Entity_In_Codegen (Spec_Id)
               )
             then
                --  This is a case where we only need the entity for checking to
index 370df803c25c6f8dbf6997b6bdf88babe83f5b55..a4f15ac979c1e082626917ac21089f41852b2a24 100644 (file)
@@ -5103,7 +5103,7 @@ package body Sem_Ch13 is
                   if Class_Present (Aspect)
                     and then A_Id in Aspect_Pre | Aspect_Post
                     and then Is_Subprogram (E)
-                    and then not Is_Ignored_Ghost_Entity (E)
+                    and then not Is_Ignored_Ghost_Entity_In_Codegen (E)
                   then
                      if A_Id = Aspect_Pre then
                         if Is_Ignored_In_Codegen (Aspect) then
index c8922cdee658ea83e6fb12ea413ceec1b0283dba..eae366e09d7b6630bd1d69f0c02b66313f111a7d 100644 (file)
@@ -2898,12 +2898,14 @@ package body Sem_Ch3 is
          --  private type from a library unit, otherwise premature freezing of
          --  the private type will occur.
 
-         elsif not Analyzed (Next_Decl) and then Is_Body (Next_Decl)
+         elsif not Analyzed (Next_Decl)
+           and then Is_Body (Next_Decl)
            and then ((Nkind (Next_Decl) /= N_Subprogram_Body
-                       or else not Was_Expression_Function (Next_Decl))
-                      or else (not Is_Ignored_Ghost_Entity (Current_Scope)
-                                and then not Contains_Lib_Incomplete_Type
-                                               (Current_Scope)))
+                      or else not Was_Expression_Function (Next_Decl))
+                     or else (not Is_Ignored_Ghost_Entity_In_Codegen
+                                    (Current_Scope)
+                              and then not Contains_Lib_Incomplete_Type
+                                             (Current_Scope)))
          then
             --  When a controlled type is frozen, the expander generates stream
             --  and controlled-type support routines. If the freeze is caused
index a427c7a86b0f8729127037a27bab4775f806dc9d..9042b3378ce7a1d275379c1298dc5909cfc55b87 100644 (file)
@@ -581,7 +581,8 @@ package body Sem_Ch6 is
          --  Ghost subprogram.
 
          if Inside_A_Generic then
-            Set_Has_Completion (Def_Id, not Is_Ignored_Ghost_Entity (Def_Id));
+            Set_Has_Completion
+              (Def_Id, not Is_Ignored_Ghost_Entity_In_Codegen (Def_Id));
             Push_Scope (Def_Id);
             Install_Formals (Def_Id);
             Preanalyze_And_Resolve_Spec_Expression (Expr, Typ);
@@ -3907,7 +3908,7 @@ package body Sem_Ch6 is
            and then Serious_Errors_Detected = 0
            and then (Expander_Active
                       or else Operating_Mode = Check_Semantics
-                      or else Is_Ignored_Ghost_Entity (Spec_Id))
+                      or else Is_Ignored_Ghost_Entity_In_Codegen (Spec_Id))
          then
             --  The body generated for an expression function that is not a
             --  completion is a freeze point neither for the profile nor for
index 77b1e120b80077bc53601ca15a9d22fc9e495f20..0ce2b35305a10391d1ae2137b9aefba954ec68ba 100644 (file)
@@ -11199,7 +11199,7 @@ package body Sem_Elab is
         (Id : Entity_Id) return Extended_Ghost_Mode
       is
       begin
-         return To_Ghost_Mode (Is_Ignored_Ghost_Entity (Id));
+         return To_Ghost_Mode (Is_Ignored_Ghost_Entity_In_Codegen (Id));
       end Ghost_Mode_Of_Entity;
 
       ------------------------
index 29b77668802396cb2ec87d1b40ac26dd65a1b91a..f02c223809c789f351a41329155fdca9b9bc359e 100644 (file)
@@ -6954,7 +6954,7 @@ package body Sem_Res is
                   --  checkable, the case of calling an immediately containing
                   --  subprogram is easy to catch.
 
-                  if not Is_Ignored_Ghost_Entity (Nam) then
+                  if not Is_Ignored_Ghost_Entity_In_Codegen (Nam) then
                      Check_Restriction (No_Recursion, N);
                   end if;
 
@@ -7092,7 +7092,7 @@ package body Sem_Res is
         and then Ekind (Nam) in E_Function | E_Subprogram_Type
         and then Requires_Transient_Scope (Etype (Nam))
         and then not Is_Intrinsic_Subprogram (Nam)
-        and then not Is_Ignored_Ghost_Entity (Nam)
+        and then not Is_Ignored_Ghost_Entity_In_Codegen (Nam)
         and then not Is_Build_In_Place_Function (Nam)
         and then not Is_Inlinable_Expression_Function (Nam)
         and then not (Is_Inlined (Nam)
index b3b6dec5515169bd30d40d3d1308b8ca4ce001ef..8a3998d7d123a0e99492d9dce1e1155ca13a993b 100644 (file)
@@ -26658,9 +26658,8 @@ package body Sem_Util is
    begin
       return
         Present (Predicate_Function (Typ))
-        and then (GNATprove_Mode
-                  or else (not Predicates_Ignored (Typ)
-                           and then not Predicate_Checks_Suppressed (Empty)));
+        and then not Predicates_Ignored_In_Codegen (Typ)
+        and then not Predicate_Checks_Suppressed (Empty);
    end Predicate_Enabled;
 
    ----------------------------------
@@ -26726,6 +26725,18 @@ package body Sem_Util is
       return Empty;
    end Predicate_Failure_Expression;
 
+   -----------------------------------
+   -- Predicates_Ignored_In_Codegen --
+   -----------------------------------
+
+   function Predicates_Ignored_In_Codegen (N : Node_Id) return Boolean is
+   begin
+      return
+        Predicates_Ignored (N)
+        and then not CodePeer_Mode
+        and then not GNATprove_Mode;
+   end Predicates_Ignored_In_Codegen;
+
    ----------------------------------
    -- Predicate_Tests_On_Arguments --
    ----------------------------------
@@ -28163,7 +28174,7 @@ package body Sem_Util is
       --  Nothing to do for an ignored Ghost entity because the entity will be
       --  eliminated from the tree.
 
-      elsif Is_Ignored_Ghost_Entity (T) then
+      elsif Is_Ignored_Ghost_Entity_In_Codegen (T) then
          return;
 
       --  Nothing to do if entity comes from a predefined file. Library files
index a1d4ae0a897d3958170dbf296bb2dd6179a08c0c..04caed57506548b477a652ba7a2ecb08459357b9 100644 (file)
@@ -2102,14 +2102,42 @@ package Sem_Util is
    function Is_Ignored_Ghost_Entity_In_Codegen (N : Node_Id) return Boolean;
    --  True if N Is_Ignored_Ghost_Entity and GNATProve_mode and Codepeer_Mode
    --  are not active.
+   --
+   --  See Is_Ignored_In_Codegen for instructions on when this function should
+   --  be used.
 
    function Is_Ignored_Ghost_Pragma_In_Codegen (N : Node_Id) return Boolean;
    --  True if N Is_Ignored_Ghost_Pragma and GNATProve_mode and Codepeer_Mode
    --  are not active.
+   --
+   --  See Is_Ignored_In_Codegen for instructions on when this function should
+   --  be used.
 
    function Is_Ignored_In_Codegen (N : Node_Id) return Boolean;
    --  True if N Is_Ignored and GNATProve_mode and Codepeer_Mode are not
    --  active.
+   --
+   --  Tools like GNATProve and Codepeer that use the frontend to get the
+   --  representation of the source code along with all of the code generated
+   --  for assertions. This includes even the ones that are ignored. The
+   --  frontend normally avoids the generation of such assertions and ghost
+   --  code if marked as ignored. However we should still enable the generation
+   --  when working in one of those tool modes. In most cases this means that
+   --  we should ignore the fact the given node is marked as ignored and behave
+   --  as if it was not. This involves checking attributes such as Is_Ignored
+   --  along with these tool modes.
+   --
+   --  This function (and similar _In_Codegen functions) behaves as a wrapper
+   --  for such conditions. We should use this functions in scenarios where we
+   --  would normally stop the code generation for such ignored nodes. For
+   --  example in the expander where we normally transform non-ignored nodes.
+   --  Not doing so may lead to a partially expanded tree for those tools.
+   --
+   --  On the other hand we should use these attributes directly when
+   --  propagating the Is_Ignored or other similar property related values
+   --  between nodes. Additionally we should be using the original attributes
+   --  when checking for the compatibility of the checked/ignored properties
+   --  between nodes.
 
    function Is_EVF_Expression (N : Node_Id) return Boolean;
    --  Determine whether node N denotes a reference to a formal parameter of
@@ -2959,6 +2987,13 @@ package Sem_Util is
    --  returns the result of recursing on the ancestor subtype.
    --  Otherwise, returns Empty.
 
+   function Predicates_Ignored_In_Codegen (N : Node_Id) return Boolean;
+   --  True if N Predicates_Ignored is set and GNATProve_mode and Codepeer_Mode
+   --  are not active.
+   --
+   --  See Is_Ignored_In_Codegen for instructions on when this function should
+   --  be used.
+
    function Predicate_Function_Needs_Membership_Parameter (Typ : Entity_Id)
      return Boolean is
      (Present (Predicate_Failure_Expression (Typ, Inherited_OK => True)));