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@xxxxxxxxx> --- symbol.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/symbol.h b/symbol.h index 4edb44041..d6d3fe598 100644 --- a/symbol.h +++ b/symbol.h @@ -326,6 +326,11 @@ static inline struct symbol *get_base_type(const struct symbol *sym) return examine_symbol_type(sym->ctype.base_type); } +/* + * is_int_type() - test if @type is an integer type, + * including enums & bitfields but excluding + * restricted/bitwise integers. + */ static inline int is_int_type(const struct symbol *type) { if (type->type == SYM_NODE) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html