Lines Matching refs:type

56 enum type {  enum
117 enum keyword type; member
139 enum type type:8;
305 extern struct symbol *create_symbol(int stream, const char *name, int type, int namespace);
311 extern struct symbol *alloc_symbol(struct position, int type);
328 extern const char* get_type_name(enum type type);
350 static inline int is_int_type(const struct symbol *type) in is_int_type() argument
352 if (type->type == SYM_NODE) in is_int_type()
353 type = type->ctype.base_type; in is_int_type()
354 if (type->type == SYM_ENUM) in is_int_type()
355 type = type->ctype.base_type; in is_int_type()
356 return type->type == SYM_BITFIELD || in is_int_type()
357 type->ctype.base_type == &int_type; in is_int_type()
360 static inline int is_enum_type(const struct symbol *type) in is_enum_type() argument
362 if (type->type == SYM_NODE) in is_enum_type()
363 type = type->ctype.base_type; in is_enum_type()
364 return (type->type == SYM_ENUM); in is_enum_type()
369 if (sym->type == SYM_NODE) in is_signed_type()
371 if (sym->type == SYM_PTR) in is_signed_type()
376 static inline int is_type_type(struct symbol *type) in is_type_type() argument
378 return (type->ctype.modifiers & MOD_TYPE) != 0; in is_type_type()
381 static inline int is_ptr_type(struct symbol *type) in is_ptr_type() argument
383 if (!type) in is_ptr_type()
385 if (type->type == SYM_NODE) in is_ptr_type()
386 type = type->ctype.base_type; in is_ptr_type()
387 return type->type == SYM_PTR || type->type == SYM_ARRAY || type->type == SYM_FN; in is_ptr_type()
390 static inline int is_func_type(struct symbol *type) in is_func_type() argument
392 if (type->type == SYM_NODE) in is_func_type()
393 type = type->ctype.base_type; in is_func_type()
394 return type->type == SYM_FN; in is_func_type()
397 static inline int is_array_type(struct symbol *type) in is_array_type() argument
399 if (type->type == SYM_NODE) in is_array_type()
400 type = type->ctype.base_type; in is_array_type()
401 return type->type == SYM_ARRAY; in is_array_type()
404 static inline int is_float_type(struct symbol *type) in is_float_type() argument
406 if (type->type == SYM_NODE) in is_float_type()
407 type = type->ctype.base_type; in is_float_type()
408 return type->ctype.base_type == &fp_type; in is_float_type()
411 static inline int is_byte_type(struct symbol *type) in is_byte_type() argument
413 return type->bit_size == bits_in_char && type->type != SYM_BITFIELD; in is_byte_type()
416 static inline int is_void_type(struct symbol *type) in is_void_type() argument
418 if (type->type == SYM_NODE) in is_void_type()
419 type = type->ctype.base_type; in is_void_type()
420 return type == &void_ctype; in is_void_type()
423 static inline int is_bool_type(struct symbol *type) in is_bool_type() argument
425 if (type->type == SYM_NODE) in is_bool_type()
426 type = type->ctype.base_type; in is_bool_type()
427 return type == &bool_ctype; in is_bool_type()
430 static inline int is_scalar_type(struct symbol *type) in is_scalar_type() argument
432 if (type->type == SYM_NODE) in is_scalar_type()
433 type = type->ctype.base_type; in is_scalar_type()
434 switch (type->type) { in is_scalar_type()
443 if (type->ctype.base_type == &int_type) in is_scalar_type()
445 if (type->ctype.base_type == &fp_type) in is_scalar_type()
451 static inline bool is_integral_type(struct symbol *type) in is_integral_type() argument
453 if (type->type == SYM_NODE) in is_integral_type()
454 type = type->ctype.base_type; in is_integral_type()
455 switch (type->type) { in is_integral_type()
463 if (type->ctype.base_type == &int_type) in is_integral_type()
468 static inline int is_function(struct symbol *type) in is_function() argument
470 return type && type->type == SYM_FN; in is_function()
480 static inline int get_sym_type(struct symbol *type) in get_sym_type() argument
482 if (type->type == SYM_NODE) in get_sym_type()
483 type = type->ctype.base_type; in get_sym_type()
484 if (type->type == SYM_ENUM) in get_sym_type()
485 type = type->ctype.base_type; in get_sym_type()
486 return type->type; in get_sym_type()
504 #define is_restricted_type(type) (get_sym_type(type) == SYM_RESTRICT) argument
505 #define is_fouled_type(type) (get_sym_type(type) == SYM_FOULED) argument
506 #define is_bitfield_type(type) (get_sym_type(type) == SYM_BITFIELD) argument
508 void create_fouled(struct symbol *type);
509 struct symbol *befoul(struct symbol *type);