PetScan::set_upper_bounds: use declared size of static array argument
That is, if a function argument is declared as in
void foo(int A[static 5])
then take into account the number of elements "5" we expect in A
in the description of the "extent" of A.
Commit
bd7b836 (PetScan::extract_array: use declared size on VLA parameters
with static size, Wed Oct 3 12:39:40 2012 +0200) added similar support
for array function arguments with variable size.
Unfortunately, the way we retrieve the original declared type
only works for recent versions of clang (3.4 and newer).
We therefore do not add a test case.
It is not clear if there are other ways of obtaining this original type.
Reported-by: Javed Absar <Javed.Absar@arm.com>
Tested-by: Riyadh BAGHDADI <baghdadi.m.riyadh@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>