Commit dd3b3672 by Arnaud Charlet

[multiple changes]

2013-04-24  Robert Dewar  <dewar@adacore.com>

	* gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
	reformatting.

2013-04-24  Yannick Moy  <moy@adacore.com>

	* sem_ch6.adb (Analyze_Generic_Subprogram_Body,
	Analyze_Subprogram_Body_Helper): Reset contract node to Empty
	before setting entity to E_Subprogram_Body.
	* sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
	Empty before setting entity to E_Subprogram_Body.

From-SVN: r198238
parent b5bdffcc
2013-04-24 Robert Dewar <dewar@adacore.com>
* gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
reformatting.
2013-04-24 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Generic_Subprogram_Body,
Analyze_Subprogram_Body_Helper): Reset contract node to Empty
before setting entity to E_Subprogram_Body.
* sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
Empty before setting entity to E_Subprogram_Body.
2013-04-24 Vincent Celier <celier@adacore.com> 2013-04-24 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Document new gnatls switch -aPdir. * gnat_ugn.texi: Document new gnatls switch -aPdir.
......
...@@ -1766,13 +1766,10 @@ begin ...@@ -1766,13 +1766,10 @@ begin
(Root_Environment.Project_Path, (Root_Environment.Project_Path,
Argv (Argv'First + 3 .. Argv'Last)); Argv (Argv'First + 3 .. Argv'Last));
-- Pass -aPdir to gnatls -- Pass -aPdir to gnatls, but not to other tools
if The_Command = List then if The_Command = List then
Arg_Num := Arg_Num + 1; Arg_Num := Arg_Num + 1;
-- but not to other tools
else else
Remove_Switch (Arg_Num); Remove_Switch (Arg_Num);
end if; end if;
......
...@@ -1252,8 +1252,7 @@ procedure Gnatls is ...@@ -1252,8 +1252,7 @@ procedure Gnatls is
procedure Scan_Ls_Arg (Argv : String) is procedure Scan_Ls_Arg (Argv : String) is
FD : File_Descriptor; FD : File_Descriptor;
Len : Integer; Len : Integer;
OK : Boolean;
OK : Boolean;
begin begin
pragma Assert (Argv'First = 1); pragma Assert (Argv'First = 1);
......
...@@ -1335,7 +1335,7 @@ package body Sem_Ch13 is ...@@ -1335,7 +1335,7 @@ package body Sem_Ch13 is
Chars => Chars (Id), Chars => Chars (Id),
Expression => Relocate_Node (Expr)); Expression => Relocate_Node (Expr));
-- If the address is specified we treat the entity as -- If the address is specified, then we treat the entity as
-- referenced, to avoid spurious warnings. This is analogous -- referenced, to avoid spurious warnings. This is analogous
-- to what is done with an attribute definition clause, but -- to what is done with an attribute definition clause, but
-- here we don't want to generate a reference because this -- here we don't want to generate a reference because this
......
...@@ -1107,6 +1107,7 @@ package body Sem_Ch6 is ...@@ -1107,6 +1107,7 @@ package body Sem_Ch6 is
-- Visible generic entity is callable within its own body -- Visible generic entity is callable within its own body
Set_Ekind (Gen_Id, Ekind (Body_Id)); Set_Ekind (Gen_Id, Ekind (Body_Id));
Set_Contract (Body_Id, Empty);
Set_Ekind (Body_Id, E_Subprogram_Body); Set_Ekind (Body_Id, E_Subprogram_Body);
Set_Convention (Body_Id, Convention (Gen_Id)); Set_Convention (Body_Id, Convention (Gen_Id));
Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Gen_Id)); Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Gen_Id));
...@@ -2902,6 +2903,7 @@ package body Sem_Ch6 is ...@@ -2902,6 +2903,7 @@ package body Sem_Ch6 is
end if; end if;
Set_Corresponding_Body (Unit_Declaration_Node (Spec_Id), Body_Id); Set_Corresponding_Body (Unit_Declaration_Node (Spec_Id), Body_Id);
Set_Contract (Body_Id, Empty);
Set_Ekind (Body_Id, E_Subprogram_Body); Set_Ekind (Body_Id, E_Subprogram_Body);
Set_Scope (Body_Id, Scope (Spec_Id)); Set_Scope (Body_Id, Scope (Spec_Id));
Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Spec_Id)); Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Spec_Id));
......
...@@ -2435,6 +2435,7 @@ package body Sem_Ch8 is ...@@ -2435,6 +2435,7 @@ package body Sem_Ch8 is
-- constructed later at the freeze point, so indicate that the -- constructed later at the freeze point, so indicate that the
-- completion has not been seen yet. -- completion has not been seen yet.
Set_Contract (New_S, Empty);
Set_Ekind (New_S, E_Subprogram_Body); Set_Ekind (New_S, E_Subprogram_Body);
New_S := Rename_Spec; New_S := Rename_Spec;
Set_Has_Completion (Rename_Spec, False); Set_Has_Completion (Rename_Spec, False);
......
...@@ -274,6 +274,7 @@ package body Xref_Lib is ...@@ -274,6 +274,7 @@ package body Xref_Lib is
declare declare
File_Name : String := Entity (File_Start .. Line_Start - 1); File_Name : String := Entity (File_Start .. Line_Start - 1);
begin begin
Osint.Canonical_Case_File_Name (File_Name); Osint.Canonical_Case_File_Name (File_Name);
File_Ref := Add_To_Xref_File (File_Name, Visited => True); File_Ref := Add_To_Xref_File (File_Name, Visited => True);
......
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