[Ada] Reuse Is_Package_Or_Generic_Package where possible

Pierre-Marie de Rodat derodat@adacore.com
Tue Jun 2 08:59:38 GMT 2020


Replace a low-level Ekind_In with a high-level
Is_Package_Or_Generic_Package wrapper where possible. Arguably the
wrapper was introduced to make the code easier to read, so let's use it;
semantics is unaffected.

Modified expressions were detected with:

  $ grep "Ekind_In " *|grep E_Package|grep E_Generic_Package

which certainly could miss some occurrences, but this seems acceptable.

Tested on x86_64-pc-linux-gnu, committed on trunk

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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 9367 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200602/a2ef1df4/attachment-0001.bin>


More information about the Gcc-patches mailing list