Commit 3d581777 by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

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

gcc/ada/

	* einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
	Minor reformatting.

From-SVN: r260571
parent 72cfbeae
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
Minor reformatting.
2018-05-22 Justin Squirek <squirek@adacore.com> 2018-05-22 Justin Squirek <squirek@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
......
...@@ -253,13 +253,13 @@ package body Einfo is ...@@ -253,13 +253,13 @@ package body Einfo is
-- Access_Disp_Table_Elab_Flag Node30 -- Access_Disp_Table_Elab_Flag Node30
-- Anonymous_Object Node30 -- Anonymous_Object Node30
-- Corresponding_Equality Node30 -- Corresponding_Equality Node30
-- Hidden_In_Formal_Instance Elist30
-- Last_Aggregate_Assignment Node30 -- Last_Aggregate_Assignment Node30
-- Static_Initialization Node30 -- Static_Initialization Node30
-- Hidden_In_Formal_Instance Elist30
-- Activation_Record_Component Node31
-- Derived_Type_Link Node31 -- Derived_Type_Link Node31
-- Thunk_Entity Node31 -- Thunk_Entity Node31
-- Activation_Record_Component Node31
-- Corresponding_Function Node32 -- Corresponding_Function Node32
-- Corresponding_Procedure Node32 -- Corresponding_Procedure Node32
......
...@@ -5033,7 +5033,8 @@ package body Exp_Disp is ...@@ -5033,7 +5033,8 @@ package body Exp_Disp is
end if; end if;
end if; end if;
-- Generate: Expanded_Name : constant String := ""; -- Generate:
-- Expanded_Name : constant String := "";
if Global_Discard_Names or else Discard_Names (Typ) then if Global_Discard_Names or else Discard_Names (Typ) then
Append_To (Result, Append_To (Result,
...@@ -5069,28 +5070,29 @@ package body Exp_Disp is ...@@ -5069,28 +5070,29 @@ package body Exp_Disp is
if Expanded_Name /= External_Tag_Name then if Expanded_Name /= External_Tag_Name then
-- Generate: External_Tag_Name : constant String := ""; -- Generate:
-- External_Tag_Name : constant String := "";
if Present (No_Tagged_Streams_Pragma (Typ)) then if Present (No_Tagged_Streams_Pragma (Typ)) then
Append_To (Result, Append_To (Result,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => External_Tag_Name, Defining_Identifier => External_Tag_Name,
Constant_Present => True, Constant_Present => True,
Object_Definition => New_Occurrence_Of Object_Definition =>
(Standard_String, Loc), New_Occurrence_Of (Standard_String, Loc),
Expression => Expression => Make_String_Literal (Loc, "")));
Make_String_Literal (Loc, "")));
-- Generate: -- Generate:
-- External_Tag_Name : constant String := full_qualified_name (typ); -- External_Tag_Name : constant String :=
-- full_qualified_name (typ);
else else
Append_To (Result, Append_To (Result,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => External_Tag_Name, Defining_Identifier => External_Tag_Name,
Constant_Present => True, Constant_Present => True,
Object_Definition => New_Occurrence_Of Object_Definition =>
(Standard_String, Loc), New_Occurrence_Of (Standard_String, Loc),
Expression => Expression =>
Make_String_Literal (Loc, Make_String_Literal (Loc,
Fully_Qualified_Name_String (First_Subtype (Typ))))); Fully_Qualified_Name_String (First_Subtype (Typ)))));
...@@ -5198,8 +5200,7 @@ package body Exp_Disp is ...@@ -5198,8 +5200,7 @@ package body Exp_Disp is
New_Node := New_Node :=
Unchecked_Convert_To (RTE (RE_Cstring_Ptr), Unchecked_Convert_To (RTE (RE_Cstring_Ptr),
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of Prefix => New_Occurrence_Of (External_Tag_Name, Loc),
(External_Tag_Name, Loc),
Attribute_Name => Name_Address)); Attribute_Name => Name_Address));
-- External_Tag of a local tagged type -- External_Tag of a local tagged type
...@@ -5332,8 +5333,8 @@ package body Exp_Disp is ...@@ -5332,8 +5333,8 @@ package body Exp_Disp is
New_Node := New_Node :=
Unchecked_Convert_To (RTE (RE_Cstring_Ptr), Unchecked_Convert_To (RTE (RE_Cstring_Ptr),
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of Prefix =>
(External_Tag_Name, Loc), New_Occurrence_Of (External_Tag_Name, Loc),
Attribute_Name => Name_Address)); Attribute_Name => Name_Address));
else else
Old_Val := Strval (Expr_Value_S (Expression (Def))); Old_Val := Strval (Expr_Value_S (Expression (Def)));
......
...@@ -17981,16 +17981,16 @@ package body Sem_Ch3 is ...@@ -17981,16 +17981,16 @@ package body Sem_Ch3 is
then then
Result := Result :=
Search_Derivation_Levels (Ti, Stored_Constraint (Ti), True); Search_Derivation_Levels (Ti, Stored_Constraint (Ti), True);
else else
declare declare
Td : Entity_Id := Etype (Ti); Td : Entity_Id := Etype (Ti);
begin begin
-- If the parent type is private, the full view may include -- If the parent type is private, the full view may include
-- renamed discriminants, and it is those stored values -- renamed discriminants, and it is those stored values that
-- that may be needed (the partial view never has more -- may be needed (the partial view never has more information
-- information than the full view). -- than the full view).
if Is_Private_Type (Td) and then Present (Full_View (Td)) then if Is_Private_Type (Td) and then Present (Full_View (Td)) then
Td := Full_View (Td); Td := Full_View (Td);
......
...@@ -21267,9 +21267,7 @@ package body Sem_Prag is ...@@ -21267,9 +21267,7 @@ package body Sem_Prag is
end if; end if;
if In_Same_Declarative_Part (Parent (N), Orig_Def) then if In_Same_Declarative_Part (Parent (N), Orig_Def) then
Same_Decl := True; Same_Decl := True;
Set_Is_Pure (Def_Id); Set_Is_Pure (Def_Id);
if not Has_Pragma_Pure_Function (Def_Id) then if not Has_Pragma_Pure_Function (Def_Id) then
...@@ -21289,10 +21287,11 @@ package body Sem_Prag is ...@@ -21289,10 +21287,11 @@ package body Sem_Prag is
Error_Msg_NE Error_Msg_NE
("pragma Pure_Function on& is redundant?r?", ("pragma Pure_Function on& is redundant?r?",
N, Entity (E_Id)); N, Entity (E_Id));
elsif not Same_Decl then elsif not Same_Decl then
Error_Pragma_Arg Error_Pragma_Arg
("pragma% argument must be in same declarative " ("pragma% argument must be in same declarative part",
& "part", Arg1); Arg1);
end if; end if;
end if; end if;
end Pure_Function; end Pure_Function;
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