diff mbox series

[COMMITTED] ada: Minor change replacing "not Present" tests with "No" tests

Message ID 20240109131557.744875-1-poulhies@adacore.com
State New
Headers show
Series [COMMITTED] ada: Minor change replacing "not Present" tests with "No" tests | expand

Commit Message

Marc Poulhiès Jan. 9, 2024, 1:15 p.m. UTC
From: Gary Dismukes <dismukes@adacore.com>

Fixing two places flagged by gnatcheck to use "No" instead of "not Present".

gcc/ada/

	* exp_aggr.adb (Expand_Container_Aggregate): Change "not Present"
	tests to tests using "No" (in two places).

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_aggr.adb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 6fceda3ceff..25215cb8499 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -7047,7 +7047,7 @@  package body Exp_Aggr is
       --  Determine whether this is an indexed aggregate (see RM 4.3.5(25/5)).
 
       if Present (New_Indexed_Subp) then
-         if not Present (Add_Unnamed_Subp) then
+         if No (Add_Unnamed_Subp) then
             Is_Indexed_Aggregate := True;
 
          else
@@ -7226,7 +7226,7 @@  package body Exp_Aggr is
             end Expand_Range_Component;
 
          begin
-            pragma Assert (not Present (Expressions (N)));
+            pragma Assert (No (Expressions (N)));
 
             if Siz > 0 then