Commit fb1949a0 by Eric Botcazou Committed by Arnaud Charlet

exp_ch4.adb (Expand_N_Conditional_Expression): Set the SLOC of an existing…

exp_ch4.adb (Expand_N_Conditional_Expression): Set the SLOC of an existing parent If statement on the newly created one.

2009-04-29  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch4.adb (Expand_N_Conditional_Expression): Set the SLOC of an
	existing parent If statement on the newly created one.

From-SVN: r146957
parent c5d96723
2009-04-29 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Conditional_Expression): Set the SLOC of an
existing parent If statement on the newly created one.
2009-04-29 Emmanuel Briot <briot@adacore.com>
* gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
......
......@@ -3984,6 +3984,14 @@ package body Exp_Ch4 is
Name => New_Occurrence_Of (Cnn, Sloc (Elsex)),
Expression => Relocate_Node (Elsex))));
-- Preserve the SLOC of a parent If statement, if any
if Present (Parent (N))
and then Nkind (Parent (N)) = N_If_Statement
then
Set_Sloc (New_If, Sloc (Parent (N)));
end if;
Set_Assignment_OK (Name (First (Then_Statements (New_If))));
Set_Assignment_OK (Name (First (Else_Statements (New_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