Comments
Patch
===================================================================
@@ -7142,13 +7142,12 @@
end if;
-- At this point either both nodes came from source or we approximated
- -- their source locations through neighbouring source statements.
+ -- their source locations through neighbouring source statements. There
+ -- is no need to look at the top level locations of P1 and P2 because
+ -- both nodes are in the same list and whether the enclosing context is
+ -- instantiated is irrelevant.
- if Top_Level_Location (Sloc (P1)) < Top_Level_Location (Sloc (P2)) then
- return True;
- else
- return False;
- end if;
+ return Sloc (P1) < Sloc (P2);
end Earlier;
----------------------