+2011-11-04 Robert Dewar <dewar@adacore.com>
+
+ * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
+
2011-11-04 Yannick Moy <moy@adacore.com>
* atree.adb, atree.ads (Set_Original_Node): New set procedure.
procedure Set_Original_Node (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Original_Node);
+ -- Note that this routine is used only in very peculiar cases. In normal
+ -- cases, the Original_Node link is set by calls to Rewrite. We currently
+ -- use it in ASIS mode to manually set the link from pragma expressions
+ -- to their aspect original source expressions, so that the original source
+ -- expressions accessed by ASIS are also semantically analyzed.
------------------------------
-- Entity Update Procedures --
-- Find_Name_In_Path --
-----------------------
- function Find_Name_In_Path (Self : Project_Search_Path;
- Path : String) return String_Access is
+ function Find_Name_In_Path
+ (Self : Project_Search_Path;
+ Path : String) return String_Access
+ is
First : Natural;
Last : Natural;
else
-- Because we don't want to resolve symbolic links, we cannot use
- -- Locate_Regular_File. So, we try each possible path
- -- successively.
+ -- Locate_Regular_File. So, we try each possible path successively.
First := Self.Path'First;
while First <= Self.Path'Last loop
if Result = null then
Result := Try_Path_Name
- (Self,
- Directory & Directory_Separator & File);
+ (Self, Directory & Directory_Separator & File);
end if;
end if;
generic
with function Check_Filename (Name : String) return Boolean;
- function Find_Name_In_Path (Self : Project_Search_Path;
- Path : String) return String_Access;
+ function Find_Name_In_Path
+ (Self : Project_Search_Path;
+ Path : String) return String_Access;
-- Find a name in the project search path of Self. Check_Filename is
-- the predicate to valid the search. If Path is an absolute filename,
-- simply calls the predicate with Path. Otherwise, calls the predicate
procedure Check_Arg_Is_Static_Expression
(Arg : Node_Id;
- Typ : Entity_Id := Empty) is
+ Typ : Entity_Id := Empty)
+ is
begin
Check_Expr_Is_Static_Expression (Get_Pragma_Arg (Arg), Typ);
end Check_Arg_Is_Static_Expression;
procedure Check_Expr_Is_Static_Expression
(Argx : Node_Id;
- Typ : Entity_Id := Empty) is
+ Typ : Entity_Id := Empty)
+ is
begin
if Present (Typ) then
Analyze_And_Resolve (Argx, Typ);
-- expressions (i.e. similar to a default expression).
if Present (Arg_Req) then
-
Preanalyze_Spec_Expression
(Get_Pragma_Arg (Arg_Req), Standard_Boolean);
end if;
if Present (Arg_Ens) then
-
Preanalyze_Spec_Expression
(Get_Pragma_Arg (Arg_Ens), Standard_Boolean);