[Ada] Simplify getting discriminant value from a list of constraints

Pierre-Marie de Rodat derodat@adacore.com
Fri Jun 12 08:35:46 GMT 2020


Routine Get_Discr_Value takes a name of a discriminant, not its entity,
so its parameter should be a Node_Id, not an Entity_Id. Also, fix typo
in its comment and refactor repeated calls in the body. Semantics is
unaffected.

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

2020-06-12  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* sem_ch3.adb (Get_Discr_Value): Cleanup.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2162 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200612/8bc3b0bc/attachment-0001.bin>


More information about the Gcc-patches mailing list