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

[Ada] Minor reformattings

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
	reformattings.

From-SVN: r260508
parent eaf51442
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
reformattings.
2018-05-22 Justin Squirek <squirek@adacore.com> 2018-05-22 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util. * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
......
...@@ -238,8 +238,8 @@ package body Exp_Ch5 is ...@@ -238,8 +238,8 @@ package body Exp_Ch5 is
Statements => Stats, Statements => Stats,
End_Label => Empty); End_Label => Empty);
-- If the contruct has a specified loop name, preserve it in the -- If the contruct has a specified loop name, preserve it in the new
-- new loop, for possible use in exit statements. -- loop, for possible use in exit statements.
if Present (Identifier (N)) if Present (Identifier (N))
and then Comes_From_Source (Identifier (N)) and then Comes_From_Source (Identifier (N))
......
...@@ -8697,7 +8697,7 @@ package body Freeze is ...@@ -8697,7 +8697,7 @@ package body Freeze is
and then not Is_Imported (Ent) and then not Is_Imported (Ent)
and then not Initialization_Suppressed (Typ) and then not Initialization_Suppressed (Typ)
and then not (Ekind (Ent) = E_Variable and then not (Ekind (Ent) = E_Variable
and then Initialization_Suppressed (Ent)) and then Initialization_Suppressed (Ent))
and then (Has_Non_Null_Base_Init_Proc (Typ) and then (Has_Non_Null_Base_Init_Proc (Typ)
or else Is_Access_Type (Typ) or else Is_Access_Type (Typ)
or else (Normalize_Scalars or else (Normalize_Scalars
......
...@@ -277,9 +277,14 @@ package body Pprint is ...@@ -277,9 +277,14 @@ package body Pprint is
-- Transform given string into the corresponding one in -- Transform given string into the corresponding one in
-- mixed case form. -- mixed case form.
-------------------
-- To_Mixed_Case --
-------------------
function To_Mixed_Case (S : String) return String is function To_Mixed_Case (S : String) return String is
Ucase : Boolean := True;
Result : String (S'Range); Result : String (S'Range);
Ucase : Boolean := True;
begin begin
for J in S'Range loop for J in S'Range loop
if Ucase then if Ucase then
...@@ -294,14 +299,17 @@ package body Pprint is ...@@ -294,14 +299,17 @@ package body Pprint is
return Result; return Result;
end To_Mixed_Case; end To_Mixed_Case;
Id : constant Attribute_Id := Id : constant Attribute_Id :=
Get_Attribute_Id (Attribute_Name (Expr)); Get_Attribute_Id (Attribute_Name (Expr));
-- Always use mixed case for attributes -- Always use mixed case for attributes
Str : constant String :=
Expr_Name (Prefix (Expr)) & "'" Str : constant String :=
& To_Mixed_Case (Get_Name_String Expr_Name (Prefix (Expr))
(Attribute_Name (Expr))); & "'"
& To_Mixed_Case
(Get_Name_String (Attribute_Name (Expr)));
N : Node_Id; N : Node_Id;
Ranges : List_Id; Ranges : List_Id;
......
...@@ -3217,15 +3217,15 @@ package body Sem_Ch4 is ...@@ -3217,15 +3217,15 @@ package body Sem_Ch4 is
or else Nkind (Original_Node (N)) = N_Selected_Component or else Nkind (Original_Node (N)) = N_Selected_Component
or else or else
(Nkind (Original_Node (N)) = N_Indexed_Component (Nkind (Original_Node (N)) = N_Indexed_Component
and then Nkind (Prefix (Original_Node (N))) and then Nkind (Prefix (Original_Node (N))) =
= N_Selected_Component) N_Selected_Component)
or else or else
(Nkind (Parent (N)) = N_Function_Call (Nkind (Parent (N)) = N_Function_Call
and then Is_Array_Type (Etype (Name (N))) and then Is_Array_Type (Etype (Name (N)))
and then Etype (Original_Node (N)) = and then Etype (Original_Node (N)) =
Component_Type (Etype (Name (N))) Component_Type (Etype (Name (N)))
and then Nkind (Original_Node (Parent (N))) and then Nkind (Original_Node (Parent (N))) =
= N_Selected_Component); N_Selected_Component);
-- The first formal must be omitted from the match when trying to find -- The first formal must be omitted from the match when trying to find
-- a primitive operation that is a possible interpretation, and also -- a primitive operation that is a possible interpretation, and also
......
...@@ -13011,18 +13011,15 @@ package body Sem_Res is ...@@ -13011,18 +13011,15 @@ package body Sem_Res is
-- Here we have a real conversion error -- Here we have a real conversion error
else else
-- Check for missing regular with_clause when only a limited view of
-- target is available.
-- Check for missing regular with_clause when only a limited view if From_Limited_With (Opnd_Type) and then In_Package_Body then
-- of target is available.
if From_Limited_With (Opnd_Type)
and then In_Package_Body
then
Conversion_Error_NE Conversion_Error_NE
("invalid conversion, not compatible with limited view of }", ("invalid conversion, not compatible with limited view of }",
N, Opnd_Type); N, Opnd_Type);
Conversion_Error_NE ("\add with_clause for& to current unit!", N, Conversion_Error_NE
Scope (Opnd_Type)); ("\add with_clause for& to current unit!", N, Scope (Opnd_Type));
elsif Is_Access_Type (Opnd_Type) elsif Is_Access_Type (Opnd_Type)
and then From_Limited_With (Designated_Type (Opnd_Type)) and then From_Limited_With (Designated_Type (Opnd_Type))
...@@ -13030,8 +13027,9 @@ package body Sem_Res is ...@@ -13030,8 +13027,9 @@ package body Sem_Res is
then then
Conversion_Error_NE Conversion_Error_NE
("invalid conversion, not compatible with }", N, Opnd_Type); ("invalid conversion, not compatible with }", N, Opnd_Type);
Conversion_Error_NE ("\add with_clause for& to current unit!", N, Conversion_Error_NE
Scope (Designated_Type (Opnd_Type))); ("\add with_clause for& to current unit!",
N, Scope (Designated_Type (Opnd_Type)));
else else
Conversion_Error_NE Conversion_Error_NE
......
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