sem_util.adb (Subprogram_Name): Append suffix for overloaded subprograms.

2017-11-08  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.adb (Subprogram_Name): Append suffix for overloaded
	subprograms.

From-SVN: r254529
This commit is contained in:
Arnaud Charlet 2017-11-08 13:52:43 +00:00 committed by Pierre-Marie de Rodat
parent e5148da096
commit 879e92d057
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-11-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Subprogram_Name): Append suffix for overloaded
subprograms.
2017-11-08 Yannick Moy <moy@adacore.com>
* sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report

View File

@ -23357,6 +23357,28 @@ package body Sem_Util is
Append_Entity_Name (Buf, Ent);
-- Append homonym number if needed
if Nkind (N) in N_Entity and then Has_Homonym (N) then
declare
H : Entity_Id := Homonym (N);
Nr : Nat := 1;
begin
while Present (H) loop
if Scope (H) = Scope (N) then
Nr := Nr + 1;
end if;
H := Homonym (H);
end loop;
if Nr > 1 then
Append (Buf, '#');
Append (Buf, Nr);
end if;
end;
end if;
-- Append source location of Ent to Buf so that the string will
-- look like "subp:file:line:col".