diff options
author | Yannick Moy <moy@adacore.com> | 2021-01-08 09:38:59 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-04 05:17:35 -0400 |
commit | e243bf23499bf3e38abfd3766e2d261ccf26ec89 (patch) | |
tree | d0a9e97f87d1ec7d5c242345e4db982e1001f26b | |
parent | 9b6a2de07d471c634e63b0bc207fc8db14dd32ed (diff) | |
download | gcc-e243bf23499bf3e38abfd3766e2d261ccf26ec89.zip gcc-e243bf23499bf3e38abfd3766e2d261ccf26ec89.tar.gz gcc-e243bf23499bf3e38abfd3766e2d261ccf26ec89.tar.bz2 |
[Ada] Minor tweak in pretty-printing of expressions
gcc/ada/
* pprint.adb (Expression_Image): Special case for
expression-with-actions.
-rw-r--r-- | gcc/ada/pprint.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/pprint.adb b/gcc/ada/pprint.adb index 696d4b3..5091a86 100644 --- a/gcc/ada/pprint.adb +++ b/gcc/ada/pprint.adb @@ -682,7 +682,7 @@ package body Pprint is end case; end Expr_Name; - -- Start of processing for Expression_Name + -- Start of processing for Expression_Image begin if not From_Source then @@ -697,6 +697,12 @@ package body Pprint is end; end if; + -- Reach to the underlying expression for an expression-with-actions + + if Nkind (Expr) = N_Expression_With_Actions then + return Expression_Image (Expression (Expr), Default); + end if; + -- Compute left (start) and right (end) slocs for the expression -- Consider using Sinput.Sloc_Range instead, except that it does not -- work properly currently??? |