Commit b9eb3aa8 by Hristian Kirtchev Committed by Arnaud Charlet

exp_ch6.adb (Process_Contract_Cases_For): Update the call to Expand_Pragma_Contract_Cases.

2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Process_Contract_Cases_For): Update the call to
	Expand_Pragma_Contract_Cases.
	* exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
	Expand_Pragma_Contract_Cases.
	* sem_ch13.adb (Add_Invariants): Use the original aspect name
	when creating the arguments of pragma Check. This ensures that
	'Class is properly recognized and handled.

From-SVN: r223671
parent a12e42fc
2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Process_Contract_Cases_For): Update the call to
Expand_Pragma_Contract_Cases.
* exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
Expand_Pragma_Contract_Cases.
* sem_ch13.adb (Add_Invariants): Use the original aspect name
when creating the arguments of pragma Check. This ensures that
'Class is properly recognized and handled.
2015-05-26 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Minor adjustments.
......
......@@ -1856,7 +1856,7 @@ package body Exp_Ch6 is
and then
Nkind (Parent (Subp)) = N_Private_Extension_Declaration
then
if Comes_From_Source (N) and then Is_Public_Subp then
if Comes_From_Source (N) and then Is_Public_Subp then
Append_To (Post_Call, Make_Invariant_Call (Actual));
end if;
......@@ -7292,7 +7292,7 @@ package body Exp_Ch6 is
Prag := Contract_Test_Cases (Items);
while Present (Prag) loop
if Pragma_Name (Prag) = Name_Contract_Cases then
Expand_Contract_Cases
Expand_Pragma_Contract_Cases
(CCs => Prag,
Subp_Id => Subp_Id,
Decls => Declarations (N),
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2015, 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- --
......@@ -31,7 +31,7 @@ package Exp_Prag is
procedure Expand_N_Pragma (N : Node_Id);
procedure Expand_Contract_Cases
procedure Expand_Pragma_Contract_Cases
(CCs : Node_Id;
Subp_Id : Entity_Id;
Decls : List_Id;
......
......@@ -8045,13 +8045,10 @@ package body Sem_Ch13 is
end;
end if;
-- Get name to be used for Check pragma
-- Get name to be used for Check pragma. Using the original
-- name ensures that 'Class case is properly handled.
if not From_Aspect_Specification (Ritem) then
Nam := Name_Invariant;
else
Nam := Chars (Identifier (Corresponding_Aspect (Ritem)));
end if;
Nam := Original_Aspect_Pragma_Name (Ritem);
-- Build first two arguments for Check pragma
......
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