[Ada] Reuse Is_Named_Number where possible

gcc/ada/

	* sem_attr.adb, sem_prag.adb: Use Is_Named_Number.
This commit is contained in:
Piotr Trojanek 2020-10-09 14:03:38 +02:00 committed by Pierre-Marie de Rodat
parent 90cb252f5f
commit 868268a8ec
2 changed files with 2 additions and 2 deletions

View File

@ -6636,7 +6636,7 @@ package body Sem_Attr is
Check_E0;
if not Is_Entity_Name (P)
or else Ekind (Entity (P)) not in Named_Kind
or else not Is_Named_Number (Entity (P))
then
Error_Attr_P ("prefix for % attribute must be named number");

View File

@ -2383,7 +2383,7 @@ package body Sem_Prag is
("global item must denote object, state or current "
& "instance of concurrent type", Item);
if Ekind (Item_Id) in Named_Kind then
if Is_Named_Number (Item_Id) then
SPARK_Msg_NE
("\named number & is not an object", Item, Item_Id);
end if;