[Ada] Simplify routines with a local Result variable
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 24 May 2018 13:07:11 +0000 (13:07 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 24 May 2018 13:07:11 +0000 (13:07 +0000)
commit672dfc39f1dedd8b00fb10f6b7b01671b27c0f86
tree48c2ae6e2323e23bbbbf9593876067f4ef349d56
parent63a329f81c83b58694571cebb39c3ab8cec935c4
[Ada] Simplify routines with a local Result variable

Local variable Result that is modified inside IF statements makes a seemingly
trivial code slightly hard to understand. This patch rewrites such a pattern.

Semantics unaffected.

2018-05-24  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem_elab.adb (Non_Private_View): Simplify by removing a local Result
variable.
* sem_prag.adb (Get_Base_Subprogram): Same as above.

From-SVN: r260670
gcc/ada/ChangeLog
gcc/ada/sem_elab.adb
gcc/ada/sem_prag.adb