* [Ada] Simplify detection of delayed aggregates
@ 2021-10-11 13:39 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-11 13:39 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
Replace IF with a single RETURN statement. Cleanup related to expansion
of aggregates in GNATprove mode; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Is_Delayed_Aggregate): Simplify.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 538 bytes --]
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -8978,11 +8978,8 @@ package body Exp_Aggr is
Kind := Nkind (Node);
end if;
- if Kind not in N_Aggregate | N_Extension_Aggregate then
- return False;
- else
- return Expansion_Delayed (Node);
- end if;
+ return Kind in N_Aggregate | N_Extension_Aggregate
+ and then Expansion_Delayed (Node);
end Is_Delayed_Aggregate;
--------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-11 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 13:39 [Ada] Simplify detection of delayed aggregates Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).