diff mbox series

[COMMITTED] ada: Replace "not Present" tests with "No".

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

Commit Message

Marc Poulhiès May 14, 2024, 8:23 a.m. UTC
From: Steve Baird <baird@adacore.com>

Fix constructs that were flagged by CodePeer.

gcc/ada/

	* exp_attr.adb: Replace 6 "not Present" tests with equivalent calls to "No".

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

---
 gcc/ada/exp_attr.adb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index b7277118a9c..6dba600620e 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -4334,7 +4334,7 @@  package body Exp_Attr is
 
          Fname := Find_Stream_Subprogram (P_Type, TSS_Stream_Input, N);
 
-         if not Present (Fname) then
+         if No (Fname) then
 
             --  If there is a Stream_Convert pragma, use it, we rewrite
 
@@ -5422,7 +5422,7 @@  package body Exp_Attr is
 
          Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Output, N);
 
-         if not Present (Pname) then
+         if No (Pname) then
 
             --  If there is a Stream_Convert pragma, use it, we rewrite
 
@@ -5998,7 +5998,7 @@  package body Exp_Attr is
                Pname := Cached_Attribute_Ops.Put_Image_Map.Get (U_Type);
                Cached_Attribute_Ops.Validate_Cached_Candidate
                  (Pname, Attr_Ref => N);
-               if not Present (Pname) then
+               if No (Pname) then
                   declare
                      procedure Build_And_Insert_Array_Put_Image_Proc is
                        new Build_And_Insert_Type_Attr_Subp
@@ -6052,7 +6052,7 @@  package body Exp_Attr is
                   Pname := Cached_Attribute_Ops.Put_Image_Map.Get (Base_Typ);
                   Cached_Attribute_Ops.Validate_Cached_Candidate
                     (Pname, Attr_Ref => N);
-                  if not Present (Pname) then
+                  if No (Pname) then
                      declare
                         procedure Build_And_Insert_Record_Put_Image_Proc is
                           new Build_And_Insert_Type_Attr_Subp
@@ -6352,7 +6352,7 @@  package body Exp_Attr is
 
          Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Read, N);
 
-         if not Present (Pname) then
+         if No (Pname) then
 
             --  If there is a Stream_Convert pragma, use it, we rewrite
 
@@ -8067,7 +8067,7 @@  package body Exp_Attr is
 
          Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Write, N);
 
-         if not Present (Pname) then
+         if No (Pname) then
 
             --  If there is a Stream_Convert pragma, use it, we rewrite