Commit b5c8da6b by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

2019-07-03  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
	sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.

From-SVN: r272973
parent c4487c3b
2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
* bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
2019-07-03 Bob Duff <duff@adacore.com>
* par-ch3.adb (P_Defining_Identifier): Call
......
......@@ -1811,7 +1811,7 @@ package body Bindgen is
-- with a pragma Volatile in order to tell the compiler to preserve
-- this variable at any level of optimization.
-- CodePeer and CCG do not need this extra code on the other hand.
-- CodePeer and CCG do not need this extra code on the other hand
if Bind_Main_Program
and then not CodePeer_Mode
......
......@@ -2381,16 +2381,16 @@ package body Inline is
-- When generating C code, declare _Result, which may be used in the
-- inlined _Postconditions procedure to verify the return value.
procedure Make_Loop_Labels_Unique (Stats : Node_Id);
-- When compiling for CCG and performing front-end inlining, replace
-- loop names and references to them so that they do not conflict
-- with homographs in the current subprogram.
procedure Make_Exit_Label;
-- Build declaration for exit label to be used in Return statements,
-- sets Exit_Lab (the label node) and Lab_Decl (corresponding implicit
-- declaration). Does nothing if Exit_Lab already set.
procedure Make_Loop_Labels_Unique (HSS : Node_Id);
-- When compiling for CCG and performing front-end inlining, replace
-- loop names and references to them so that they do not conflict with
-- homographs in the current subprogram.
function Process_Formals (N : Node_Id) return Traverse_Result;
-- Replace occurrence of a formal with the corresponding actual, or the
-- thunk generated for it. Replace a return statement with an assignment
......@@ -2483,9 +2483,7 @@ package body Inline is
-- Make_Loop_Labels_Unique --
-----------------------------
procedure Make_Loop_Labels_Unique (Stats : Node_Id) is
S : Node_Id;
procedure Make_Loop_Labels_Unique (HSS : Node_Id) is
function Process_Loop (N : Node_Id) return Traverse_Result;
------------------
......@@ -2499,8 +2497,7 @@ package body Inline is
if Nkind (N) = N_Loop_Statement
and then Present (Identifier (N))
then
-- Create new external name for loop. and update the
-- Create new external name for loop and update the
-- corresponding entity.
Id := Entity (Identifier (N));
......@@ -2510,9 +2507,8 @@ package body Inline is
elsif Nkind (N) = N_Exit_Statement
and then Present (Name (N))
then
-- The exit statement must name an enclosing loop, whose
-- name has already been updated.
-- The exit statement must name an enclosing loop, whose name
-- has already been updated.
Set_Chars (Name (N), Chars (Entity (Name (N))));
end if;
......@@ -2522,12 +2518,18 @@ package body Inline is
procedure Update_Loop_Names is new Traverse_Proc (Process_Loop);
-- Local variables
Stmt : Node_Id;
-- Start of processing for Make_Loop_Labels_Unique
begin
if Modify_Tree_For_C then
S := First (Statements (Stats));
while Present (S) loop
Update_Loop_Names (S);
Next (S);
Stmt := First (Statements (HSS));
while Present (Stmt) loop
Update_Loop_Names (Stmt);
Next (Stmt);
end loop;
end if;
end Make_Loop_Labels_Unique;
......
......@@ -6198,8 +6198,8 @@ package body Sem_Ch12 is
function Is_Defaulted (Param : Entity_Id) return Boolean;
-- If the formql package has partly box-initialized formals, skip
-- conformace check for these formals. Previously the code assumed
-- that boc initialization for a formal package applied to all
-- its formal parameters.
-- that boc initialization for a formal package applied to all its
-- formal parameters.
function Same_Instantiated_Constant (E1, E2 : Entity_Id) return Boolean;
-- The formal may come from a nested formal package, and the actual may
......@@ -6257,9 +6257,11 @@ package body Sem_Ch12 is
function Is_Defaulted (Param : Entity_Id) return Boolean is
Assoc : Node_Id;
begin
Assoc := First (Generic_Associations
(Parent (Associated_Formal_Package (Actual_Pack))));
Assoc :=
First (Generic_Associations (Parent
(Associated_Formal_Package (Actual_Pack))));
while Present (Assoc) loop
if Nkind (Assoc) = N_Others_Choice then
......
......@@ -9328,8 +9328,8 @@ package body Sem_Ch13 is
Analyze (End_Decl_Expr);
Set_Is_Frozen (Ent, True);
-- If the end of declarations comes before any other freeze
-- point, the Freeze_Expr is not analyzed: no check needed.
-- If the end of declarations comes before any other freeze point,
-- the Freeze_Expr is not analyzed: no check needed.
if Analyzed (Freeze_Expr) and then not In_Instance then
Check_Overloaded_Name;
......@@ -9340,13 +9340,10 @@ package body Sem_Ch13 is
-- All other cases
else
-- In a generic context freeze nodes are not always generated, so
-- analyze the expression now.
-- In a generic context freeze nodes are not always generated,
-- so analyze the expression now.
if not Analyzed (Freeze_Expr)
and then Inside_A_Generic
then
if not Analyzed (Freeze_Expr) and then Inside_A_Generic then
Preanalyze (Freeze_Expr);
end if;
......
......@@ -618,14 +618,18 @@ package body Styleg is
begin
if Style_Check_Mixed_Case_Decls then
case Determine_Token_Casing is
when All_Upper_Case | All_Lower_Case =>
when All_Lower_Case
| All_Upper_Case
=>
Error_Msg_SC -- CODEFIX
("(style) bad capitalization, mixed case required");
-- The Unknown case is something like A_B_C, which is both all
-- caps and mixed case.
when Mixed_Case | Unknown =>
when Mixed_Case
| Unknown
=>
null; -- OK
end case;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment