Commit 879e92d0 by Arnaud Charlet Committed by Pierre-Marie de Rodat

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
parent e5148da0
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> 2017-11-08 Yannick Moy <moy@adacore.com>
* sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
......
...@@ -23357,6 +23357,28 @@ package body Sem_Util is ...@@ -23357,6 +23357,28 @@ package body Sem_Util is
Append_Entity_Name (Buf, Ent); 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 -- Append source location of Ent to Buf so that the string will
-- look like "subp:file:line:col". -- look like "subp:file:line:col".
......
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