Replace equality and inequality operators with calls to No and Present.
Offending occurrences found with:
$ grep -n " /\?= No_Elist" *.adb
Code cleanup only; semantics is unaffected.
gcc/ada/
* exp_ch11.adb, exp_ch5.adb, exp_prag.adb, gnat_cuda.adb,
sem_ch12.adb, sem_ch3.adb, sem_ch6.adb, sem_util.adb,
treepr.adb: Replace /= and = operators with No and Present,
respectively.
-- case we have to generate possible diagnostics.
elsif Has_Local_Raise (Handler)
- and then Local_Raise_Statements (Handler) /= No_Elist
+ and then Present (Local_Raise_Statements (Handler))
then
Relmt := First_Elmt (Local_Raise_Statements (Handler));
while Present (Relmt) loop
H := Find_Local_Handler (Entity (Name (N)), N);
if Present (H) then
- if Local_Raise_Statements (H) = No_Elist then
+ if No (Local_Raise_Statements (H)) then
Set_Local_Raise_Statements (H, New_Elmt_List);
end if;
-- from the Rhs by selected component because they are invisible
-- in the type of the right-hand side.
- if Stored_Constraint (R_Typ) /= No_Elist then
+ if Present (Stored_Constraint (R_Typ)) then
declare
Assign : Node_Id;
Discr_Val : Elmt_Id;
Result : constant List_Id := New_List;
Elmt : Elmt_Id;
begin
- if Elmts = No_Elist then
+ if No (Elmts) then
return Result;
end if;
is
Device_Entities : Elist_Id := Get_CUDA_Device_Entities (Pack_Id);
begin
- if Device_Entities = No_Elist then
+ if No (Device_Entities) then
Device_Entities := New_Elmt_List;
Set_CUDA_Device_Entities (Pack_Id, Device_Entities);
end if;
is
Kernels : Elist_Id := Get_CUDA_Kernels (Pack_Id);
begin
- if Kernels = No_Elist then
+ if No (Kernels) then
Kernels := New_Elmt_List;
Set_CUDA_Kernels (Pack_Id, Kernels);
end if;
-- Start of processing for Build_And_Insert_CUDA_Initialization
begin
- if CUDA_Node_List = No_Elist then
+ if No (CUDA_Node_List) then
return;
end if;
begin
pragma Assert (Debug_Flag_Underscore_C);
- if Device_Entities = No_Elist then
+ if No (Device_Entities) then
return;
end if;
E : Elist_Id)
is
begin
- pragma Assert (Get_CUDA_Device_Entities (Pack_Id) = No_Elist);
+ pragma Assert (No (Get_CUDA_Device_Entities (Pack_Id)));
CUDA_Device_Entities_Table.Set (Pack_Id, E);
end Set_CUDA_Device_Entities;
Kernels : Elist_Id)
is
begin
- pragma Assert (Get_CUDA_Kernels (Pack_Id) = No_Elist);
+ pragma Assert (No (Get_CUDA_Kernels (Pack_Id)));
CUDA_Kernels_Table.Set (Pack_Id, Kernels);
end Set_CUDA_Kernels;
Prim : Node_Id;
begin
- if Prims_List /= No_Elist then
+ if Present (Prims_List) then
Prim_Elmt := First_Elmt (Prims_List);
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
-- Inherit Subprograms_For_Type from the full view, if present
if Present (Full_View (T))
- and then Subprograms_For_Type (Full_View (T)) /= No_Elist
+ and then Present (Subprograms_For_Type (Full_View (T)))
then
Set_Subprograms_For_Type
(Id, Subprograms_For_Type (Full_View (T)));
-- Restore the limited views in the spec, if any, to let the back end
-- process it without running into circularities.
- if Exch_Views /= No_Elist then
+ if Present (Exch_Views) then
Restore_Limited_Views (Exch_Views);
end if;
- if Mask_Types /= No_Elist then
+ if Present (Mask_Types) then
Unmask_Unfrozen_Types (Mask_Types);
end if;
end if;
else
- if Identifiers_List = No_Elist then
+ if No (Identifiers_List) then
Identifiers_List := New_Elmt_List;
end if;
Elmt : Elmt_Id;
begin
- if List = No_Elist then
+ if No (List) then
return False;
end if;
Collect_Identifiers (Comp_Expr);
- if Writable_Actuals_List /= No_Elist then
+ if Present (Writable_Actuals_List) then
-- As suggested by Robert, at current stage we
-- report occurrences of this case as warnings.
-- Check violation of RM 6.20/3 in aggregates
if Present (Aggr_Error_Node)
- and then Writable_Actuals_List /= No_Elist
+ and then Present (Writable_Actuals_List)
then
Error_Msg_N
("value may be affected by call in other component because they "
-- Check if some writable argument of a function is referenced
- if Writable_Actuals_List /= No_Elist
- and then Identifiers_List /= No_Elist
+ if Present (Writable_Actuals_List)
+ and then Present (Identifiers_List)
then
declare
Elmt_1 : Elmt_Id;
return;
end if;
- if E = No_Elist then
+ if No (E) then
Write_Str ("<no elist>");
elsif Is_Empty_Elmt_List (E) then