[Ada] Refactor duplicated resolution of Count and Index attributes
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 31 May 2022 10:22:21 +0000 (12:22 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 4 Jul 2022 07:45:59 +0000 (07:45 +0000)
commite0cd23986ed4fcfbb71ab44959ca18299412e706
treef0fcd54b9b2b0f7e0d6f274f280743067f307bf6
parenta521dc37999bed5ec1f529b4c6ba7ded09dca464
[Ada] Refactor duplicated resolution of Count and Index attributes

Attribute Index, which was added to Ada 2022 by AI12-0143, is resolved
just like attribute Count. However, code duplication rightly triggered a
CodePeer warning.

gcc/ada/

* sem_attr.adb (Resolve_Attribute): Refactor duplicated code for
Count and Index attributes.
gcc/ada/sem_attr.adb