/illumos-gate/usr/src/tools/smatch/src/ |
H A D | symbol.c | 114 sym = sym->ctype.base_type; in bitfield_base_size() 116 sym = sym->ctype.base_type; in bitfield_base_size() 165 sym->ctype.base_type->bit_offset = bit_offset; in lay_out_struct() 211 struct symbol *base_type; in examine_base_type() local 214 base_type = examine_symbol_type(sym->ctype.base_type); in examine_base_type() 215 if (!base_type || base_type->type == SYM_PTR) in examine_base_type() 216 return base_type; in examine_base_type() 217 combine_address_space(sym->pos, &sym->ctype.as, base_type->ctype.as); in examine_base_type() 218 sym->ctype.modifiers |= base_type->ctype.modifiers & MOD_PTRINHERIT; in examine_base_type() 219 concat_ptr_list((struct ptr_list *)base_type->ctype.contexts, in examine_base_type() [all …]
|
H A D | symbol.h | 105 struct symbol *base_type; member 331 extern void merge_type(struct symbol *sym, struct symbol *base_type); 342 return examine_symbol_type(sym->ctype.base_type); in get_base_type() 353 type = type->ctype.base_type; in is_int_type() 355 type = type->ctype.base_type; in is_int_type() 357 type->ctype.base_type == &int_type; in is_int_type() 363 type = type->ctype.base_type; in is_enum_type() 370 sym = sym->ctype.base_type; in is_signed_type() 386 type = type->ctype.base_type; in is_ptr_type() 393 type = type->ctype.base_type; in is_func_type() [all …]
|
H A D | parse.c | 622 sym->ctype.base_type = ptr->type; in init_parser() 680 ctype = ctx->mode->to_mode(ctx->ctype.base_type); in apply_modifiers() 683 show_typename(ctx->ctype.base_type)); in apply_modifiers() 685 ctx->ctype.base_type = ctype; in apply_modifiers() 693 sym->ctype.base_type = ctype->base_type; in alloc_indirect_symbol() 696 ctype->base_type = sym; in alloc_indirect_symbol() 737 ctx->ctype.base_type = sym; in struct_union_enum_specifier() 741 struct decl_state attr = { .ctype.base_type = sym, }; in struct_union_enum_specifier() 765 ctx->ctype.base_type = &bad_ctype; in struct_union_enum_specifier() 771 ctx->ctype.base_type = sym; in struct_union_enum_specifier() [all …]
|
H A D | dissect.c | 60 *base_type(struct symbol *sym), 95 if (!type->ctype.base_type) in fix_mode() 127 sym.ctype.base_type = &bad_ctype; in no_member() 136 struct symbol *ret = mem->ctype.base_type; in report_member() 156 report_implicit(mode, pos, base_type(mem))); in report_implicit() 173 if (!sym->ctype.base_type) in expr_symbol() 174 sym->ctype.base_type = &bad_ctype; in expr_symbol() 182 struct symbol *ret = base_type(sym); in report_symbol() 215 while ((base = node->ctype.base_type) != NULL) in examine_sym_node() 218 node->ctype.base_type = in examine_sym_node() [all …]
|
H A D | smatch_type.c | 254 sym->ctype.base_type = base; in fake_pointer_sym() 382 int type_signed(struct symbol *base_type) in type_signed() argument 384 if (!base_type) in type_signed() 386 if (base_type->ctype.modifiers & MOD_SIGNED) in type_signed() 458 sval_t sval_type_max(struct symbol *base_type) in sval_type_max() argument 462 if (type_is_fp(base_type)) in sval_type_max() 463 return fp_max(base_type); in sval_type_max() 465 if (!base_type || !type_bits(base_type)) in sval_type_max() 466 base_type = &llong_ctype; in sval_type_max() 467 ret.type = base_type; in sval_type_max() [all …]
|
H A D | evaluate.c | 68 struct symbol *base_type; in evaluate_symbol_expression() local 77 base_type = get_base_type(sym); in evaluate_symbol_expression() 78 if (!base_type) { in evaluate_symbol_expression() 111 sym->ctype.base_type = array; in evaluate_string() 121 array->ctype.base_type = &char_ctype; in evaluate_string() 146 type = type->ctype.base_type; in integer_promotion() 213 static struct symbol *base_type(struct symbol *node, unsigned long *modp, struct ident **asp) in base_type() function 222 node = node->ctype.base_type; in base_type() 238 old = base_type(old, &oldmod, &oldas); in is_same_type() 239 new = base_type(new, &newmod, &newas); in is_same_type() [all …]
|
H A D | check_trinity_generator.c | 57 num_args = ptr_list_size((struct ptr_list *)cur_func_sym->ctype.base_type->arguments); in match_return() 68 FOR_EACH_PTR(cur_func_sym->ctype.base_type->arguments, arg) { in match_return() 81 FOR_EACH_PTR(cur_func_sym->ctype.base_type->arguments, arg) { in match_return()
|
H A D | smatch_container_of.c | 407 struct symbol *base_type; in get_member_type_from_offset() local 410 base_type = get_real_base_type(sym); in get_member_type_from_offset() 411 if (base_type && base_type->type == SYM_PTR) in get_member_type_from_offset() 412 base_type = get_real_base_type(base_type); in get_member_type_from_offset() 413 if (offset == 0 && base_type && base_type->type == SYM_BASETYPE) in get_member_type_from_offset() 414 return base_type; in get_member_type_from_offset() 622 FOR_EACH_PTR(cur_func_sym->ctype.base_type->arguments, arg) { in handle_passed_container()
|
H A D | check_uninitialized.c | 35 struct symbol *struct_type, *tmp, *base_type; in mark_members_uninitialized() local 42 base_type = get_real_base_type(tmp); in mark_members_uninitialized() 43 if (!base_type || in mark_members_uninitialized() 44 base_type->type == SYM_STRUCT || in mark_members_uninitialized() 45 base_type->type == SYM_ARRAY || in mark_members_uninitialized() 46 base_type->type == SYM_UNION) in mark_members_uninitialized()
|
H A D | c2xml.c | 188 if (sym->ctype.base_type) { in examine_symbol() 189 if ((base = builtin_typename(sym->ctype.base_type)) == NULL) { in examine_symbol() 190 if (!sym->ctype.base_type->aux) { in examine_symbol() 191 examine_symbol(sym->ctype.base_type, root_node); in examine_symbol() 194 xmlGetProp((xmlNodePtr)sym->ctype.base_type->aux, BAD_CAST "id")); in examine_symbol()
|
H A D | check_rosenberg.c | 63 struct symbol *tmp, *base_type; in check_struct() local 72 base_type = get_real_base_type(tmp); in check_struct() 73 if (base_type && base_type->type == SYM_STRUCT) { in check_struct() 74 if (check_struct(expr, base_type)) in check_struct() 85 if (base_type == &bool_ctype) in check_struct()
|
H A D | builtin.c | 270 type = type->ctype.base_type; in evaluate_overflow_gen() 275 type = type->ctype.base_type; in evaluate_overflow_gen() 280 type = type->ctype.base_type; in evaluate_overflow_gen() 283 if (type->ctype.base_type != &int_type || type == &bool_ctype) in evaluate_overflow_gen() 325 struct symbol *base_type; member 360 sym->ctype.base_type = ptr->base_type; in init_builtins() 375 sym->ctype.base_type = fun; in declare_builtin() 379 fun->ctype.base_type = rtype; in declare_builtin() 385 anode->ctype.base_type = arg; in declare_builtin()
|
H A D | smatch_unknown_value.c | 55 fake_fn_symbol.ctype.base_type = &llong_ctype; in initialize_local_variables() 56 fake_node_symbol.ctype.base_type = &fake_fn_symbol; in initialize_local_variables()
|
H A D | sparse-llvm.c | 32 return symbol_type(sym->ctype.base_type); in func_return_type() 44 struct symbol *arg_sym = arg->ctype.base_type; in sym_func_type() 55 struct symbol *base_type; in sym_array_type() local 57 base_type = sym->ctype.base_type; in sym_array_type() 59 assert(base_type->bit_size > 0); in sym_array_type() 61 elem_type = symbol_type(base_type); in sym_array_type() 65 return LLVMArrayType(elem_type, sym->bit_size / base_type->bit_size); in sym_array_type() 119 if (is_void_type(sym->ctype.base_type)) in sym_ptr_type() 122 type = symbol_type(sym->ctype.base_type); in sym_ptr_type() 181 return symbol_type(sym->ctype.base_type); in symbol_type() [all …]
|
H A D | check_expects_err_ptr.c | 37 FOR_EACH_PTR(func_sym->ctype.base_type->arguments, arg) { in match_function_def() 62 FOR_EACH_PTR(func_sym->ctype.base_type->arguments, arg) { in get_arg_num()
|
H A D | expand.c | 175 ctype = ctype->ctype.base_type; in warn_shift_count() 509 struct ctype c1 = {.base_type = left}; in compare_types() 510 struct ctype c2 = {.base_type = right}; in compare_types() 1117 struct symbol *base_type; in expand_symbol() local 1121 base_type = sym->ctype.base_type; in expand_symbol() 1122 if (!base_type) in expand_symbol() 1127 if (base_type->type == SYM_FN) { in expand_symbol() 1128 if (base_type->stmt) in expand_symbol() 1129 expand_statement(base_type->stmt); in expand_symbol() 1313 ctype = ctype->ctype.base_type; in __get_expression_value()
|
H A D | check_puts_argument.c | 42 FOR_EACH_PTR(this_func->ctype.base_type->arguments, arg) { in parent_is_arg() 96 FOR_EACH_PTR(this_func->ctype.base_type->arguments, arg) { in print_arg()
|
H A D | test-dissect.c | 54 show_typename(sym->ctype.base_type)); in r_symbol() 71 show_typename(mem ? mem->ctype.base_type : sym)); in r_member()
|
H A D | smatch_flow.c | 916 struct symbol *base_type = get_base_type(cur_func_sym); in handle_backward_goto() local 932 func_stmt = base_type->stmt; in handle_backward_goto() 934 func_stmt = base_type->inline_stmt; in handle_backward_goto() 1567 struct symbol *base_type = get_base_type(sym); in split_function() local 1570 if (!base_type->stmt && !base_type->inline_stmt) in split_function() 1588 __split_stmt(base_type->stmt); in split_function() 1589 __split_stmt(base_type->inline_stmt); in split_function() 1596 __split_stmt(base_type->stmt); in split_function() 1597 __split_stmt(base_type->inline_stmt); in split_function() 1664 struct symbol *base_type; in parse_inline() local [all …]
|
H A D | check_frees_argument.c | 43 FOR_EACH_PTR(this_func->ctype.base_type->arguments, arg) { in is_arg() 98 FOR_EACH_PTR(this_func->ctype.base_type->arguments, arg) { in print_arg()
|
H A D | smatch_function_ptrs.c | 402 struct symbol *base_type; in print_initializer_list() local 418 base_type = get_type(expr->ident_expression); in print_initializer_list() 419 if (!base_type || base_type->type != SYM_FN) in print_initializer_list()
|
H A D | linearize.c | 946 base = base->ctype.base_type; in bitfield_base_type() 948 return base->ctype.base_type; in bitfield_base_type() 1258 s = s->ctype.base_type; in get_mtype() 1261 if (s->ctype.base_type == &void_ctype) in get_mtype() 1268 s = s->ctype.base_type; in get_mtype() 1273 if (s->ctype.base_type == &fp_type) in get_mtype() 1275 if (s->ctype.base_type == &int_type) in get_mtype() 1347 src = src->ctype.base_type; in get_cast_opcode() 1349 dst = dst->ctype.base_type; in get_cast_opcode() 1504 fntype = fntype->ctype.base_type; in linearize_call_expression() [all …]
|
H A D | ssa.c | 25 type = type->ctype.base_type; in is_promotable() 67 if (type->ctype.base_type == &int_type) in is_promotable() 69 if (type->ctype.base_type == &fp_type) in is_promotable()
|
H A D | compile-i386.c | 807 struct symbol *base_type = sym->ctype.base_type; in emit_func_pre() local 809 FOR_EACH_PTR(base_type->arguments, arg) { in emit_func_pre() 834 FOR_EACH_PTR(base_type->arguments, arg) { in emit_func_pre() 969 struct symbol *base_type = sym->ctype.base_type; in emit_initializer() local 970 assert(base_type != NULL); in emit_initializer() 972 emit_scalar(expr, sym->bit_size / get_expression_value(base_type->array_size)); in emit_initializer() 1052 struct symbol *base_type = sym->ctype.base_type; in emit_array() local 1056 assert(base_type != NULL); in emit_array() 1075 entry->init_offset / (base_type->bit_size / 8); in emit_array() 1807 type = sym->ctype.base_type; in x86_symbol() [all …]
|
H A D | check_unwind.c | 50 FOR_EACH_PTR(cur_func_sym->ctype.base_type->arguments, arg) { in was_passed_as_param() 128 if (type && type->ctype.base_type == &int_type) { in func_returns_int()
|