Complete previous change:
2009-04-29 Robert Dewar <dewar@adacore.com> * prj-nmsc.ads: Minor reformatting 2009-04-29 Eric Botcazou <ebotcazou@adacore.com> * exp_ch4.adb (Expand_N_Conditional_Expression): Set the SLOC of the expression on the existing parent If statement. From-SVN: r146959
This commit is contained in:
parent
3c63845669
commit
1d1c3ff418
@ -3984,12 +3984,15 @@ 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
|
||||
-- Move the SLOC of the parent If statement to the newly created
|
||||
-- one and change it to the SLOC of the expression which, after
|
||||
-- expansion, will correspond to what is being evaluated.
|
||||
|
||||
if Present (Parent (N))
|
||||
and then Nkind (Parent (N)) = N_If_Statement
|
||||
then
|
||||
Set_Sloc (New_If, Sloc (Parent (N)));
|
||||
Set_Sloc (Parent (N), Loc);
|
||||
end if;
|
||||
|
||||
Set_Assignment_OK (Name (First (Then_Statements (New_If))));
|
||||
|
@ -51,17 +51,15 @@ private package Prj.Nmsc is
|
||||
-- Perform consistency and semantic checks on a project, starting from the
|
||||
-- project tree parsed from the .gpr file. This procedure interprets the
|
||||
-- various case statements in the project based on the current environment
|
||||
-- variables (the "scenario").
|
||||
-- After checking the validity of the naming scheme, it searches for all
|
||||
-- the source files of the project.
|
||||
-- The result of this procedure is a filled data structure for Project_Id
|
||||
-- which contains all the information about the project. This information
|
||||
-- is only valid while the scenario variables are preserved.
|
||||
-- If the current mode is Ada_Only, this procedure will only search Ada
|
||||
-- sources; but in multi_language mode it will look for sources for all the
|
||||
-- supported languages.
|
||||
-- variables (the "scenario"). After checking the validity of the naming
|
||||
-- scheme, it searches for all the source files of the project. The result
|
||||
-- of this procedure is a filled-in data structure for Project_Id which
|
||||
-- contains all the information about the project. This information is only
|
||||
-- valid while the scenario variables are preserved. If the current mode
|
||||
-- is Ada_Only, this procedure will only search Ada sources, but in multi-
|
||||
-- language mode it will look for sources for all supported languages.
|
||||
--
|
||||
-- If Report_Error is null , use the standard error reporting mechanism
|
||||
-- If Report_Error is null, use the standard error reporting mechanism
|
||||
-- (Errout). Otherwise, report errors using Report_Error.
|
||||
--
|
||||
-- Current_Dir is for optimization purposes only, avoiding system calls to
|
||||
|
Loading…
x
Reference in New Issue
Block a user