+2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
+ sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
+ reformatting.
+
2019-07-09 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
Make_Defining_Identifier (Eloc,
New_External_Name (Chars (Ename), 'A', Num_Accept));
- -- Link the acceptor to the original receiving entry.
+ -- Link the acceptor to the original receiving entry
Set_Ekind (PB_Ent, E_Procedure);
Set_Receiving_Entry (PB_Ent, Eent);
-- to Build_Simple_Entry_Call.
if Is_Disp_Select then
- -- Compute the delay at this stage because the evaluation of
- -- its expression must not occur earlier (see ACVC C97302A).
+
+ -- Compute the delay at this stage because the evaluation of its
+ -- expression must not occur earlier (see ACVC C97302A).
Append_To (Stmts,
Make_Assignment_Statement (Loc,
-- Ditto for a package declaration or a full type declaration, etc.
- elsif
- (Nkind (N) = N_Package_Declaration and then N /= Specification (N))
+ elsif (Nkind (N) = N_Package_Declaration
+ and then N /= Specification (N))
or else Nkind (N) in N_Declaration
or else Nkind (N) in N_Renaming_Declaration
then
-- is necessary both for passing legality checks in GNAT and for precise
-- analysis in GNATprove.
- if GNATprove_Mode
- and then not Is_Static_Expression (Exp)
- then
+ if GNATprove_Mode and then not Is_Static_Expression (Exp) then
return;
end if;
-- This subtype indication may be used later for constraint checks
-- we better make sure that if a variable was used as a bound of
- -- of the original slice, its value is frozen.
+ -- the original slice, its value is frozen.
Evaluate_Slice_Bounds (Exp);
end;
Set_Assignment_OK (Res, Assignment_OK (Exp));
- -- Preserve the Do_Range_Check flag in all copies.
+ -- Preserve the Do_Range_Check flag in all copies
Set_Do_Range_Check (Res, Do_Range_Check (Exp));
-- Note that formals are not annotated so we skip them here
- elsif Ekind_In (E, E_Variable, E_Constant, E_Loop_Parameter)
+ elsif Ekind_In (E, E_Constant,
+ E_Loop_Parameter,
+ E_Variable)
then
if List_Representation_Info >= 2 then
List_Object_Info (E);
-- Recurse into bodies
- elsif Ekind_In (E, E_Protected_Type,
- E_Task_Type,
+ elsif Ekind_In (E, E_Package_Body,
+ E_Protected_Body,
+ E_Protected_Type,
E_Subprogram_Body,
- E_Package_Body,
E_Task_Body,
- E_Protected_Body)
+ E_Task_Type)
then
List_Entities (E, Bytes_Big_Endian);
-- such as a parent generic within the body of a generic child.
if not Is_Entity_Name (Actual)
- or else not Ekind_In (Entity (Actual), E_Package, E_Generic_Package)
+ or else not Ekind_In (Entity (Actual), E_Generic_Package, E_Package)
then
Error_Msg_N
("expect package instance to instantiate formal", Actual);
("previous error in declaration of formal package", Actual);
Abandon_Instantiation (Actual);
- elsif
- Is_Instance_Of (Parent_Spec, Get_Instance_Of (Gen_Parent))
- then
+ elsif Is_Instance_Of (Parent_Spec, Get_Instance_Of (Gen_Parent)) then
null;
- -- If this is the current instance of an enclosing generic, that
- -- unit is the generic package we need.
+ -- If this is the current instance of an enclosing generic, that unit
+ -- is the generic package we need.
elsif In_Open_Scopes (Actual_Pack)
and then Ekind (Actual_Pack) = E_Generic_Package
Actual_Ent := First_Entity (Actual_Pack);
Actual_Of_Formal :=
- First (Visible_Declarations (Specification (Analyzed_Formal)));
+ First (Visible_Declarations (Specification (Analyzed_Formal)));
while Present (Actual_Ent)
and then Actual_Ent /= First_Private_Entity (Actual_Pack)
loop
Mark_Rewrite_Insertion (Decl);
else
- Error_Pragma_Arg ("no matching type found for pragma%",
- Arg2);
+ Error_Pragma_Arg ("no matching type found for pragma%", Arg2);
end if;
end Process_Import_Predefined_Type;
declare
I : Interp_Index;
It : Interp;
+
begin
Get_First_Interp (N, I, It);
and then Is_Overloaded (Opnd)
then
Resolve_Equality_Op (Opnd, B_Typ);
+
if Ekind (Entity (Opnd)) = E_Function then
Rewrite_Operator_As_Call (Opnd, Entity (Opnd));
end if;
Move_Expression_List (Expressions (Expr));
- -- Handle the named components next.
+ -- Handle the named components next
while Present (Assoc) loop
CL := Choices (Assoc);
if Is_Deep (Etype (Expression (Assoc)))
and then not Is_Singleton_Choice (CL)
then
- Error_Msg_F ("singleton choice required"
- & " to prevent aliasing", First (CL));
+ Error_Msg_F
+ ("singleton choice required to prevent aliasing",
+ First (CL));
end if;
-- The subexpressions of an aggregate are moved as part
Outer : Entity_Id) return Boolean
is
Curr : Entity_Id := Inner;
+
begin
- -- Similar to the above, but check for scope identity first.
+ -- Similar to the above, but check for scope identity first
while Present (Curr) and then Curr /= Standard_Standard loop
if Curr = Outer then