+2018-07-31 Piotr Trojanek <trojanek@adacore.com>
+
+ * exp_aggr.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb,
+ repinfo.adb, sem_ch9.adb: Minor replace Ekind membership tests
+ with a wrapper routine.
+
2018-07-31 Piotr Trojanek <trojanek@adacore.com>
* ali.adb (Known_ALI_Lines): Remove 'F' as a prefix for lines
(Nkind (Expr_Q) = N_Type_Conversion
or else
(Is_Entity_Name (Expr_Q)
- and then Ekind (Entity (Expr_Q)) in Formal_Kind))
+ and then Is_Formal (Entity (Expr_Q))))
and then Tagged_Type_Expansion
then
Static_Components := False;
Sel_Comp := Parent (Sel_Comp);
end loop;
- return Ekind (Entity (Prefix (Sel_Comp))) in Formal_Kind;
+ return Is_Formal (Entity (Prefix (Sel_Comp)));
end Prefix_Is_Formal_Parameter;
-- Start of processing for Has_Inferable_Discriminants
and then (Nkind_In (Exp, N_Type_Conversion,
N_Unchecked_Type_Conversion)
or else (Is_Entity_Name (Exp)
- and then Ekind (Entity (Exp)) in Formal_Kind))
+ and then Is_Formal (Entity (Exp))))
then
-- When the return type is limited, perform a check that the tag of
-- the result is the same as the tag of the return type.
or else Nkind_In (Exp, N_Type_Conversion,
N_Unchecked_Type_Conversion)
or else (Is_Entity_Name (Exp)
- and then Ekind (Entity (Exp)) in Formal_Kind)
+ and then Is_Formal (Entity (Exp)))
or else Scope_Depth (Enclosing_Dynamic_Scope (Etype (Exp))) >
Scope_Depth (Enclosing_Dynamic_Scope (Scope_Id)))
then
-- parameters may end up being marked as not coming from source
-- although they are. Take these into account specially.
- elsif GNATprove_Mode and then Ekind (E) in Formal_Kind then
+ elsif GNATprove_Mode and then Is_Formal (E) then
Ent := E;
-- Entity does not come from source, but is a derived subprogram and
List_Entities (E, Bytes_Big_Endian, True);
- elsif Ekind (E) in Formal_Kind and then In_Subprogram then
+ elsif Is_Formal (E) and then In_Subprogram then
null;
elsif Ekind_In (E, E_Entry,
if Object_Access_Level (Target_Obj) >= Scope_Depth (Outer_Ent)
and then
(not Is_Entity_Name (Target_Obj)
- or else Ekind (Entity (Target_Obj)) not in Formal_Kind
+ or else not Is_Formal (Entity (Target_Obj))
or else Enclosing /= Scope (Entity (Target_Obj)))
then
Error_Msg_N