PetScan::extract_argument: handle passing of entire arrays
commitd3e47810d36dc6628c9d7446a2aa332a25cd82d2
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 1 Apr 2014 07:06:02 +0000 (1 09:06 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 3 Apr 2014 10:17:02 +0000 (3 12:17 +0200)
tree0af7ba3d41502cb6e1343a3619872ed7f5a9fef9
parent192f6962e26625857dc150ec2c0f7f71bfa03f95
PetScan::extract_argument: handle passing of entire arrays

PetScan::extract_argument uses a simple heuristic to determine
whether a slice of an array passed to a function should be considered
a read or a write of the slice.  (In particular, if the function
is declared as taking a pointer to a const type, then it is considered
a read, otherwise it is considered a write).
However, it would only consider proper slices of an array and not
entire arrays.  Consider them too for consistency.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
tests/array.c [new file with mode: 0644]
tests/array.scop [new file with mode: 0644]