-- within an accept statement. For all remaining cases (discriminants,
-- loop parameters) the field is Empty.
+-- Renames_Limited_View
+-- Defined in package entities. True for a package renaming if either
+-- a) the renamed package is not itself a renaming, and the renaming
+-- denotes a limited view of the renamed package (as seen at the
+-- point of the renaming declaration, as opposed to later on when
+-- the renaming is referenced); or
+-- b) the renamed package is itself a renaming and the
+-- Renames_Limited_View flag is True for the renamed package.
+
-- Requires_Overriding
-- Defined in all subprograms and entries. Set for subprograms that
-- require overriding as defined by RM-2005-3.9.3(6/2). Note that this
Relative_Deadline_Variable,
Renamed_In_Spec,
Renamed_Or_Alias, -- Shared among Alias, Renamed_Entity, Renamed_Object
+ Renames_Limited_View,
Requires_Overriding,
Return_Applies_To,
Return_Present,
Sm (Related_Instance, Node_Id),
Sm (Renamed_In_Spec, Flag),
Sm (Renamed_Or_Alias, Node_Id),
+ Sm (Renames_Limited_View, Flag),
Sm (Scope_Depth_Value, Unat),
Sm (SPARK_Aux_Pragma, Node_Id),
Sm (SPARK_Aux_Pragma_Inherited, Flag),
Set_Etype (New_P, Standard_Void_Type);
elsif Present (Renamed_Entity (Old_P))
- and then (From_Limited_With (Renamed_Entity (Old_P))
- or else Has_Limited_View (Renamed_Entity (Old_P)))
+ and then Renames_Limited_View (Old_P)
and then not
Unit_Is_Visible (Cunit (Get_Source_Unit (Renamed_Entity (Old_P))))
then
if Present (Renamed_Entity (Old_P)) then
Set_Renamed_Entity (New_P, Renamed_Entity (Old_P));
+ Set_Renames_Limited_View (New_P, Renames_Limited_View (Old_P));
else
Set_Renamed_Entity (New_P, Old_P);
+ Set_Renames_Limited_View (New_P, From_Limited_With (Old_P));
end if;
-- The package renaming declaration may become Ghost if it renames a
("renaming of limited view of package & not usable in this"
& " context (RM 8.5.3(3.1/2))", Prefix (N), P_Name);
- elsif Has_Limited_View (P_Name)
+ elsif Renames_Limited_View (Entity (Prefix (N)))
and then not Unit_Is_Visible (Cunit (Get_Source_Unit (P_Name)))
and then not Is_Visible_Through_Renamings (P_Name)
then