If a child subprogram has no previous spec, treat a reference to its formals
(such as a parameter association) as coming from source, in order to generate
the proper references and enable gps navigation between reference and
declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
2012-10-02 Ed Schonberg <[email protected]>
* lib-xref.adb (Generate_Reference): If a child subprogram
has no previous spec, treat a reference to its formals (such
as a parameter association) as coming from source in order to
generate the proper references and enable gps navigation between
reference and declaration.
Index: lib-xref.adb
===================================================================
--- lib-xref.adb (revision 191888)
+++ lib-xref.adb (working copy)
@@ -945,6 +945,13 @@
then
Ent := E;
+ -- Ditto for the formals of such a subprogram
+
+ elsif Is_Overloadable (Scope (E))
+ and then Is_Child_Unit (Scope (E))
+ then
+ Ent := E;
+
-- Record components of discriminated subtypes or derived types must
-- be treated as references to the original component.