type: speed up get_type()
commit183362897b9c795d502f7022c034a29ad1914b4f
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 4 May 2015 09:29:19 +0000 (4 12:29 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 4 May 2015 09:29:19 +0000 (4 12:29 +0300)
tree54aeab1a9fa82b66bd57443df0ff523d663c014c
parent9ddd63187c5a385acd6915e3b696860ab0b3d242
type: speed up get_type()

get_type() is called very often so speeding it up is nice.

We can speed it up by querying expr->ctype, and if that pointer is not set
then set it at the end so we can use it the next time get_type() is called.

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