[Ada] Add Depends contracts to Delete procedures of formal containers

2020-06-08  Claire Dross  <dross@adacore.com>

gcc/ada/

	* libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
	libgnat/a-cfhase.ads, libgnat/a-cforma.ads, libgnat/a-cforse.ads
	(Delete): Add Depends contract.
This commit is contained in:
Claire Dross 2020-02-10 12:30:40 +01:00 committed by Pierre-Marie de Rodat
parent 9490fd58a8
commit 54c1fdb62b
5 changed files with 20 additions and 15 deletions

View File

@ -790,6 +790,7 @@ is
procedure Delete (Container : in out List; Position : in out Cursor) with
Global => null,
Depends => (Container =>+ Position, Position => null),
Pre => Has_Element (Container, Position),
Post =>
Length (Container) = Length (Container)'Old - 1

View File

@ -670,6 +670,7 @@ is
procedure Delete (Container : in out Map; Position : in out Cursor) with
Global => null,
Depends => (Container =>+ Position, Position => null),
Pre => Has_Element (Container, Position),
Post =>
Position = No_Element

View File

@ -802,6 +802,7 @@ is
procedure Delete (Container : in out Set; Position : in out Cursor) with
Global => null,
Depends => (Container =>+ Position, Position => null),
Pre => Has_Element (Container, Position),
Post =>
Position = No_Element

View File

@ -734,6 +734,7 @@ is
procedure Delete (Container : in out Map; Position : in out Cursor) with
Global => null,
Depends => (Container =>+ Position, Position => null),
Pre => Has_Element (Container, Position),
Post =>
Position = No_Element

View File

@ -859,6 +859,7 @@ is
Position : in out Cursor)
with
Global => null,
Depends => (Container =>+ Position, Position => null),
Pre => Has_Element (Container, Position),
Post =>
Position = No_Element