type: introduce get_final_type()
The problem here is that "ptr + 1 - ptr" isn't working. When we do the
subtraction then get_type() says that the type for the subtraction is
ssize_t. But in sval_binop() we want to do a pointer math subtraction so
we want the type to be a pointer type.
But really the result *should* be ssize_t, so that's correct. I have
introduced get_final_type() which gets the final type for an operation.
Probably I should rename get_type() instead, but that seems like a lot
of changes. And I really don't know which code cares about the final
type... When we use the resulting range_list then it gets casted anyway...
Anyway, if we need the final type then the function is there for us.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>