diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-08-08 06:26:28 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-08-08 15:36:51 +0200 |
| commit | ce8785f0a92426cc2039a00e9fc8699b5e7d3ce1 (patch) | |
| tree | 9e18ec756774394342cc9f855b04c56a75699277 | |
| parent | 7d3b07840e745152eca4723790c4a988b623107a (diff) | |
| download | sparse-dev-ce8785f0a92426cc2039a00e9fc8699b5e7d3ce1.tar.gz | |
wstring: add helper is_wchar_type()
Like is_byte_type() but for wide chars.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | symbol.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -430,6 +430,13 @@ static inline int is_byte_type(struct symbol *type) return type->bit_size == bits_in_char && type->type != SYM_BITFIELD; } +static inline int is_wchar_type(struct symbol *type) +{ + if (type->type == SYM_NODE) + type = type->ctype.base_type; + return type == wchar_ctype; +} + static inline int is_void_type(struct symbol *type) { if (type->type == SYM_NODE) |
