diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-03 18:47:14 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-10-05 03:29:19 +0200 |
commit | cdc6e0ce1b6dfe043cd436bd6ac45cbd0fec22c0 (patch) | |
tree | 029d4248eac3d3d3ddd6350d7513921f1b532d70 | |
parent | 20042e2851a6ff07232f1a5ac3da4413499bc4d3 (diff) | |
download | sparse-cdc6e0ce1b6dfe043cd436bd6ac45cbd0fec22c0.tar.gz |
doc: is_int_type() returns false for SYM_RESTRICTs
It isn't at all obvious that is_int_type() return false for
restricted/bitwise types. It's even quite counter-intuitive.
So document this.
Note: Fortunately, there isn't a lot of callers and the main
callers are all in parse.c and are OK. OTOH, the callers
in sparse-llvm.c are wrong and need another helper.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | symbol.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -335,6 +335,11 @@ static inline struct symbol *get_base_type(const struct symbol *sym) return examine_symbol_type(sym->ctype.base_type); } +/// +// test if type is an integer type +// +// @return: ``1`` for plain integer type, enums & bitfields +// but ``0`` for bitwise types! static inline int is_int_type(const struct symbol *type) { if (type->type == SYM_NODE) |