https://gcc.gnu.org/g:56a4599bb3d45d8509fbcb83d8d122b71b7d0866

commit r17-1304-g56a4599bb3d45d8509fbcb83d8d122b71b7d0866
Author: Marc Poulhiès <[email protected]>
Date:   Thu Apr 23 11:27:58 2026 +0200

    ada: Minor cosmetic refactoring
    
    Rewrite the sequence of:
     if V = Enum_1
       or else V = Enum_2
       or else V in Enum_R
       ...
    
    with a membership test.
    
    gcc/ada/ChangeLog:
    
            * sem_util.adb (Enclosing_Declaration): Refactor membership test.

Diff:
---
 gcc/ada/sem_util.adb | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index f8f18d3d48bd..60973af61cff 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -7664,13 +7664,11 @@ package body Sem_Util is
 
    begin
       while Present (Decl)
-        and then not (Nkind (Decl) in N_Declaration
-                        or else
-                      Nkind (Decl) in N_Later_Decl_Item
-                        or else
-                      Nkind (Decl) in N_Renaming_Declaration
-                        or else
-                      Nkind (Decl) = N_Number_Declaration)
+            and then not (Nkind (Decl) in
+              N_Declaration
+              | N_Later_Decl_Item
+              | N_Renaming_Declaration
+              | N_Number_Declaration)
       loop
          Decl := Parent (Decl);
       end loop;

Reply via email to