type: introduce get_promoted_type()
commitbe6ea829b622e3426ac99e085edbe8b399ce9658
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Jul 2018 14:00:32 +0000 (24 17:00 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Jul 2018 14:00:32 +0000 (24 17:00 +0300)
tree37a0f3cd2fdc0d18e314fcd2e5b83e4ea916b0e6
parent2b8f61e7104af09fea2b051dc16b6319e6cd5aae
type: introduce get_promoted_type()

One common thing is that we want to parse a binop "a + b" and we want to
get the type to promote it to.  I've created a function for this.

Also if you add an unsigned long to a pointer the result is still a
pointer, so in this sense this is a bug fix.

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