function User_Defined_Primitive_Equality_Op
(Typ : Entity_Id) return Entity_Id
is
- Enclosing_Scope : constant Node_Id := Scope (Typ);
+ Enclosing_Scope : constant Entity_Id := Scope (Typ);
E : Entity_Id;
begin
for Private_Entities in Boolean loop
-- output in one of these two forms. The result is prepended to the
-- name stored in Name_Buffer.
- function Scope_Contains (Sc : Node_Id; Ent : Entity_Id) return Boolean;
- -- Return whether Ent belong to the Sc scope
+ function Scope_Contains
+ (Outer : Entity_Id;
+ Inner : Entity_Id)
+ return Boolean;
+ -- Return whether Inner belongs to the Outer scope
----------------------------
-- Enable_If_Packed_Array --
elsif Nkind (N) = N_Identifier
and then Scope_Contains (Scope (Entity (N)), Ent)
- and then (Ekind (Entity (N)) = E_Constant
- or else Ekind (Entity (N)) = E_In_Parameter)
+ and then Ekind (Entity (N)) in E_Constant | E_In_Parameter
then
Prepend_String_To_Buffer (Get_Name_String (Chars (Entity (N))));
-- Scope_Contains --
--------------------
- function Scope_Contains (Sc : Node_Id; Ent : Entity_Id) return Boolean is
- Cur : Node_Id := Scope (Ent);
+ function Scope_Contains
+ (Outer : Entity_Id;
+ Inner : Entity_Id)
+ return Boolean
+ is
+ Cur : Entity_Id := Scope (Inner);
begin
while Present (Cur) loop
- if Cur = Sc then
+ if Cur = Outer then
return True;
end if;