--------------------
procedure Inherit_Pragma (Prag_Id : Pragma_Id) is
- Prag : constant Node_Id := Get_Pragma (From_Subp, Prag_Id);
- New_Prag : Node_Id;
+ Prag : constant Node_Id := Get_Pragma (From_Subp, Prag_Id);
begin
-- A pragma cannot be part of more than one First_Pragma/Next_Pragma
-- flagged as inherited for distinction purposes.
if Present (Prag) then
- New_Prag := New_Copy_Tree (Prag);
- Set_Is_Inherited_Pragma (New_Prag);
-
- Add_Contract_Item (New_Prag, Subp);
+ Add_Contract_Item (New_Copy_Tree (Prag), Subp);
end if;
end Inherit_Pragma;
Is_Ignored_Ghost_Pragma,
Is_Implicit_With,
Is_In_Discriminant_Check,
- Is_Inherited_Pragma,
Is_Initialization_Block,
Is_Interpolated_String_Literal,
Is_Known_Guaranteed_ABE,
Sm (Is_Generic_Contract_Pragma, Flag),
Sm (Is_Ignored, Flag),
Sm (Is_Ignored_Ghost_Pragma, Flag),
- Sm (Is_Inherited_Pragma, Flag),
Sm (Next_Pragma, Node_Id),
Sm (Next_Rep_Item, Node_Id),
Sm (Uneval_Old_Accept, Flag),
-- discriminant check has a correct value cannot be performed in this
-- case (or the discriminant check may be optimized away).
- -- Is_Inherited_Pragma
- -- This flag is set in an N_Pragma node that appears in a N_Contract node
- -- to indicate that the pragma has been inherited from a parent context.
-
-- Is_Initialization_Block
-- Defined in block nodes. Set when the block statement was created by
-- the finalization machinery to wrap initialization statements. This
-- Next_Rep_Item
-- Is_Generic_Contract_Pragma
-- Is_Checked_Ghost_Pragma
- -- Is_Inherited_Pragma
-- Is_Analyzed_Pragma
-- Class_Present set if from Aspect with 'Class
-- Uneval_Old_Accept