There is no need to guard against routine Contains being called on
No_Elist, because it will return False. Code cleanup related to handling
of primitive operations in GNATprove; semantics is unaffected.
gcc/ada/
* sem_prag.adb (Record_Possible_Body_Reference): Remove call to Present.
* sem_util.adb (Find_Untagged_Type_Of): Likewise.
if Nkind (Context) = N_Package_Body then
Spec_Id := Corresponding_Spec (Context);
- if Present (Abstract_States (Spec_Id))
- and then Contains (Abstract_States (Spec_Id), State_Id)
- then
+ if Contains (Abstract_States (Spec_Id), State_Id) then
if No (Body_References (State_Id)) then
Set_Body_References (State_Id, New_Elmt_List);
end if;
begin
while Present (E) and then E /= Prim loop
if not Is_Tagged_Type (E)
- and then Present (Direct_Primitive_Operations (E))
and then Contains (Direct_Primitive_Operations (E), Prim)
then
return E;