From 790b1f64157b53265f85ad9a093cdce03761db87 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 5 Jun 2020 13:30:54 +0200 Subject: [PATCH] [Ada] Cleanup code related to object overlays gcc/ada/ * sem_util.adb (Find_Overlaid_Entity): Fix style in comment. (Note_Possible_Modification): Simplify repeated calls to Ekind. --- gcc/ada/sem_util.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 56fd677ed3c..06e425de037 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -8691,7 +8691,7 @@ package body Sem_Util is Expr := Prefix (Expr); exit; - -- Check for Const where Const is a constant entity + -- Check for Const where Const is a constant entity elsif Is_Entity_Name (Expr) and then Ekind (Entity (Expr)) = E_Constant @@ -23841,7 +23841,7 @@ package body Sem_Util is -- Follow renaming chain - if (Ekind (Ent) = E_Variable or else Ekind (Ent) = E_Constant) + if Ekind_In (Ent, E_Variable, E_Constant) and then Present (Renamed_Object (Ent)) then Exp := Renamed_Object (Ent); -- 2.30.2