diff options
author | Yannick Moy <moy@adacore.com> | 2022-10-27 12:54:22 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-11-14 14:46:49 +0100 |
commit | 04381a1bf49096ecc719bdf89a1f91a7554ca03a (patch) | |
tree | e8f29c356d78c6ff7d3d0550ccbbd225bb4b106a /gcc/ada/erroutc.ads | |
parent | c9d317bcd676256a4d982fa335f15a9fc7e39ade (diff) | |
download | gcc-04381a1bf49096ecc719bdf89a1f91a7554ca03a.zip gcc-04381a1bf49096ecc719bdf89a1f91a7554ca03a.tar.gz gcc-04381a1bf49096ecc719bdf89a1f91a7554ca03a.tar.bz2 |
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.
Diffstat (limited to 'gcc/ada/erroutc.ads')
-rw-r--r-- | gcc/ada/erroutc.ads | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/erroutc.ads b/gcc/ada/erroutc.ads index 7957228..c992bba 100644 --- a/gcc/ada/erroutc.ads +++ b/gcc/ada/erroutc.ads @@ -209,7 +209,7 @@ package Erroutc is -- will be posted. Note that an error placed on an instantiation will -- have Sptr pointing to the instantiation point. - Optr : Source_Ptr; + Optr : Source_Span; -- Flag location used in the call to post the error. This is the same as -- Sptr, except when an error is posted on a particular instantiation of -- a generic. In such a case, Sptr will point to the original source |