[Ada] Tech debt: Remove code duplication
authorJustin Squirek <squirek@adacore.com>
Thu, 26 May 2022 15:02:01 +0000 (15:02 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 4 Jul 2022 07:45:57 +0000 (07:45 +0000)
commit78f13b008ab58794057847a74903ee4569829d80
tree47c9f8365e4c74f6bd251424084d409f0edbe251
parent1fde86bba55ea61b56f79798c6ac4cc6808e51a1
[Ada] Tech debt: Remove code duplication

This patch corrects removes some code duplication within the GNAT
compiler.

gcc/ada/

* exp_util.adb (Remove_Side_Effects): Combine identical
branches.
* sem_attr.adb (Analyze_Attribute): Combine identical cases
Attribute_Has_Same_Storage and Attribute_Overlaps_Storage.
* sem_prag.adb (Check_Role): Combine E_Out_Parameter case with
general case for parameters.
* sem_util.adb (Accessibility_Level): Combine identical
branches.
* sprint.adb (Sprint_Node_Actual): Combine cases for
N_Real_Range_Specification and N_Signed_Integer_Type_Definition.
gcc/ada/exp_util.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_util.adb
gcc/ada/sprint.adb