From 33f560e2722912fd86cd2c9b8584bdb81726dae8 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 22 Aug 2022 21:36:11 +0200 Subject: [PATCH] ada: Remove redundant guard against empty list of declarations Code cleanup. gcc/ada/ * inline.adb (Has_Single_Return): Remove redundant check for empty list, because First works also for empty list. --- gcc/ada/inline.adb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 169a22c0ba5..a628a59e145 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4809,8 +4809,7 @@ package body Inline is else return - Present (Declarations (N)) - and then Present (First (Declarations (N))) + Present (First (Declarations (N))) and then Nkind (First (Declarations (N))) = N_Object_Declaration and then Entity (Expression (Return_Statement)) = Defining_Identifier (First (Declarations (N))); -- 2.47.2