Commit 96b20738 by Ed Schonberg Committed by Arnaud Charlet

lib-xref.adb (Output_Overridden_Op): Follow several levels of derivation when necessary...

2009-04-29  Ed Schonberg  <schonberg@adacore.com>

	* lib-xref.adb (Output_Overridden_Op): Follow several levels of
	derivation when necessary, to find the user-subprogram that is actally
	being overridden.

From-SVN: r146964
parent 3b4ebfc3
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Output_Overridden_Op): Follow several levels of
derivation when necessary, to find the user-subprogram that is actally
being overridden.
2009-04-29 Robert Dewar <dewar@adacore.com> 2009-04-29 Robert Dewar <dewar@adacore.com>
* sem_util.adb (May_Be_Lvalue): Fix cases involving indexed/selected * sem_util.adb (May_Be_Lvalue): Fix cases involving indexed/selected
......
...@@ -1696,8 +1696,20 @@ package body Lib.Xref is ...@@ -1696,8 +1696,20 @@ package body Lib.Xref is
if No (Old_E) then if No (Old_E) then
return; return;
-- Follow alias chain if one is present
elsif Present (Alias (Old_E)) then elsif Present (Alias (Old_E)) then
-- The subprogram may have been implicitly inherited
-- through several levels of derivation, so find the
-- ultimate (source) ancestor.
Op := Alias (Old_E); Op := Alias (Old_E);
while Present (Alias (Op)) loop
Op := Alias (Op);
end loop;
-- Normal case of no alias present
else else
Op := Old_E; Op := Old_E;
......
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