diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-02-06 22:56:49 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-22 10:44:10 +0200 |
commit | 012de9f65cb9e4a6a4bf78aea7634118a74013e4 (patch) | |
tree | 95b7b6873c23ead40a8513d52302cf57ca572819 /gcc/ada/sem_res.adb | |
parent | af1914998dcfb9908afe85b2275fd9868d689db9 (diff) | |
download | gcc-012de9f65cb9e4a6a4bf78aea7634118a74013e4.zip gcc-012de9f65cb9e4a6a4bf78aea7634118a74013e4.tar.gz gcc-012de9f65cb9e4a6a4bf78aea7634118a74013e4.tar.bz2 |
ada: Cleanup redundant condition in resolution of entity names
Code cleanup related to new contract for SPARK; semantics is unaffected.
gcc/ada/
* sem_res.adb (Resolve_Entity_Name): Combine two IF statements that
execute code only for references that come from source.
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 3eb13de..365c750 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8022,7 +8022,7 @@ package body Sem_Res is if Comes_From_Source (N) then - -- The following checks are only relevant when SPARK_Mode is on as + -- The following checks are only relevant when SPARK_Mode is On as -- they are not standard Ada legality rules. if SPARK_Mode = On then @@ -8067,13 +8067,11 @@ package body Sem_Res is if Is_Ghost_Entity (E) then Check_Ghost_Context (E, N); end if; - end if; - -- We may be resolving an entity within expanded code, so a reference to - -- an entity should be ignored when calculating effective use clauses to - -- avoid inappropriate marking. + -- We may be resolving an entity within expanded code, so a reference + -- to an entity should be ignored when calculating effective use + -- clauses to avoid inappropriate marking. - if Comes_From_Source (N) then Mark_Use_Clauses (E); end if; end Resolve_Entity_Name; |