[Ada] Iterative patch for accessibility cleanup
authorJustin Squirek <squirek@adacore.com>
Mon, 24 Aug 2020 18:17:36 +0000 (14:17 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 23 Oct 2020 08:24:42 +0000 (04:24 -0400)
commit01364aeb56648c50a59027a290e9b72156bfc427
treeaf425070a70128dd360bc0d03bf6a99990a25a02
parent4d4ba374a73b226dc16af7190c688728f3e5d2c5
[Ada] Iterative patch for accessibility cleanup

gcc/ada/

* sem_util.adb (Accessibility_Call_Helper): In the selected
component case, test if a prefix is a function call and whether
the subprogram call is not being used in its entirety and use
the Innermost_Master_Scope_Depth in that case.
(Innermost_Master_Scope_Depth): Test against the node_par
instead of its identifier to avoid misattributing unnamed blocks
as not being from source.
(Function_Call_Level): Add calculation for whether a subprogram
call is initializing an object in its entirety.
(Subprogram_Call_Level): Renamed to Function_Call_Level.
gcc/ada/sem_util.adb