diff mbox series

[COMMITTED,27/30] ada: Minor code adjustment to "not Present" test

Message ID 20240610090747.1557638-27-poulhies@adacore.com
State New
Headers show
Series [COMMITTED,01/30] ada: Refactor checks for Refined_Global in generic instances | expand

Commit Message

Marc Poulhiès June 10, 2024, 9:07 a.m. UTC
From: Gary Dismukes <dismukes@adacore.com>

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.

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

---
 gcc/ada/sem_aggr.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 51b88ab831f..249350d21de 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -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 "