]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Minor code adjustment to "not Present" test
authorGary Dismukes <dismukes@adacore.com>
Wed, 17 Apr 2024 21:24:21 +0000 (21:24 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 10 Jun 2024 09:04:01 +0000 (11:04 +0200)
This is just changing a "not Present (...)" test to "No (...)"
to address a CB complaint from gnatcheck.

gcc/ada/

* sem_aggr.adb (Resolve_Iterated_Association): Change "not Present"
to "No" in test of Add_Named_Subp.

gcc/ada/sem_aggr.adb

index 51b88ab831f45a64b56c59ba0fb1fa553255fa78..249350d21def20ef2a17ac2f4164131a8be0adf0 100644 (file)
@@ -3380,7 +3380,7 @@ package body Sem_Aggr is
 
             Key_Expr := Key_Expression (Comp);
             if Present (Key_Expr) then
-               if not Present (Add_Named_Subp) then
+               if No (Add_Named_Subp) then
                   Error_Msg_N
                     ("iterated_element_association with key_expression only "
                        & "allowed for container type with Add_Named operation "