OSDN Git Service

2008-08-20 Ed Schonberg <schonberg@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Aug 2008 14:27:21 +0000 (14:27 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Aug 2008 14:27:21 +0000 (14:27 +0000)
* sem_prag.adb:
(Analyze_Pragma, case Obsolescent): Add entity information on the pragma
argument for ASIS and navigation use.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139301 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/sem_prag.adb

index 44b5c88..d5d39b9 100644 (file)
@@ -9063,9 +9063,11 @@ package body Sem_Prag is
                if Present (Ename) then
 
                   --  If entity name matches, we are fine
+                  --  Save entity in pragma argument, for ASIS use.
 
                   if Chars (Ename) = Chars (Ent) then
-                     null;
+                     Set_Entity (Ename, Ent);
+                     Generate_Reference (Ent, Ename);
 
                   --  If entity name does not match, only possibility is an
                   --  enumeration literal from an enumeration type declaration.
@@ -9083,6 +9085,8 @@ package body Sem_Prag is
                               "enumeration literal");
 
                         elsif Chars (Ent) = Chars (Ename) then
+                           Set_Entity (Ename, Ent);
+                           Generate_Reference (Ent, Ename);
                            exit;
 
                         else