ada: Make Original_Aspect_Pragma_Name more precise
This commit makes Original_Aspect_Pragma_Name more precise in cases where there is a second level of indirection caused by pragmas being turned into Check pragmas. gcc/ada/ * sem_util.adb (Original_Aspect_Pragma_Name): Check for Check pragmas.
This commit is contained in:
parent
4450567167
commit
91c706565f
1 changed files with 8 additions and 0 deletions
|
@ -26559,6 +26559,14 @@ package body Sem_Util is
|
|||
Item_Nam :=
|
||||
Chars (Original_Node (Pragma_Identifier (Original_Node (Item))));
|
||||
|
||||
if Item_Nam = Name_Check then
|
||||
-- Pragma "Check" preserves the original pragma name as its first
|
||||
-- argument.
|
||||
Item_Nam :=
|
||||
Chars (Expression (First (Pragma_Argument_Associations
|
||||
(Original_Node (Item)))));
|
||||
end if;
|
||||
|
||||
else
|
||||
pragma Assert (Nkind (Item) = N_Aspect_Specification);
|
||||
Item_Nam := Chars (Identifier (Item));
|
||||
|
|
Loading…
Add table
Reference in a new issue