diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-02-11 00:43:41 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-23 09:50:58 +0200 |
commit | 0b369aed43e622b0cf67879e84e4b4adf401b350 (patch) | |
tree | de241d6885a7d245e95f060f1075755050ba4817 /gcc/ada/sem_ch3.adb | |
parent | 53ed0028adacb4e9c033b236805ae409823178ab (diff) | |
download | gcc-0b369aed43e622b0cf67879e84e4b4adf401b350.zip gcc-0b369aed43e622b0cf67879e84e4b4adf401b350.tar.gz gcc-0b369aed43e622b0cf67879e84e4b4adf401b350.tar.bz2 |
ada: Fix expression pretty-printer for SPARK counterexamples
The expression pretty-printer that is used for SPARK counterexamples was
essentially duplicating the logic of First_Node/Last_Node and
First_Sloc/Last_Sloc routines. Now it simply reuses those routines.
gcc/ada/
* errout.adb
(Paren_Required): New subsidiary routine for better handling of
parentheses in First_Node/Last_Node.
(First_Sloc, Last_Sloc): Use Get_Source_File_Index to correctly
handle generic instances and inlined subprograms; tune handling of
parentheses; improve handling of literals.
* pprint.adb (Expression_Image): Simplify using
First_Sloc/Last_Sloc.
* sem_ch6.adb (Analyze_Expression_Function): Remove parenthesis
when relocating expression from expression function to simple
return statement.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
0 files changed, 0 insertions, 0 deletions