function Replace_Target (N : Node_Id) return Traverse_Result;
-- Replace occurrences of the target name by the proper entity: either
-- the entity of the LHS in simple cases, or the formal of the
- -- constructed procedure otherwise.
+ -- constructed procedure otherwise. Mark all nodes as Analyzed=False
+ -- so reanalysis will occur.
--------------------
-- Replace_Target --
begin
if Nkind (N) = N_Target_Name then
Rewrite (N, New_Occurrence_Of (Ent, Sloc (N)));
-
- -- The expression will be reanalyzed when the enclosing assignment
- -- is reanalyzed, so reset the entity, which may be a temporary
- -- created during analysis, e.g. a loop variable for an iterated
- -- component association. However, if entity is callable then
- -- resolution has established its proper identity (including in
- -- rewritten prefixed calls) so we must preserve it.
-
- elsif Is_Entity_Name (N) then
- if Present (Entity (N))
- and then not Is_Overloadable (Entity (N))
- then
- Set_Entity (N, Empty);
- end if;
end if;
Set_Analyzed (N, False);
-- Has_Target_Names
-- Present in assignment statements. Indicates that the RHS contains
- -- target names (see AI12-0125-3) and must be expanded accordingly.
+ -- target names ("@" -- see AI12-0125-3).
-- Has_Wide_Character
-- Present in string literals, set if any wide character (i.e. character