-- and post-state. Prag is a [refined] postcondition or a contract-cases
-- pragma. Result_Seen is set when the pragma mentions attribute 'Result
- function Has_In_Out_Parameter (Subp_Id : Entity_Id) return Boolean;
- -- Determine whether subprogram Subp_Id contains at least one IN OUT
- -- formal parameter.
-
-------------------------------------------
-- Check_Result_And_Post_State_In_Pragma --
-------------------------------------------
end if;
end Check_Result_And_Post_State_In_Pragma;
- --------------------------
- -- Has_In_Out_Parameter --
- --------------------------
-
- function Has_In_Out_Parameter (Subp_Id : Entity_Id) return Boolean is
- Formal : Entity_Id;
-
- begin
- -- Traverse the formals looking for an IN OUT parameter
-
- Formal := First_Formal (Subp_Id);
- while Present (Formal) loop
- if Ekind (Formal) = E_In_Out_Parameter then
- return True;
- end if;
-
- Next_Formal (Formal);
- end loop;
-
- return False;
- end Has_In_Out_Parameter;
-
-- Local variables
Items : constant Node_Id := Contract (Subp_Id);
null;
-- Regardless of whether the function has postconditions or contract
- -- cases, or whether they mention attribute 'Result, an IN OUT formal
+ -- cases, or whether they mention attribute 'Result, an [IN] OUT formal
-- parameter is always treated as a result.
- elsif Has_In_Out_Parameter (Spec_Id) then
+ elsif Has_Out_Or_In_Out_Parameter (Spec_Id) then
null;
-- The function has both a postcondition and contract cases and they do