diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-06-23 17:40:22 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-15 05:39:10 -0400 |
commit | fcbac1b3344c0e6376b11b0f555dcfb908bbf775 (patch) | |
tree | 999fb7d226708c8e8029db4bf7a6cda0b52e6556 /gcc | |
parent | 701a05667fbcc7d9c28bb915bc241b25db5e7312 (diff) | |
download | gcc-fcbac1b3344c0e6376b11b0f555dcfb908bbf775.zip gcc-fcbac1b3344c0e6376b11b0f555dcfb908bbf775.tar.gz gcc-fcbac1b3344c0e6376b11b0f555dcfb908bbf775.tar.bz2 |
[Ada] Remove excessive defensive calls to Is_Type
gcc/ada/
* sem_ch3.adb (Access_Subprogram_Declaration): Remove extra
parens.
(Make_Index): Remove excessive calls to Is_Type.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index ca982ff..a5fb045 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -1185,7 +1185,7 @@ package body Sem_Ch3 is end; end if; - if not (Is_Type (Etype (Desig_Type))) then + if not Is_Type (Etype (Desig_Type)) then Error_Msg_N ("expect type in function specification", Result_Definition (T_Def)); @@ -19214,7 +19214,6 @@ package body Sem_Ch3 is if Nkind (Low_Bound (N)) = N_Attribute_Reference and then Attribute_Name (Low_Bound (N)) = Name_First and then Is_Entity_Name (Prefix (Low_Bound (N))) - and then Is_Type (Entity (Prefix (Low_Bound (N)))) and then Is_Discrete_Type (Entity (Prefix (Low_Bound (N)))) then -- The type of the index will be the type of the prefix, as long @@ -19266,7 +19265,6 @@ package body Sem_Ch3 is if Is_Entity_Name (Prefix (N)) and then Comes_From_Source (N) - and then Is_Type (Entity (Prefix (N))) and then Is_Discrete_Type (Entity (Prefix (N))) then Def_Id := Entity (Prefix (N)); |