]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Refactor negated conjuncts
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 5 Jul 2024 15:15:49 +0000 (17:15 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 2 Aug 2024 07:08:10 +0000 (09:08 +0200)
Code cleanup; semantics is unaffected.

gcc/ada/

* exp_util.adb (Insert_Actions): Move negation in front of
complex conjunctions.

gcc/ada/exp_util.adb

index bd8bbb39d9c8e0af448c6ceea5679cb1fa0072d8..bde50687597d782de191c95e1b931c57597923e5 100644 (file)
@@ -8146,12 +8146,13 @@ package body Exp_Util is
                  --  not already set can lead to gigi assertion failures that
                  --  are presumably due to malformed trees, so don't do that.
 
-                 and then (Nkind (P) /= N_Iterated_Component_Association
-                            or else not Is_List_Member (N)
-                            or else
-                              List_Containing (N) /= Discrete_Choices (P))
-                 and then (Nkind (P) /= N_Component_Association
-                            or else Present (Loop_Actions (P)))
+                 and then
+                   not (Nkind (P) = N_Iterated_Component_Association
+                          and then Is_List_Member (N)
+                          and then List_Containing (N) = Discrete_Choices (P))
+                 and then
+                   not (Nkind (P) = N_Component_Association
+                          and then No (Loop_Actions (P)))
                then
                   if Is_Empty_List (Loop_Actions (P)) then
                      Set_Loop_Actions (P, Ins_Actions);