Routine Set_Aspect_Specifications sets the Has_Aspect flag, so there is
no need to set this flag again afterwards.
Code cleanup; semantics is unaffected.
gcc/ada/
* aspects.adb (Relocate_Aspect): Remove call to Set_Has_Aspects.
* sem_ch12.adb (Analyze_Formal_Package_Declaration): Likewise.
* sem_util.adb (Copy_Ghost_Aspect, Copy_SPARK_Mode_Aspect):
Likewise.
else
Asps := New_List;
Set_Aspect_Specifications (To, Asps);
- Set_Has_Aspects (To);
end if;
-- Remove the aspect from its original owner and relocate it to node
if Present (Aspect_Specifications (Gen_Decl)) then
if No (Aspect_Specifications (N)) then
Set_Aspect_Specifications (N, New_List);
- Set_Has_Aspects (N);
end if;
declare
if Present (Asp) then
Set_Aspect_Specifications (To, New_List (New_Copy_Tree (Asp)));
- Set_Has_Aspects (To, True);
end if;
end if;
end Copy_Ghost_Aspect;
if Present (Asp) then
Set_Aspect_Specifications (To, New_List (New_Copy_Tree (Asp)));
- Set_Has_Aspects (To, True);
end if;
end if;
end Copy_SPARK_Mode_Aspect;