aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2019-12-12 11:45:24 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-02 04:58:00 -0400
commita92db2624549f119a6f5c1e19c3013768b6bad3e (patch)
tree1993d05c7b90268f5da970985d969a204eb9ecb8 /gcc/ada/sem_ch4.adb
parent86b14bb1a93d8ef01678d132013a2006a4f00deb (diff)
downloadgcc-a92db2624549f119a6f5c1e19c3013768b6bad3e.zip
gcc-a92db2624549f119a6f5c1e19c3013768b6bad3e.tar.gz
gcc-a92db2624549f119a6f5c1e19c3013768b6bad3e.tar.bz2
[Ada] Reuse Is_Package_Or_Generic_Package where possible
2020-06-02 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * contracts.adb, einfo.adb, exp_ch9.adb, sem_ch12.adb, sem_ch4.adb, sem_ch7.adb, sem_ch8.adb, sem_elab.adb, sem_type.adb, sem_util.adb: Reuse Is_Package_Or_Generic_Package where possible (similarly, reuse Is_Concurrent_Type if it was possible in the same expressions).
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 5910112..702f265 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -9480,7 +9480,7 @@ package body Sem_Ch4 is
Type_Scope : constant Entity_Id := Scope (T);
Op_List : Elist_Id := Primitive_Operations (T);
begin
- if Ekind_In (Type_Scope, E_Package, E_Generic_Package)
+ if Is_Package_Or_Generic_Package (Type_Scope)
and then ((In_Package_Body (Type_Scope)
and then In_Open_Scopes (Type_Scope)) or else In_Instance_Body)
then