Commit e164710e by Piotr Trojanek Committed by Pierre-Marie de Rodat

[Ada] Reuse Is_Rewrite_Substitution in Relocate_Node

Semantics not affected; the reused routine is exactly the same as the replaced
condition.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution.

From-SVN: r262799
parent b3d18092
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* sem_util.ads (Denotes_Same_Object): Likewise.
* sem_warn.adb (Warn_On_Overlapping_Actuals): Fix RM rule references.
......
......@@ -2186,7 +2186,7 @@ package body Atree is
-- If the node being relocated was a rewriting of some original node,
-- then the relocated node has the same original node.
if Orig_Nodes.Table (Source) /= Source then
if Is_Rewrite_Substitution (Source) then
Orig_Nodes.Table (New_Node) := Orig_Nodes.Table (Source);
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment