public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1585] [Ada] Check all pairs of actuals for overlapping
@ 2021-06-17 14:34 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-17 14:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a6d844cd860880a9d1f028876085a8d1230819b1

commit r12-1585-ga6d844cd860880a9d1f028876085a8d1230819b1
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Wed Mar 10 09:26:18 2021 +0100

    [Ada] Check all pairs of actuals for overlapping
    
    gcc/ada/
    
            * sem_warn.adb (Warn_On_Overlapping_Actuals): Fix style;
            refactor repeated calls to Nkind; remove early RETURN.

Diff:
---
 gcc/ada/sem_warn.adb | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 6db6d2ccfbe..728927433da 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -3693,10 +3693,10 @@ package body Sem_Warn is
 
       --  Local variables
 
-      Act1      : Node_Id;
-      Act2      : Node_Id;
-      Form1     : Entity_Id;
-      Form2     : Entity_Id;
+      Act1  : Node_Id;
+      Act2  : Node_Id;
+      Form1 : Entity_Id;
+      Form2 : Entity_Id;
 
    --  Start of processing for Warn_On_Overlapping_Actuals
 
@@ -3708,9 +3708,7 @@ package body Sem_Warn is
 
       --  Exclude calls rewritten as enumeration literals
 
-      if Nkind (N) not in N_Subprogram_Call
-        and then Nkind (N) /= N_Entry_Call_Statement
-      then
+      if Nkind (N) not in N_Subprogram_Call | N_Entry_Call_Statement then
          return;
       end if;
 
@@ -3879,8 +3877,6 @@ package body Sem_Warn is
                      end if;
                   end if;
                end if;
-
-               return;
             end if;
 
             Next_Formal (Form2);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-17 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 14:34 [gcc r12-1585] [Ada] Check all pairs of actuals for overlapping 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).