[analyzer][NFC] Add tests for extents
authorBalazs Benics <balazsbenics@sigmatechnology.se>
Wed, 7 Apr 2021 11:42:29 +0000 (13:42 +0200)
committerBalazs Benics <balazsbenics@sigmatechnology.se>
Wed, 7 Apr 2021 11:43:19 +0000 (13:43 +0200)
commitf0e102c1a39f0f7e9e309b27916533b8fefd9be7
treea6c7213e2e43b23e3a51cc885e01ff937acf97fc
parent583258723fe22cbb8b10d4a21b50a486b2df59ed
[analyzer][NFC] Add tests for extents

If we allocate memory, the extent of the MemRegion will be the symbolic
value of the size parameter. This way, if that symbol gets constrained,
the extent will be also constrained.

This test demonstrates that the extent is indeed the same symbol.

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D99959
clang/test/Analysis/malloc.c