or else No (Aspect)
-- Do not fold if multiple applicable predicate aspects
- or else Present (Find_Aspect (Subt, Aspect_Static_Predicate))
- or else Present (Find_Aspect (Subt, Aspect_Predicate))
+ or else Has_Aspect (Subt, Aspect_Static_Predicate)
+ or else Has_Aspect (Subt, Aspect_Predicate)
or else Augments_Other_Dynamic_Predicate (Aspect)
or else CodePeer_Mode
then
elsif Is_Array_Type (Typ) and then Null_Record_Present (N) then
Error_Msg_N ("null record forbidden in array aggregate", N);
- elsif Present (Find_Aspect (Typ, Aspect_Aggregate))
+ elsif Has_Aspect (Typ, Aspect_Aggregate)
and then Ekind (Typ) /= E_Record_Type
and then Ada_Version >= Ada_2022
then
-- Verify that prefix can be iterated upon.
if Is_Array_Type (Typ)
- or else Present (Find_Aspect (Typ, Aspect_Default_Iterator))
- or else Present (Find_Aspect (Typ, Aspect_Iterable))
+ or else Has_Aspect (Typ, Aspect_Default_Iterator)
+ or else Has_Aspect (Typ, Aspect_Iterable)
then
null;
else
begin
return Nkind (Exp) = N_Aggregate
- and then Present (Find_Aspect (Etype (Exp), Aspect_Aggregate))
+ and then Has_Aspect (Etype (Exp), Aspect_Aggregate)
and then not Is_Record_Aggregate;
end Is_Container_Aggregate;
-- type has the appropriate user-defined literal aspect.
return (Nkind (N) in N_Numeric_Or_String_Literal
- and then Present (Find_Aspect (Typ, Literal_Aspect_Map (Nkind (N)))))
+ and then Has_Aspect (Typ, Literal_Aspect_Map (Nkind (N))))
or else
(Is_Entity_Name (N)
and then Present (Entity (N))
and then
((Ekind (Entity (N)) = E_Named_Integer
- and then
- Present (Find_Aspect (Typ, Aspect_Integer_Literal)))
+ and then Has_Aspect (Typ, Aspect_Integer_Literal))
or else
(Ekind (Entity (N)) = E_Named_Real
- and then
- Present (Find_Aspect (Typ, Aspect_Real_Literal)))));
+ and then Has_Aspect (Typ, Aspect_Real_Literal))));
end Is_User_Defined_Literal;
--------------------------------------
(Typ : Entity_Id) return Boolean
is
begin
- return Present (Find_Aspect (Typ, Aspect_Designated_Storage_Model));
+ return Has_Aspect (Typ, Aspect_Designated_Storage_Model);
end Has_Designated_Storage_Model_Aspect;
-----------------------------------
function Has_Storage_Model_Type_Aspect (Typ : Entity_Id) return Boolean
is
begin
- return Present (Find_Aspect (Typ, Aspect_Storage_Model_Type));
+ return Has_Aspect (Typ, Aspect_Storage_Model_Type);
end Has_Storage_Model_Type_Aspect;
--------------------------