]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Replace "not Present" tests with "No".
authorSteve Baird <baird@adacore.com>
Mon, 12 Feb 2024 21:39:45 +0000 (13:39 -0800)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 14 May 2024 08:19:55 +0000 (10:19 +0200)
Fix constructs that were flagged by CodePeer.

gcc/ada/

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

gcc/ada/exp_attr.adb

index b7277118a9cb142e61fe7f7735e2860251ce7442..6dba600620ec78a518bf6f5769d23a6c76aa3b30 100644 (file)
@@ -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