diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-01-08 17:01:27 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-05 04:18:58 -0400 |
commit | 61b54320da90358a010e93b086230ca0627a8fe6 (patch) | |
tree | 0a4c5b194a8cf833a699d29198d84e2a18da1ada /gcc | |
parent | 5e54a5cff4a7e3bd977c15849e431563eecd67ae (diff) | |
download | gcc-61b54320da90358a010e93b086230ca0627a8fe6.zip gcc-61b54320da90358a010e93b086230ca0627a8fe6.tar.gz gcc-61b54320da90358a010e93b086230ca0627a8fe6.tar.bz2 |
[Ada] Remove redundant check in iteration over formal parameters
gcc/ada/
* freeze.adb (Build_Renamed_Body): Simplify IF and WHILE
statements with the same condition.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/freeze.adb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index cb3b037..806677a 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -478,12 +478,10 @@ package body Freeze is Actuals := No_List; end if; - if Present (Formal) then - while Present (Formal) loop - Append (New_Occurrence_Of (Formal, Loc), Actuals); - Next_Formal (Formal); - end loop; - end if; + while Present (Formal) loop + Append (New_Occurrence_Of (Formal, Loc), Actuals); + Next_Formal (Formal); + end loop; -- If the renamed entity is an entry, inherit its profile. For other -- renamings as bodies, both profiles must be subtype conformant, so it |