extra: store values for expressions like "foo[3].bar"
commitebb62de1eb6529246b88422c10ad01f08dabf411
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Dec 2017 09:57:04 +0000 (7 12:57 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Dec 2017 09:57:04 +0000 (7 12:57 +0300)
treed41c721260ca8c84838e746b357b43e6c49ad413
parent622de79bf4b7cbe283c469e6db3ff1388c927da1
extra: store values for expressions like "foo[3].bar"

Before we used to store values for array elements like:

foo[3] = x;

But we didn't for:

foo[3].bar = y;

The reason is that foo[3].bar isn't an array so is_array() returned false,
but it does contain an array so the normal code wouldn't store it either.
I've added a work-around.  It's not ideal...

Also I had to change smatch_flow.c because it wasn't using the right
functions to see if there was an extra state.  The original smatch_flow
code couldn't handle chunk values.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_extra.c
smatch_flow.c