diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-01-20 20:12:52 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-10 08:19:26 +0000 |
commit | d421523a42d50e1004d5bbe30e4c45b2b98f1a03 (patch) | |
tree | f64dc658937598483de20636349aa013fd9b5ae9 /gcc/fold-const.cc | |
parent | 3a978538036cd43d629c7b003c5ee6c8b3bf2c98 (diff) | |
download | gcc-d421523a42d50e1004d5bbe30e4c45b2b98f1a03.zip gcc-d421523a42d50e1004d5bbe30e4c45b2b98f1a03.tar.gz gcc-d421523a42d50e1004d5bbe30e4c45b2b98f1a03.tar.bz2 |
[Ada] Refine iteration from entities to formals
When matching formal parameters from spec and body it is cleaner and
more efficient to iterate with First_Formal/Next_Formal and not with
First_Entity/Next_Entity. The previous iteration could unintentionally
pick entities from within the subprogram body, e.g. objects declared
within the subprogram.
gcc/ada/
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace
First_Entity/Next_Entity with First_Formal/Next_Formal; rename
E1/E2 to F1/F2.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions