diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-08-22 21:36:11 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-07 09:55:58 +0200 |
commit | 33f560e2722912fd86cd2c9b8584bdb81726dae8 (patch) | |
tree | f3f05015ea4305dce1c80ba8024a6ce60fef4993 /gcc/ada/inline.adb | |
parent | e7c7bf30cdc04e73ecc34cfb2d955d1316a0e3eb (diff) | |
download | gcc-33f560e2722912fd86cd2c9b8584bdb81726dae8.zip gcc-33f560e2722912fd86cd2c9b8584bdb81726dae8.tar.gz gcc-33f560e2722912fd86cd2c9b8584bdb81726dae8.tar.bz2 |
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.
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r-- | gcc/ada/inline.adb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 169a22c..a628a59 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))); |