mtag: improve get_mtag_sval()
commit43720788e139fca3a8f04c12eea897697505b021
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 Jul 2018 13:34:12 +0000 (26 16:34 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 Jul 2018 13:38:46 +0000 (26 16:38 +0300)
tree53d1d7d9421bcd54b39afe7251cb9741e5db8e4c
parent24a95be64b85ca8b5ce34f2f8416ae81d719913c
mtag: improve get_mtag_sval()

Say we want to find out "__smatch_implied(&array);" then get_mtag_sval()
is the function to use.

One change that I made is that for the address of array elements like
"__smatch_implied(&array[4]);" then originally I had thought that I should
create a new mtag for each element, but now I think that it should be just
the mtag of the array plus the offset.  The mtag sort of like a symbol in
sparse/smatch and then we add an offset to that to get the actual address.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_mtag.c
validation/sm_mtag5.c [new file with mode: 0644]