diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2023-01-10 13:49:50 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-15 11:36:42 +0200 |
commit | 78de6f03ca32159dec176c47af7caca6c6c996a1 (patch) | |
tree | f8fa77bae8f259a1fd9cf965e3d953728032c474 /gcc | |
parent | 4590d973dd629324fd5405cd4b2ef5d608528297 (diff) | |
download | gcc-78de6f03ca32159dec176c47af7caca6c6c996a1.zip gcc-78de6f03ca32159dec176c47af7caca6c6c996a1.tar.gz gcc-78de6f03ca32159dec176c47af7caca6c6c996a1.tar.bz2 |
ada: Simplify lookup of predecessor in homonym chain
gcc/ada/
* sem_ch8.adb (End_Scope): Simplify lookup of predecessor in
homonym chain.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch8.adb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 6f858ee..e4b3519 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -5066,7 +5066,6 @@ package body Sem_Ch8 is if Id /= Current_Entity (Id) then Prev := Current_Entity (Id); while Present (Prev) - and then Present (Homonym (Prev)) and then Homonym (Prev) /= Id loop Prev := Homonym (Prev); @@ -5074,7 +5073,7 @@ package body Sem_Ch8 is -- Skip to end of loop if Id is not in the visibility chain - if No (Prev) or else Homonym (Prev) /= Id then + if No (Prev) then goto Next_Ent; end if; |