[Ada] Fixes in the use of spans for error locations
authorYannick Moy <moy@adacore.com>
Fri, 11 Dec 2020 10:32:07 +0000 (11:32 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 29 Apr 2021 08:00:42 +0000 (04:00 -0400)
commit2baa4614c8f91015f06b69f09f3ce6360a77c5a8
tree9b288ce29ccdbaca2f9bf6c743bdeb1b9b4c8bb0
parent4d7c874e2c64ebf7631049ace642d246843febae
[Ada] Fixes in the use of spans for error locations

gcc/ada/

* errout.adb (Error_Msg_NEL): Extract span from node.
(First_And_Last_Nodes): Use spans for subtype indications and
attribute definition clauses.
(Write_Source_Code_Lines): Fix for tabulation characters. Change
output for large spans to skip intermediate lines.
* sem_case.adb (Check_Choice_Set): Report duplicate choice on
the Original_Node for the case.
(Generic_Check_Choices): Set the Original_Node for the rewritten
case, so that the subtree used in spans has the correct
locations.
gcc/ada/errout.adb
gcc/ada/sem_case.adb