[Ada] Prevent search for references in postconditions from going too far
authorPiotr Trojanek <trojanek@adacore.com>
Sat, 22 Jan 2022 13:51:27 +0000 (14:51 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 10 May 2022 08:19:27 +0000 (08:19 +0000)
commit35f10dc04029e7125c322acbbd71dd30e3c8f54f
tree15fd5bf13e7e565e455382d710053eeb9e77deed
parent8cec0688df7258e16b7c9d2614e16b5b9346da1d
[Ada] Prevent search for references in postconditions from going too far

Add a standard prevention against climbing the entire compilation unit.
Cleanup only; behaviour of the compiler is unaffected.

gcc/ada/

* sem_warn.adb (Within_Postcondition): Guard against search
going too far.
gcc/ada/sem_warn.adb