Home
last modified time | relevance | path

Searched refs:left_type (Results 1 – 8 of 8) sorted by relevance

/illumos-gate/usr/src/tools/smatch/src/
H A Dcheck_buffer_too_small_for_struct.c26 struct symbol *left_type, *right_type; in match_assign() local
32 left_type = get_type(expr->left); in match_assign()
33 if (!left_type || left_type->type != SYM_PTR) in match_assign()
35 left_type = get_real_base_type(left_type); in match_assign()
36 if (!left_type || left_type->type != SYM_STRUCT) in match_assign()
49 if (bytes >= type_bytes(left_type)) in match_assign()
67 struct symbol *left_type; in match_dereferences() local
83 left_type = get_type(expr); in match_dereferences()
84 if (!left_type || left_type->type != SYM_PTR) in match_dereferences()
86 left_type = get_real_base_type(left_type); in match_dereferences()
[all …]
H A Dcheck_struct_type.c28 struct symbol *left_type; in match_assign() local
32 left_type = get_type(left); in match_assign()
33 if (!left_type || left_type->type != SYM_PTR) in match_assign()
35 left_type = get_real_base_type(left_type); in match_assign()
36 if (!left_type || left_type->type != SYM_STRUCT) in match_assign()
49 if (strcmp(left_type->ident->name, size_type->ident->name) == 0) in match_assign()
51 sm_warning("struct type mismatch '%s vs %s'", left_type->ident->name, in match_assign()
H A Dsmatch_type_val.c360 left_type = get_type(expr->left); in is_uncasted_pointer_assign()
363 if (!left_type || !right_type) in is_uncasted_pointer_assign()
366 if (left_type->type == SYM_STRUCT && left_type == right_type) in is_uncasted_pointer_assign()
369 if (left_type->type != SYM_PTR && in is_uncasted_pointer_assign()
370 left_type->type != SYM_ARRAY) in is_uncasted_pointer_assign()
375 left_type = get_real_base_type(left_type); in is_uncasted_pointer_assign()
378 if (left_type == right_type) in is_uncasted_pointer_assign()
421 struct symbol *left_type; in is_uncasted_fn_param_from_db() local
438 if (!left_type || left_type->type != SYM_PTR) in is_uncasted_fn_param_from_db()
440 left_type = get_real_base_type(left_type); in is_uncasted_fn_param_from_db()
[all …]
H A Dcheck_allocating_enough_data.c23 struct symbol *left_type, *right_type; in db_returns_buf_size() local
35 left_type = get_pointer_type(expr->left); in db_returns_buf_size()
39 if (!left_type) in db_returns_buf_size()
41 bytes = type_bytes(left_type); in db_returns_buf_size()
H A Dcheck_64bit_shift.c55 struct symbol *left_type, *right_type; in match_shift_assignment() local
65 left_type = get_type(expr->left); in match_shift_assignment()
66 if (left_type != &llong_ctype && left_type != &ullong_ctype) in match_shift_assignment()
H A Dsmatch_struct_assignment.c88 static struct expression *get_right_base_expr(struct symbol *left_type, struct expression *right) in get_right_base_expr() argument
98 if (struct_type != left_type) in get_right_base_expr()
408 struct symbol *left_type; in __fake_struct_member_assignments() local
416 left_type = get_type(expr->left); in __fake_struct_member_assignments()
417 if (!left_type || in __fake_struct_member_assignments()
418 (left_type->type != SYM_PTR && in __fake_struct_member_assignments()
419 left_type->type != SYM_STRUCT)) in __fake_struct_member_assignments()
H A Dsmatch_kernel_user_data.c519 struct symbol *left_type, *right_type; in handle_struct_assignment() local
521 left_type = get_type(expr->left); in handle_struct_assignment()
522 if (!left_type || left_type->type != SYM_PTR) in handle_struct_assignment()
524 left_type = get_real_base_type(left_type); in handle_struct_assignment()
525 if (!left_type) in handle_struct_assignment()
527 if (left_type->type != SYM_STRUCT && in handle_struct_assignment()
528 left_type->type != SYM_UNION) in handle_struct_assignment()
545 if (right_type == left_type) in handle_struct_assignment()
H A Dsmatch_extra.c1074 struct symbol *left_type; in match_vanilla_assign() local
1095 left_type = get_type(left); in match_vanilla_assign()
1110 state = alloc_estate_sval(sval_cast(left_type, sval)); in match_vanilla_assign()
1119 sval = sval_cast(left_type, sval); in match_vanilla_assign()
1131 state = alloc_estate_rl(alloc_whole_rl(left_type)); in match_vanilla_assign()
1142 rl = cast_rl(left_type, rl); in match_vanilla_assign()
1152 rl = cast_rl(left_type, rl); in match_vanilla_assign()
1170 struct symbol *left_type; in match_assign() local
1195 left_type = get_type(left); in match_assign()
1212 rl = cast_rl(left_type, rl); in match_assign()
[all …]