aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-10-15 12:29:47 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-15 12:29:47 +0200
commit99f97947832b35ee949d5779faa3f6377c63349d (patch)
tree958292cf8cae13fae95f12df2bcb8c21cd279461 /gcc/ada/lib-xref.adb
parentb9ec846384e6908fe4d9aff0703c5ae320d3f366 (diff)
downloadgcc-99f97947832b35ee949d5779faa3f6377c63349d.zip
gcc-99f97947832b35ee949d5779faa3f6377c63349d.tar.gz
gcc-99f97947832b35ee949d5779faa3f6377c63349d.tar.bz2
[multiple changes]
2013-10-15 Robert Dewar <dewar@adacore.com> * sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads: Minor reformatting. 2013-10-15 Eric Botcazou <ebotcazou@adacore.com> * targparm.ads: Fix minor typo in comment. 2013-10-15 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb: handle full views that are derived from private types. * sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS mode: the elaboration entity is not in the source, and plays no role in semantic analysis. Minor reformatting. From-SVN: r203594
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 562b709..972d963 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1307,9 +1307,23 @@ package body Lib.Xref is
Right := '>';
end if;
- -- If non-derived ptr, get directly designated type.
+ -- If the completion of a private type is itself a derived
+ -- type, we need the parent of the full view.
+
+ elsif Is_Private_Type (Tref)
+ and then Present (Full_View (Tref))
+ and then Etype (Full_View (Tref)) /= Full_View (Tref)
+ then
+ Tref := Etype (Full_View (Tref));
+
+ if Left /= '(' then
+ Left := '<';
+ Right := '>';
+ end if;
+
+ -- If non-derived pointer, get directly designated type.
-- If the type has a full view, all references are on the
- -- partial view, that is seen first.
+ -- partial view that is seen first.
elsif Is_Access_Type (Tref) then
Tref := Directly_Designated_Type (Tref);