Code cleanup; semantics is unaffected.
gcc/ada/ChangeLog:
* checks.adb (Generate_Index_Checks): Reuse existing utility routine.
* sem_ch4.adb (Analyze_Indexed_Component_Form): Likewise.
* sem_prag.adb (Analyze_Pragma): Likewise.
-- Delay the generation of the check until 'Loop_Entry has been properly
-- expanded. This is done in Expand_Loop_Entry_Attributes.
- elsif Nkind (Prefix (N)) = N_Attribute_Reference
- and then Attribute_Name (Prefix (N)) = Name_Loop_Entry
- then
+ elsif Is_Attribute_Loop_Entry (Prefix (N)) then
return;
end if;
-- the indexed component denotes a loop name, the indexed form is turned
-- into an attribute reference.
- elsif Nkind (N) = N_Attribute_Reference
- and then Attribute_Name (N) = Name_Loop_Entry
- then
+ elsif Is_Attribute_Loop_Entry (N) then
return;
end if;
function Process (N : Node_Id) return Traverse_Result is
begin
- if Nkind (N) = N_Attribute_Reference
- and then Attribute_Name (N) = Name_Loop_Entry
- then
+ if Is_Attribute_Loop_Entry (N) then
return Abandon;
else
return OK;