Commit 11560bcc by Thomas Quinot Committed by Arnaud Charlet

sem_ch8.ads, [...] (Find_Type, [...]): Use correct entity as denoted entity for…

sem_ch8.ads, [...] (Find_Type, [...]): Use correct entity as denoted entity for the selector of the rewritten node.

2007-08-14  Thomas Quinot  <quinot@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
	reference): Use correct entity as denoted entity for the selector of
	the rewritten node.
	(Find_Direct_Name): Add comment about Generate_Reference incorrectly
	setting the Referenced_As_LHS flag for entities that are implicitly
	dereferenced.
	(Find_Type): If the type is an internally generated incomplete type,
	mark the full view as referenced, to prevent spurious warnings.
	(Find_Selected_Component, Has_Components): Handle properly non-limited
	views that are themselves incomplete types.
	Handle interfaces visible through limited-with clauses.
	(Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
	subprogram generic actual for which we have generated a renaming.
	Warn when the renaming introduces a homonym of
	the renamed entity, and the renamed entity is directly visible.

From-SVN: r127446
parent fe685905
......@@ -76,15 +76,15 @@ package Sem_Ch8 is
-- appearing in context clauses.
procedure Find_Direct_Name (N : Node_Id);
-- Given a direct name (Identifier or Operator_Symbol), this routine
-- scans the homonym chain for the name searching for corresponding
-- visible entities to find the referenced entity (or in the case of
-- overloading), entities. On return, the Entity, and Etype fields
-- are set. In the non-overloaded case, these are the correct final
-- entries. In the overloaded case, Is_Overloaded is set, Etype and
-- Entity refer to an arbitrary element of the overloads set, and
-- an appropriate list of entries has been made in the overload
-- interpretation table (to be disambiguated in the resolve phase).
-- Given a direct name (Identifier or Operator_Symbol), this routine scans
-- the homonym chain for the name searching for corresponding visible
-- entities to find the referenced entity (or in the case of overloading),
-- entities. On return, the Entity and Etype fields are set. In the
-- non-overloaded case, these are the correct final entries. In the
-- overloaded case, Is_Overloaded is set, Etype and Entity refer to an
-- arbitrary element of the overloads set, and an appropriate list of
-- entries has been made in the overload interpretation table (to be
-- disambiguated in the resolve phase).
procedure Find_Selected_Component (N : Node_Id);
-- Resolve various cases of selected components, recognize expanded names
......@@ -93,16 +93,14 @@ package Sem_Ch8 is
-- Perform name resolution, and verify that the name found is that of a
-- type. On return the Entity and Etype fields of the node N are set
-- appropriately. If it is an incomplete type whose full declaration has
-- been seen, they are set to the entity in the full declaration.
-- Similarly, if the type is private, it has received a full declaration,
-- and we are in the private part or body of the package, then the two
-- fields are set to the entity of the full declaration as well. This
-- procedure also provides special processing for Class types as well.
function Get_Full_View (T_Name : Entity_Id) return Entity_Id;
-- If T_Name is an incomplete type and the full declaration has been
-- seen, or is the name of a class_wide type whose root is incomplete.
-- return the corresponding full declaration.
-- been seen, they are set to the entity in the full declaration. If it
-- is an incomplete type associated with an interface visible through a
-- limited-with clause, whose full declaration has been seen, they are
-- set to the entity in the full declaration. Similarly, if the type is
-- private, it has received a full declaration, and we are in the private
-- part or body of the package, then the two fields are set to the entity
-- of the full declaration as well. This procedure also has special
-- processing for 'Class attribute references.
procedure Initialize;
-- Initializes data structures used for visibility analysis. Must be
......
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