aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ghost.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2015-01-07 08:49:42 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-01-07 09:49:42 +0100
commit18dae8141c435922e4571e399c99bda2af1f93b3 (patch)
tree0ef00988e6c21e125c8ed2a1737dc25fc10e6521 /gcc/ada/ghost.adb
parent7806a9ed84c45d9424667c07e3501a618d763050 (diff)
downloadgcc-18dae8141c435922e4571e399c99bda2af1f93b3.zip
gcc-18dae8141c435922e4571e399c99bda2af1f93b3.tar.gz
gcc-18dae8141c435922e4571e399c99bda2af1f93b3.tar.bz2
prj.ads, [...]: Minor reformatting.
2015-01-07 Robert Dewar <dewar@adacore.com> * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor reformatting. 2015-01-07 Robert Dewar <dewar@adacore.com> * restrict.adb (Check_Restriction_No_Use_Of_Attribute): New procedure. (OK_No_Use_Of_Entity_Name): New function. (Set_Restriction_No_Use_Of_Entity): New procedure. * restrict.ads (Check_Restriction_No_Use_Of_Attribute): New procedure. (OK_No_Use_Of_Entity_Name): New function. (Set_Restriction_No_Use_Of_Entity): New procedure. * sem_ch8.adb (Find_Direct_Name): Add check for violation of No_Use_Of_Entity. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Add processing for new restriction No_Use_Of_Entity. From-SVN: r219282
Diffstat (limited to 'gcc/ada/ghost.adb')
-rw-r--r--gcc/ada/ghost.adb12
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb
index b69c74e..2c3be8f 100644
--- a/gcc/ada/ghost.adb
+++ b/gcc/ada/ghost.adb
@@ -82,7 +82,7 @@ package body Ghost is
for Index in reverse Ignored_Ghost_Units.First ..
Ignored_Ghost_Units.Last
loop
- -- The unit is already present in the table, do not add it again
+ -- If the unit is already present in the table, do not add it again
if Unit = Ignored_Ghost_Units.Table (Index) then
return;
@@ -260,11 +260,10 @@ package body Ghost is
Ref : Node_Id;
begin
- Ref := N;
-
-- When the reference extracts a subcomponent, recover the
-- related object (SPARK RM 6.9(1)).
+ Ref := N;
while Nkind_In (Ref, N_Explicit_Dereference,
N_Indexed_Component,
N_Selected_Component,
@@ -884,11 +883,10 @@ package body Ghost is
elsif Nkind_In (N, N_Assignment_Statement,
N_Procedure_Call_Statement)
then
- Nam := Name (N);
-
-- When the reference extracts a subcomponent, recover the related
-- object (SPARK RM 6.9(1)).
+ Nam := Name (N);
while Nkind_In (Nam, N_Explicit_Dereference,
N_Indexed_Component,
N_Selected_Component,
@@ -922,10 +920,8 @@ package body Ghost is
begin
if Is_Checked_Ghost_Entity (Id) then
Ghost_Mode := Check;
-
elsif Is_Ignored_Ghost_Entity (Id) then
Ghost_Mode := Ignore;
-
Propagate_Ignored_Ghost_Code (N);
end if;
end Set_Ghost_Mode_For_Freeze;
@@ -936,11 +932,9 @@ package body Ghost is
procedure Set_Is_Ghost_Entity (Id : Entity_Id) is
Policy : constant Name_Id := Policy_In_Effect (Name_Ghost);
-
begin
if Policy = Name_Check then
Set_Is_Checked_Ghost_Entity (Id);
-
elsif Policy = Name_Ignore then
Set_Is_Ignored_Ghost_Entity (Id);
end if;