type: get_member_type_from_key() should take an expression not a symbol
commit293ddb0150b2c8495416f952f2e93bda2a0d3d1f
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 Jan 2013 09:44:36 +0000 (10 12:44 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 Jan 2013 09:44:36 +0000 (10 12:44 +0300)
tree8d1f423d37edbfbb4776758f1a52a234e0a4470d
parent3e1e37ca3c7af4b2e632d67412490fc74d1e913a
type: get_member_type_from_key() should take an expression not a symbol

When I first wrote get member type from key it was only getting the types
for the arguments when a function is declared.  We only have the symbol
there.

Later I used to get the type for arguments passed to functions.  In that
case we need to use the expression otherwise we it passes the same symbol
for both "foo" and "&foo".

This fixes the bug getting the type for "&foo".

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