aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/contracts.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-10-07 22:27:46 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-24 05:16:05 -0500
commit42b91d9a746aa1736de6876a34b4d817591bffb1 (patch)
treedc01dc09769e9ae08af894a09f4aa44f038eab63 /gcc/ada/contracts.adb
parent45ce2307851e8e7fc653137253c8782f734c5697 (diff)
downloadgcc-42b91d9a746aa1736de6876a34b4d817591bffb1.zip
gcc-42b91d9a746aa1736de6876a34b4d817591bffb1.tar.gz
gcc-42b91d9a746aa1736de6876a34b4d817591bffb1.tar.bz2
[Ada] Reuse In_Same_List where possible
gcc/ada/ * contracts.adb, freeze.adb, sem_ch12.adb, sem_prag.adb: Reuse In_Same_List.
Diffstat (limited to 'gcc/ada/contracts.adb')
-rw-r--r--gcc/ada/contracts.adb3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 936b16e..3ef607f 100644
--- a/gcc/ada/contracts.adb
+++ b/gcc/ada/contracts.adb
@@ -2559,8 +2559,7 @@ package body Contracts is
Was_Expression_Function (Body_Decl)
and then Sloc (Body_Id) /= Sloc (Subp_Id)
and then In_Same_Source_Unit (Body_Id, Subp_Id)
- and then List_Containing (Body_Decl) /=
- List_Containing (Subp_Decl);
+ and then not In_Same_List (Body_Decl, Subp_Decl);
if Present (Items) then
Prag := Pre_Post_Conditions (Items);