]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Simplify handling of selected components as name references
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 7 Mar 2025 11:08:44 +0000 (12:08 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:10 +0000 (08:32 +0200)
commit0ab32e590fa97e7dc54e171f1a7b5f9b7069c309
tree5f6ea0f8821fc685a9a7054cd957052a1036be4d
parent4413a6312672a2b2e37244828deec622d40cd03f
ada: Simplify handling of selected components as name references

The selector_name of a selected_component always points to an identifier than
is an object name, i.e. specifically, name of a component or discriminant.
There is no need to examine this.

Code cleanup; behavior is unaffected.

gcc/ada/ChangeLog:

* sem_util.adb (Is_Name_Reference): Remove check for selector_name of a
selected_component; reuse existing code for indexed components and
slices.
(Statically_Names_Object): Remove dead code.
gcc/ada/sem_util.adb