[multiple changes]
2014-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Quantified_Expression): If after pre-analysis the loop parameter specification has been rewritten as a iterator specification, propagate the change to the quantified expression, for ASIS navigtion needs. 2014-01-20 Vincent Celier <celier@adacore.com> * par-ch10.adb: Minor error message change: escape [ and ]. From-SVN: r206842
This commit is contained in:
parent
4a28b181a6
commit
a736f6e612
3 changed files with 35 additions and 3 deletions
|
@ -1,3 +1,14 @@
|
|||
2014-01-20 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch4.adb (Analyze_Quantified_Expression): If after
|
||||
pre-analysis the loop parameter specification has been
|
||||
rewritten as a iterator specification, propagate the change to
|
||||
the quantified expression, for ASIS navigtion needs.
|
||||
|
||||
2014-01-20 Vincent Celier <celier@adacore.com>
|
||||
|
||||
* par-ch10.adb: Minor error message change: escape [ and ].
|
||||
|
||||
2014-01-20 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* checks.adb: Make warnings on exceptions into errors in GNATprove mode.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
|
@ -360,7 +360,7 @@ package body Ch10 is
|
|||
(File_Name (Current_Source_File)) = Expect_Body
|
||||
then
|
||||
Error_Msg_BC -- CODEFIX
|
||||
("keyword BODY expected here [see file name]");
|
||||
("keyword BODY expected here '[see file name']");
|
||||
Restore_Scan_State (Scan_State);
|
||||
Set_Unit (Comp_Unit_Node, P_Package (Pf_Pbod_Pexp));
|
||||
else
|
||||
|
|
|
@ -3667,7 +3667,28 @@ package body Sem_Ch4 is
|
|||
end if;
|
||||
|
||||
else pragma Assert (Present (Loop_Parameter_Specification (N)));
|
||||
Preanalyze (Loop_Parameter_Specification (N));
|
||||
declare
|
||||
Loop_Par : constant Node_Id := Loop_Parameter_Specification (N);
|
||||
|
||||
begin
|
||||
Preanalyze (Loop_Par);
|
||||
|
||||
if Nkind (Discrete_Subtype_Definition (Loop_Par)) =
|
||||
N_Function_Call
|
||||
and then Parent (Loop_Par) /= N
|
||||
then
|
||||
-- The parser cannot distinguish between a loop specification
|
||||
-- and an iterator specification. If after pre-analysis the
|
||||
-- proper form has been recognized, rewrite the expression to
|
||||
-- reflect the right kind. The analysis of the loop has been
|
||||
-- performed on a copy that has the proper iterator form. This
|
||||
-- is needed in particular for ASIS navigation.
|
||||
|
||||
Set_Loop_Parameter_Specification (N, Empty);
|
||||
Set_Iterator_Specification (N,
|
||||
New_Copy_Tree (Iterator_Specification (Parent (Loop_Par))));
|
||||
end if;
|
||||
end;
|
||||
end if;
|
||||
|
||||
Preanalyze_And_Resolve (Cond, Standard_Boolean);
|
||||
|
|
Loading…
Add table
Reference in a new issue