Commit 5a15af62 by Ed Schonberg Committed by Geert Bosch

sem_util.adb (Defining_Entity): in case of error...

	* sem_util.adb (Defining_Entity): in case of error, attach created
        entity to specification, so that semantic analysis can proceed.

From-SVN: r46515
parent 2b881d53
2001-10-25 Ed Schonberg <schonber@gnat.com>
* sem_util.adb (Defining_Entity): in case of error, attach created
entity to specification, so that semantic analysis can proceed.
2001-10-25 Robert Dewar <dewar@gnat.com> 2001-10-25 Robert Dewar <dewar@gnat.com>
* sem_util.adb * sem_util.adb
......
...@@ -1103,7 +1103,8 @@ package body Sem_Util is ...@@ -1103,7 +1103,8 @@ package body Sem_Util is
--------------------- ---------------------
function Defining_Entity (N : Node_Id) return Entity_Id is function Defining_Entity (N : Node_Id) return Entity_Id is
K : constant Node_Kind := Nkind (N); K : constant Node_Kind := Nkind (N);
Err : Entity_Id := Empty;
begin begin
case K is case K is
...@@ -1178,13 +1179,16 @@ package body Sem_Util is ...@@ -1178,13 +1179,16 @@ package body Sem_Util is
if Nkind (Nam) in N_Entity then if Nkind (Nam) in N_Entity then
return Nam; return Nam;
-- For Error, make up a name so we can continue -- For Error, make up a name and attach to declaration
-- so we can continue semantic analysis
elsif Nam = Error then elsif Nam = Error then
return Err :=
Make_Defining_Identifier (Sloc (N), Make_Defining_Identifier (Sloc (N),
Chars => New_Internal_Name ('T')); Chars => New_Internal_Name ('T'));
Set_Defining_Unit_Name (N, Err);
return Err;
-- If not an entity, get defining identifier -- If not an entity, get defining identifier
else else
......
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