]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Cope with Sem_Util.Enclosing_Declaration oddness.
authorSteve Baird <baird@adacore.com>
Tue, 21 Nov 2023 19:00:37 +0000 (11:00 -0800)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 19 Dec 2023 14:27:48 +0000 (15:27 +0100)
commit5c374c0907b4da06c163e3d15f182d91f1114ff2
tree3c1c4814e28a9ac6f28a443153ef099af1e41721
parent95a7771da2c0d9ac1f78f25fed40caef4ea3ab56
ada: Cope with Sem_Util.Enclosing_Declaration oddness.

Sem_Util.Enclosing_Declaration can return a non-empty result which is not
a declaration; clients may need to compensate for the case where an
N_Subprogram_Specification node is returned. One such client is the function
Is_Actual_Subp_Of_Inst.

gcc/ada/

* sem_ch8.adb (Is_Actual_Subp_Of_Inst): After calling
Enclosing_Declaration, add a check for the case where one more
Parent call is needed to get the enclosing declaration.
gcc/ada/sem_ch8.adb