/illumos-gate/usr/src/tools/smatch/src/ |
H A D | smatch_helper.c | 193 struct expression *unop = strip_expr(deref->unop); in __get_variable_from_expr() local 195 if (unop->type == EXPR_PREOP && unop->op == '&') { in __get_variable_from_expr() 196 deref = unop->unop; in __get_variable_from_expr() 706 if (!expr->unop) in get_expression_statement() 721 if (!expr->unop) in strip_parens() 760 unop = strip_expr_helper(expr->unop, set_parent); in strip_expr_helper() 763 unop->type == EXPR_PREOP && unop->op == '&') { in strip_expr_helper() 764 struct symbol *type = get_type(unop->unop); in strip_expr_helper() 768 return strip_expr_helper(unop->unop, set_parent); in strip_expr_helper() 772 return unop; in strip_expr_helper() [all …]
|
H A D | smatch_address.c | 219 expr = strip_expr(expr->unop); in handle_fn_address() 234 struct expression *unop; in get_address_rl() local 268 expr = strip_expr(expr->unop); in get_address_rl() 322 unop = strip_expr(expr->unop); in get_address_rl() 323 if (unop->type == EXPR_PREOP && unop->op == '*') in get_address_rl() 324 unop = strip_expr(unop->unop); in get_address_rl() 327 get_implied_rl(unop, &unop_rl) && in get_address_rl() 334 if (implied_not_equal(unop, 0) || offset > 0) { in get_address_rl()
|
H A D | check_memcpy_overflow.c | 57 expr = strip_parens(expr->unop); in bytes_to_end_of_struct() 67 deref = deref->unop; in bytes_to_end_of_struct() 85 expr = strip_parens(expr->unop); in size_of_union() 88 expr = expr->unop; in size_of_union() 141 expr = strip_parens(expr->unop); in ends_on_struct_member_boundary() 150 type = get_type(expr->unop); in ends_on_struct_member_boundary() 154 struct expression *unop = strip_expr(expr->unop); in ends_on_struct_member_boundary() local 156 if (unop->type != EXPR_DEREF) in ends_on_struct_member_boundary() 158 type = get_type(unop->unop); in ends_on_struct_member_boundary() 200 expr = expr->unop; in is_one_element_array()
|
H A D | check_uninitialized.c | 95 set_state_expr(my_id, right->unop, &initialized); in match_assign() 159 if (is_initialized(expr->unop)) in match_dereferences() 162 name = expr_to_str(expr->unop); in match_dereferences() 166 set_state_expr(my_id, expr->unop, &initialized); in match_dereferences() 252 type = get_type(arg->unop); in match_call_struct_members() 255 arg_name = expr_to_var_sym(arg->unop, &sym); in match_call_struct_members() 330 arg = strip_expr(arg->unop); in match_untracked() 345 arg = strip_expr(arg->unop); in match_ignore_param()
|
H A D | check_precedence.c | 67 if (expr->left->unop->type == EXPR_PREOP && expr->left->unop->op == '!') in match_condition() 73 if (is_bool(expr->left->unop)) in match_condition() 75 if (is_bool_from_context(expr->left->unop)) in match_condition()
|
H A D | smatch_var_sym.c | 34 struct expression *unop; in expr_to_vsl() local 44 unop = strip_expr(expr->unop); in expr_to_vsl() 46 if (unop->type == EXPR_SYMBOL) in expr_to_vsl() 48 return expr_to_vsl(unop); in expr_to_vsl()
|
H A D | expression.c | 512 deref->unop = add; in postfix_expression() 525 post->unop = expr; in postfix_expression() 534 inner->unop = expr; in postfix_expression() 642 struct expression *unop; in unary_expression() local 646 next = cast_expression(token->next, &unop); in unary_expression() 647 if (!unop) { in unary_expression() 654 unary->unop = unop; in unary_expression() 660 struct expression *unop; in unary_expression() local 664 next = cast_expression(token->next, &unop); in unary_expression() 665 if (!unop) { in unary_expression() [all …]
|
H A D | dissect.c | 297 return expr->unop; in peek_preop() 299 expr = expr->unop; in peek_preop() 385 struct expression *unop = expr->unop; in do_expression() local 394 ret = do_expression(mode, unop); in do_expression() 397 if ((expr = peek_preop(unop, '*'))) in do_expression() 399 ret = alloc_symbol(unop->pos, SYM_PTR); in do_expression() 401 do_expression(u_addr(mode), unop); in do_expression() 404 if ((expr = peek_preop(unop, '&'))) in do_expression() 413 ret = do_expression(mode, unop); in do_expression()
|
H A D | expand.c | 614 return expand_expression(expr->unop); in expand_addressof() 654 struct expression *unop = expr->unop; in expand_dereference() local 657 expand_expression(unop); in expand_dereference() 674 if (unop->type == EXPR_BINOP && unop->op == '+') { in expand_dereference() 678 unop = unop->left; in expand_dereference() 682 if (unop->type == EXPR_SYMBOL) { in expand_dereference() 683 struct symbol *sym = unop->symbol; in expand_dereference() 712 struct expression *op = expr->unop; in simplify_preop() 745 struct expression *op = expr->unop; in simplify_float_preop() 766 expand_expression(expr->unop); in expand_postop() [all …]
|
H A D | check_return_negative_var.c | 34 macro = get_macro_name(expr->unop->pos); in match_return() 43 expr = get_assigned_expr(ret_value->unop); in match_return()
|
H A D | check_cast_assign.c | 28 expr = strip_parens(expr->unop); in get_cast_type() 46 ptr = strip_expr(expr->left->unop); in match_overflow()
|
H A D | smatch_function_ptrs.c | 62 expr = strip_expr(expr->unop); in xxx_is_array() 87 expr = strip_expr(expr->unop); in xxx_get_array_base() 191 expr = strip_expr(expr->unop); in get_fnptr_name() 251 tmp = strip_expr(tmp->unop); in match_passes_function_pointer() 325 right = strip_expr(right->unop); in match_function_assign() 389 expr = strip_expr(expr->unop); in match_returns_function_pointer()
|
H A D | smatch_extra.c | 621 *unop = unop_expr; in get_countdown_info() 633 *unop = condition; in get_countdown_info() 659 iter_var = unop->unop; in handle_canonical_while_count_down() 680 if (unop->type == EXPR_PREOP) { in handle_canonical_while_count_down() 707 iter_var = iter_expr->unop; in handle_canonical_for_inc() 760 iter_var = iter_expr->unop; in handle_canonical_for_dec() 849 struct expression *unop; in while_count_down_after() local 996 set_extra_expr_mod(tmp->unop, alloc_estate_whole(get_type(tmp->unop))); in match_function_call() 1373 check_dereference(expr->unop); in match_dereferences() 1462 type = get_type(left->unop); in handle_postop_inc() [all …]
|
H A D | evaluate.c | 90 expr->unop = addr; in evaluate_symbol_expression() 129 expr->unop = addr; in evaluate_string() 320 old->unop = cast_to(old->unop, type); in cast_to() 1723 e1->unop = e0; in degenerate() 1749 expr->unop = e4; in degenerate() 1777 *expr = *op->unop; in evaluate_addressof() 1804 *expr = *op->unop; in evaluate_dereference() 1838 *op = *op->unop; in evaluate_dereference() 1912 expr->unop = cast_to(expr->unop, ctype); in evaluate_sign() 2138 expr->unop = add; in evaluate_member_dereference() [all …]
|
H A D | check_passes_sizeof.c | 44 expr = expr->unop; in remove_dereference() 47 return expr->unop; in remove_dereference()
|
H A D | smatch_buf_size.c | 135 type = get_type(expr->unop); in bytes_per_element() 137 expr = expr->unop; in bytes_per_element() 305 expr = expr->unop; in get_real_array_size() 360 tmp = strip_expr(expr->unop); in remove_addr_fluff() 365 expr = strip_expr(tmp->unop); in remove_addr_fluff() 434 expr = strip_parens(expr->unop); in get_stored_size_end_struct_bytes() 609 type = get_type(expr->unop); in strip_ampersands() 612 return expr->unop; in strip_ampersands()
|
H A D | inline.c | 107 struct expression *unop = copy_expression(expr->unop); in copy_expression() local 108 if (expr->unop == unop) in copy_expression() 111 expr->unop = unop; in copy_expression()
|
H A D | smatch_math.c | 133 if (known_condition_true(expr->unop)) { in handle_negate_rl() 137 if (known_condition_false(expr->unop)) { in handle_negate_rl() 145 if (implied_condition_true(expr->unop)) { in handle_negate_rl() 149 if (implied_condition_false(expr->unop)) { in handle_negate_rl() 168 sval_cast(get_type(expr->unop), sval); in handle_bitwise_negate() 316 left = strip_expr(left->unop); in handle_offset_subtraction() 329 right = strip_expr(right->unop); in handle_offset_subtraction() 1861 return implied_not_equal(expr->unop, 1); in implied_condition_true() 1863 return implied_not_equal(expr->unop, -1); in implied_condition_true() 1873 if (implied_condition_false(expr->unop)) in implied_condition_true() [all …]
|
H A D | check_zero_to_err_ptr.c | 43 next = strip_expr(next->unop); in next_line_is_if() 65 next = strip_expr(next->unop); in next_line_checks_IS_ERR()
|
H A D | smatch_container_of.c | 111 expr = expr->unop; in get_deref_count() 126 expr = expr->unop; in get_partial_deref() 148 expr = expr->unop; in partial_deref_to_offset_str() 247 container = strip_expr(container->unop); in get_container_name_helper() 249 expr = strip_expr(expr->unop); in get_container_name_helper()
|
H A D | smatch_recurse.c | 41 ret = recurse(expr->unop, func, param, nr); in recurse() 44 ret = recurse(expr->unop, func, param, nr); in recurse()
|
H A D | show-parse.c | 758 if (fn->unop->type == EXPR_SYMBOL) { in show_call_expression() 759 struct symbol *sym = fn->unop->symbol; in show_call_expression() 817 int target = show_expression(expr->unop); in show_regular_preop() 839 return show_expression(expr->unop); in show_address_gen() 910 int addr = show_address_gen(expr->unop); in show_inc_dec() 915 retval = show_load_gen(bits, expr->unop, addr); in show_inc_dec() 920 show_store_gen(bits, new, expr->unop, addr); in show_inc_dec()
|
H A D | check_rosenberg.c | 139 ptr = strip_expr(ptr->unop); in match_clear() 243 data = strip_expr(data->unop); in check_was_initialized() 262 data = strip_expr(data->unop); in check_skb_put()
|
H A D | smatch_mtag.c | 357 expr = strip_expr(expr->unop); in expr_to_mtag_offset() 371 expr = strip_expr(expr->unop); in expr_to_mtag_offset() 436 expr = strip_expr(expr->unop); in get_mtag_sval()
|
H A D | smatch_modification_hooks.c | 199 call_modification_hooks(expr->unop, expr, late); in unop_expr() 213 call_modification_hooks(tmp->unop, expr, BOTH); in match_call()
|