]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Remove redundant conditions from freezing code
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 15 May 2024 08:58:33 +0000 (10:58 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 20 Jun 2024 08:50:53 +0000 (10:50 +0200)
commit09ed91df30102e17ac5c59bab314b8b37606c710
tree981841905efac35f2b39f535f4f0eb392df98a39
parent42305c7a3acb29b7bedef4d90dbbe032a5f985c5
ada: Remove redundant conditions from freezing code

Code cleanup; behavior is unaffected.

gcc/ada/

* freeze.adb (Check_Current_Instance): This routine is only called
with parameter E being a type entity, so there is no need to check
for types just before the equality with E.
* sem_ch13.adb (Analyze_Aspect_Specifications): Regroup condition
to avoid unnecessary evaluation.
(Check_Aspect_At_End_Of_Declarations): If In_Instance is true,
then the routine exits early.
gcc/ada/freeze.adb
gcc/ada/sem_ch13.adb