aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_elab.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-01-06 19:14:33 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-01-11 13:24:49 +0000
commit9d4a5ddc7b124f201d7c6746e07b0ad98be5f702 (patch)
tree7ae84ed64958d7871182982f53b714dd64498503 /gcc/ada/sem_elab.adb
parentc441162d56974eb557f2ed3cab25c6107411ac62 (diff)
downloadgcc-9d4a5ddc7b124f201d7c6746e07b0ad98be5f702.zip
gcc-9d4a5ddc7b124f201d7c6746e07b0ad98be5f702.tar.gz
gcc-9d4a5ddc7b124f201d7c6746e07b0ad98be5f702.tar.bz2
[Ada] Avoid redundant checks for empty lists
gcc/ada/ * exp_ch4.adb (Expand_N_Expression_With_Actions): Avoid redundant check. * exp_ch5.adb (Expand_N_If_Statement): Likewise. * exp_ch7.adb (Process_Declarations): Likewise. * sem_elab.adb (Freeze_Node_Location): Likewise. * exp_util.adb (Insert_Actions): Likewise. (Is_OK_PF_Pragma): Likewise. (Requires_Cleanup_Actions): Remove early exit; ordinary processing path will similarly do nothing.
Diffstat (limited to 'gcc/ada/sem_elab.adb')
-rw-r--r--gcc/ada/sem_elab.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
index a421278..8e38f8c 100644
--- a/gcc/ada/sem_elab.adb
+++ b/gcc/ada/sem_elab.adb
@@ -15382,7 +15382,7 @@ package body Sem_Elab is
elsif Present (Vis_Decls)
and then List_Containing (FNode) = Vis_Decls
- and then (No (Prv_Decls) or else Is_Empty_List (Prv_Decls))
+ and then Is_Empty_List (Prv_Decls)
then
null;