]> gcc.gnu.org Git - gcc.git/commit
ada: Improve location of error messages in instantiations
authorYannick Moy <moy@adacore.com>
Thu, 27 Oct 2022 10:54:22 +0000 (12:54 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 14 Nov 2022 13:46:49 +0000 (14:46 +0100)
commit04381a1bf49096ecc719bdf89a1f91a7554ca03a
treee8f29c356d78c6ff7d3d0550ccbbd225bb4b106a
parentc9d317bcd676256a4d982fa335f15a9fc7e39ade
ada: Improve location of error messages in instantiations

When flag -gnatdF is used, source code lines are displayed to point
the location of errors. The code of the instantiation was displayed
in case of errors inside generic instances, which was not precise.
Now the code inside the generic is displayed.

gcc/ada/

* errout.adb (Error_Msg_Internal): Store span for Optr field, and
adapt to new type of Optr.
(Finalize. Output_JSON_Message, Remove_Warning_Messages): Adapt to
new type of Optr.
(Output_Messages): Use Optr instead of Sptr to display code
snippet closer to error.
* erroutc.adb (dmsg): Adapt to new type of Optr.
* erroutc.ads (Error_Msg_Object): Make Optr a span like Sptr.
* errutil.adb (Error_Msg): Likewise.
gcc/ada/errout.adb
gcc/ada/erroutc.adb
gcc/ada/erroutc.ads
gcc/ada/errutil.adb
This page took 0.072089 seconds and 6 git commands to generate.