[Ada] Transient scope cleanup
commitf037632e655c8348b06ffa797c9b1041a5a823ec
authorBob Duff <duff@adacore.com>
Fri, 7 May 2021 14:41:03 +0000 (7 10:41 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 6 Jul 2021 14:46:53 +0000 (6 14:46 +0000)
treedb4781372c600674cf3ce742a34efa67d0140a71
parentf5063691c19a20cd3abb1c3f686ca44bea04d889
[Ada] Transient scope cleanup

gcc/ada/

* sem.ads (Node_To_Be_Wrapped): Minor comment fix.
* exp_ch7.adb (Establish_Transient_Scope): Misc cleanups and
comment improvements.
(Set_Node_To_Be_Wrapped): Remove -- not worth putting this code
in a separate procedure, called only once.
* sem_util.adb (Requires_Transient_Scope): Assert that our
parameter has the right Kind. It probably shouldn't be E_Void,
but that is passed in in some cases.
(Ensure_Minimum_Decoration): Move the call later, so we know Typ
is Present, and remove "if Present (Typ)" from this procedure.
* exp_aggr.adb (Convert_To_Assignments): Use membership test,
and avoid the "if False" idiom.
(Expand_Array_Aggregate): Remove a ??? comment.
* sem_ch8.adb (Push_Scope): Take advantage of the full coverage
rules for aggregates.
* sem_res.adb (Resolve_Declare_Expression): Remove test for
Is_Type -- that's all it can be.  Use named notation in call to
Establish_Transient_Scope.
* libgnat/a-cdlili.adb (Adjust): Remove redundant code.
(Clear): Remove "pragma Warnings (Off);", which wasn't actually
suppressing any warnings.
gcc/ada/exp_aggr.adb
gcc/ada/exp_ch7.adb
gcc/ada/libgnat/a-cdlili.adb
gcc/ada/sem.ads
gcc/ada/sem_ch8.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb