Home
last modified time | relevance | path

Searched refs:expr (Results 1 – 25 of 479) sorted by relevance

12345678910>>...20

/illumos-gate/usr/src/tools/smatch/src/
H A Dexpand.c159 expr->fvalue = (double)expr->fvalue; in cast_value()
161 expr->fvalue = (float)expr->fvalue; in cast_value()
428 if (simplify_int_binop(expr, expr->ctype)) in expand_binop()
497 *expr = *expr->right; in expand_comma()
938 expr = expr->init_expr; in bit_offset()
940 if (expr && expr->ctype) in bit_offset()
953 expr = expr->init_expr; in bit_range()
1015 if (!expr->ctype || expr->ctype == &bad_ctype) in expand_expression()
1077 verify_nonoverlapping(&expr->expr_list, expr); in expand_expression()
1143 if (!expr || !expr->ctype || expr->ctype == &bad_ctype) in expand_if_statement()
[all …]
H A Dsmatch_helper.c111 expr = strip_expr(expr); in alloc_state_expr()
414 cached[idx].expr = expr; in get_variable_from_expr()
472 expr = strip_expr(expr); in expr_to_var_sym()
501 expr = strip_expr(expr); in get_complication_score()
645 expr = strip_expr(expr); in is_array()
671 expr = strip_expr(expr); in get_array_base()
683 expr = strip_expr(expr); in get_array_offset()
882 expr = strip_expr(expr); in get_struct_and_member()
906 expr = strip_expr(expr); in get_member_name()
1041 expr = expr->unop; in get_last_expr_from_expression_stmt()
[all …]
H A Dsmatch_conditions.c384 expr->op = make_op_unsigned(expr->op); in hackup_unsigned_compares()
404 expr = strip_expr_set_parent(expr); in split_conditions()
423 expr_set_parent_expr(expr->left, expr); in split_conditions()
424 expr_set_parent_expr(expr->right, expr); in split_conditions()
431 expr_set_parent_expr(expr->left, expr); in split_conditions()
432 expr_set_parent_expr(expr->right, expr); in split_conditions()
437 expr_set_parent_expr(expr->left, expr); in split_conditions()
438 expr_set_parent_expr(expr->right, expr); in split_conditions()
448 expr_set_parent_expr(expr->unop, expr); in split_conditions()
460 expr_set_parent_expr(expr->left, expr); in split_conditions()
[all …]
H A Dsmatch_kernel_user_data.c158 expr = strip_expr(expr); in user_rl_capped()
184 expr = strip_expr(expr); in user_rl_treat_untagged()
274 expr = strip_expr(expr); in tag_as_user_data()
382 expr = strip_expr(expr); in is_skb_data()
412 expr = strip_expr(expr); in is_points_to_user_data_fn()
416 expr = expr->fn; in is_points_to_user_data_fn()
450 expr = strip_expr(expr); in points_to_user_data()
503 expr = strip_expr(expr); in comes_from_skb_data()
504 if (!expr || expr->type != EXPR_PREOP || expr->op != '*') in comes_from_skb_data()
993 expr = strip_expr(expr); in is_ptr_subtract()
[all …]
H A Dinline.c92 expr = dup_expression(expr); in copy_expression()
110 expr = dup_expression(expr); in copy_expression()
117 expr = dup_expression(expr); in copy_expression()
131 expr = dup_expression(expr); in copy_expression()
142 expr = dup_expression(expr); in copy_expression()
151 expr = dup_expression(expr); in copy_expression()
175 expr = dup_expression(expr); in copy_expression()
188 expr = dup_expression(expr); in copy_expression()
199 expr = dup_expression(expr); in copy_expression()
210 expr = dup_expression(expr); in copy_expression()
[all …]
H A Dcheck_precedence.c27 type = get_type(expr); in is_bool()
48 expr = strip_expr(expr); in is_bool_op()
50 if (expr->type == EXPR_PREOP && expr->op == '!') in is_bool_op()
56 return is_bool(expr); in is_bool_op()
64 if (expr->left->type == EXPR_COMPARE || expr->right->type == EXPR_COMPARE) in match_condition()
66 if (expr->left->type == EXPR_PREOP && expr->left->op == '!') { in match_condition()
67 if (expr->left->unop->type == EXPR_PREOP && expr->left->unop->op == '!') in match_condition()
91 if (expr->type == EXPR_BINOP && expr->op == '&') { in match_condition()
105 if (expr->op != '&') in match_binop()
113 if (expr->op != '&') in match_mask()
[all …]
H A Dsmatch_math.c1309 if (expr->op != '.' || !expr->down || in get_offset_from_down()
1364 if (expr->op != '.' || !type || !expr->ident) in get_offset_from_in()
1387 *res_sval = sval_from_val(expr, expr->value); in handle_offsetof_rl()
1400 expr = strip_parens(expr); in get_rl_sval()
1415 expr = strip_expr(expr); in get_rl_sval()
1421 sval = sval_from_val(expr, expr->value); in get_rl_sval()
1424 sval = sval_from_fval(expr, expr->fvalue); in get_rl_sval()
1465 sval = sval_from_val(expr, expr->value); in get_rl_sval()
1582 if (expr == cached_results[i].expr) { in get_value()
1597 cached_results[cache_idx].expr = expr; in get_value()
[all …]
H A Dsmatch_function_ptrs.c40 expr = strip_expr(expr); in get_from__symbol_get()
57 expr = strip_expr(expr); in xxx_is_array()
62 expr = strip_expr(expr->unop); in xxx_is_array()
69 if (expr->type != EXPR_BINOP || expr->op != '+') in xxx_is_array()
85 expr = strip_expr(expr); in xxx_get_array_base()
86 if (expr->type == EXPR_PREOP && expr->op == '*') in xxx_get_array_base()
87 expr = strip_expr(expr->unop); in xxx_get_array_base()
120 expr = get_assigned_expr(expr); in get_array_ptr()
187 expr = strip_expr(expr); in get_fnptr_name()
191 expr = strip_expr(expr->unop); in get_fnptr_name()
[all …]
H A Devaluate.c931 expr->flags = expr->left->flags & expr->right->flags; in evaluate_logical()
945 expr->flags = expr->left->flags & expr->right->flags; in evaluate_binop()
996 expr->left = expr->right; in evaluate_binop()
1013 expr->flags &= expr->left->flags & expr->right->flags; in evaluate_comma()
1071 ctype = usual_conversions(expr->op, expr->left, expr->right, in evaluate_compare()
1758 *expr = *expr->unop; in degenerate()
1919 *expr = *expr->unop; in evaluate_sign()
1935 *expr = *expr->unop; in evaluate_preop()
2153 expr = expr->right; in is_promoted()
2158 expr = expr->unop; in is_promoted()
[all …]
H A Dsmatch_type_val.c79 if (expr == cached_results[i].expr) { in get_cached()
107 cached_results[res_idx].expr = expr; in get_db_type_rl()
193 if (!expr || expr->type != EXPR_ASSIGNMENT) in is_ignored_fake_assignment()
221 if (!expr || expr->type != EXPR_ASSIGNMENT) in is_container_of()
239 if (!expr || expr->type != EXPR_ASSIGNMENT) in is_driver_data()
269 if (!expr || expr->type != EXPR_ASSIGNMENT || expr->op != '=') in is_ignored_macro()
310 expr = strip_expr(expr->right); in is_ignored_function()
311 if (!expr || expr->type != EXPR_CALL || expr->fn->type != EXPR_SYMBOL) in is_ignored_function()
566 expr = strip_expr(expr->unop); in unop_expr()
582 member = get_member_name(expr->expr); in asm_expr()
[all …]
H A Dsmatch_expressions.c16 if (expr) in get_cur_pos()
33 return expr; in alloc_tmp_expression()
61 return expr; in value_expr()
73 return expr; in member_expression()
89 expr = preop_expression(expr, '('); in deref_expression()
105 return expr; in assign_expression()
116 return expr; in binop_expression()
301 if (!expr) in expr_set_parent_expr()
311 if (!expr) in expr_set_parent_stmt()
318 if (!expr) in expr_get_parent_expr()
[all …]
H A Dcheck_spectre.c71 parent = expr; in is_harmless()
103 expr = strip_parens(expr); in get_max_by_type()
108 expr = expr->unop; in get_max_by_type()
110 if (expr->op == '%' || expr->op == '&') in get_max_by_type()
111 expr = expr->right; in get_max_by_type()
115 expr = get_assigned_expr(expr); in get_max_by_type()
116 if (!expr) in get_max_by_type()
132 expr = strip_expr(expr); in get_mask()
136 expr = tmp; in get_mask()
142 if (expr->type == EXPR_BINOP && expr->op == '&') { in get_mask()
[all …]
H A Dsmatch_buf_size.c130 if (!expr) in bytes_per_element()
134 if (expr->type == EXPR_PREOP && expr->op == '&') { in bytes_per_element()
137 expr = expr->unop; in bytes_per_element()
304 if (expr->type == EXPR_PREOP && expr->op == '&') in get_real_array_size()
305 expr = expr->unop; in get_real_array_size()
313 if (expr->type != EXPR_SYMBOL || !expr->symbol || !expr->symbol->initializer) in get_size_from_initializer()
335 if (expr->type != EXPR_PREOP || expr->op != '&') in get_bytes_from_address()
356 expr = strip_expr(expr); in remove_addr_fluff()
359 while (expr && expr->type == EXPR_PREOP && expr->op == '&') { in remove_addr_fluff()
434 expr = strip_parens(expr->unop); in get_stored_size_end_struct_bytes()
[all …]
H A Dsmatch_mtag.c107 expr = strip_expr(expr->right); in get_allocator_info()
138 if (!expr || expr->type != EXPR_ASSIGNMENT || expr->op != '=') in get_mtag_return()
175 if (expr->type != EXPR_STRING || !expr->string) in get_string_mtag()
352 expr = strip_expr(expr); in expr_to_mtag_offset()
359 if (expr->type == EXPR_PREOP && expr->op == '*') { in expr_to_mtag_offset()
360 expr = strip_expr(expr->unop); in expr_to_mtag_offset()
370 expr = strip_expr(expr->deref); in expr_to_mtag_offset()
374 expr = strip_expr(expr->unop); in expr_to_mtag_offset()
416 expr = strip_expr(expr); in get_mtag_sval()
438 if (expr->type == EXPR_PREOP && expr->op == '&') { in get_mtag_sval()
[all …]
H A Dsmatch_recurse.c28 if (!expr) in recurse()
31 ret = func(expr, param); in recurse()
39 switch (expr->type) { in recurse()
118 if (!expr || expr->type != EXPR_SYMBOL) in has_symbol_helper()
143 if (!expr) in has_var_helper()
145 if (expr->type != xns->expr->type) in has_var_helper()
148 if (expr->op != xns->expr->op) in has_var_helper()
166 xns.expr = var; in has_variable()
178 if (!expr) in has_inc_dec_helper()
180 if (expr->type != EXPR_PREOP && expr->type != EXPR_POSTOP) in has_inc_dec_helper()
[all …]
H A Dcheck_or_vs_and.c27 if (expr->type == EXPR_PREOP || expr->type == EXPR_POSTOP) { in does_inc_dec()
28 if (expr->op == SPECIAL_INCREMENT || expr->op == SPECIAL_DECREMENT) in does_inc_dec()
68 left = strip_expr(expr->left); in check_or()
124 check_or(expr); in match_logic()
126 check_and(expr); in match_logic()
147 if (expr->op == '|') { in match_condition()
148 if (get_value(expr->left, &sval) || get_value(expr->right, &sval)) in match_condition()
153 if (expr->op != '&') in match_condition()
158 if (is_unconstant_macro(expr->left) || is_unconstant_macro(expr->right)) in match_condition()
170 if (expr->op != '&') in match_binop()
[all …]
H A Dcheck_signed.c44 if (expr->op == SPECIAL_AND_ASSIGN || expr->op == SPECIAL_OR_ASSIGN) in match_assign()
47 sym = get_type(expr->left); in match_assign()
70 if (expr->right->type == EXPR_PREOP && expr->right->op == '~') in match_assign()
72 if (expr->op == SPECIAL_SUB_ASSIGN || expr->op == SPECIAL_ADD_ASSIGN) in match_assign()
186 switch (expr->op) { in cap_both_sides()
191 return cap_lt_zero_or_gt(expr); in cap_both_sides()
224 name = expr_to_str(expr->left); in print_unsigned_never_less_than_zero()
238 if (expr->type != EXPR_COMPARE) in match_condition()
241 type = get_type(expr); in match_condition()
252 if (get_macro_name(expr->pos)) in match_condition()
[all …]
H A Dcheck_leaks.c72 expr = strip_expr(expr); in get_parent_from_expr()
124 if (!is_local(expr->left)) in match_alloc()
126 if (is_param(expr->left)) in match_alloc()
137 expr = strip_expr(expr); in match_condition()
139 switch (expr->type) { in match_condition()
149 match_condition(expr->left); in match_condition()
161 expr = strip_expr(expr); in set_parent()
162 if (!expr) in set_parent()
205 name = expr_to_var(expr); in warn_if_allocated()
217 right = expr->right; in match_assign()
[all …]
H A Dcheck_arm64_tagged.c58 if (expr->type != EXPR_SYMBOL) in expr_has_untagged_symbol()
61 name = expr_to_var_sym(expr, &sym); in expr_has_untagged_symbol()
74 if (expr->type != EXPR_DEREF) in expr_has_untagged_member()
89 name = get_macro_name(expr->pos); in expr_has_macro_with_name()
117 if (expr->type == EXPR_PREOP || expr->type == EXPR_POSTOP) in expr_has_memory_addr()
118 expr = strip_expr(expr->unop); in expr_has_memory_addr()
123 if (expr_has_untagged_macro(expr)) in expr_has_memory_addr()
200 if (expr->type != EXPR_COMPARE && in match_condition()
201 expr->type != EXPR_BINOP) in match_condition()
210 val = expr->right; in match_condition()
[all …]
H A Dsmatch_integer_overflow.c30 expr = strip_expr(expr); in safe_state()
32 state->data = expr; in safe_state()
65 if (expr->op != '>' && expr->op != SPECIAL_UNSIGNED_GT && in match_divide()
66 expr->op != SPECIAL_GTE && expr->op != SPECIAL_UNSIGNED_GTE) in match_divide()
106 if (expr->op != '<' && expr->op != SPECIAL_UNSIGNED_LT) in match_overflow_to_less_than()
134 match_divide(expr); in match_condition()
145 expr = strip_expr(expr); in can_integer_overflow()
148 switch(expr->op) { in can_integer_overflow()
162 if (expr->op != '*' && expr->op != '+' && expr->op != SPECIAL_LEFTSHIFT) in can_integer_overflow()
164 op = expr->op; in can_integer_overflow()
[all …]
H A Dcheck_get_user_overflow.c45 if (expr->type != EXPR_COMPARE) in match_condition()
48 switch (expr->op) { in match_condition()
107 match_normal_assign(expr); in match_assign()
110 name = expr_to_var(expr->right); in match_assign()
130 get_absolute_max(expr, &max); in check_expr()
137 get_absolute_min(expr, &sval); in check_expr()
160 if (expr->op == '^') in match_binop()
162 if (expr->op == '&') in match_binop()
164 if (expr->op == '|') in match_binop()
171 check_expr(expr->left); in match_binop()
[all …]
H A Dcheck_impossible_mask.c30 expr = strip_expr(expr);
35 if (expr->type == EXPR_BINOP && (expr->op == '&' || expr->op == '|')) {
45 if (expr->op == '&')
50 get_absolute_max(expr, &sval);
68 expr = strip_expr(expr); in get_possible_bits()
69 if (expr->type != EXPR_BINOP) in get_possible_bits()
71 if (expr->op != '&') in get_possible_bits()
86 type = get_type(expr); in match_condition()
90 if (expr->type != EXPR_COMPARE) in match_condition()
92 if (expr->op != SPECIAL_EQUAL && expr->op != SPECIAL_NOTEQUAL) in match_condition()
[all …]
H A Dcheck_memcpy_overflow.c56 if (expr->type == EXPR_PREOP && expr->op == '&') in bytes_to_end_of_struct()
57 expr = strip_parens(expr->unop); in bytes_to_end_of_struct()
63 if (expr->type != EXPR_DEREF || !expr->member) in bytes_to_end_of_struct()
83 if (expr->type != EXPR_PREOP || expr->op != '&') in size_of_union()
85 expr = strip_parens(expr->unop); in size_of_union()
86 if (expr->type != EXPR_DEREF || !expr->member) in size_of_union()
88 expr = expr->unop; in size_of_union()
139 expr = strip_expr(expr); in ends_on_struct_member_boundary()
141 expr = strip_parens(expr->unop); in ends_on_struct_member_boundary()
147 if (expr->type != EXPR_DEREF || !expr->member) in ends_on_struct_member_boundary()
[all …]
/illumos-gate/usr/src/lib/libsqlite/test/
H A Dexpr.test29 } $settings $expr] $result
409 test_expr expr-case.5 {i1=2} \
411 test_expr expr-case.6 {i1=1} \
413 test_expr expr-case.7 {i1=2} \
415 test_expr expr-case.8 {i1=3} \
417 test_expr expr-case.9 {i1=3} \
419 test_expr expr-case.10 {i1=3} \
423 test_expr expr-case.12 {i1=1} \
425 test_expr expr-case.13 {i1=7} \
441 do_test expr-7.1 {
[all …]
/illumos-gate/usr/src/cmd/geniconvtbl/
H A Ddisassemble.c1188 itm_expr_t *expr; in dump_expr() local
1191 expr = (itm_expr_t *)ADDR(expr_place); in dump_expr()
1194 switch (expr->type) { in dump_expr()
1205 printi(0, "%ld", expr->data.itm_exnum); in dump_expr()
1208 data = expr->data.value; in dump_expr()
1219 dump_expr(itm_hdr, expr->data.operand[0]); in dump_expr()
1224 if (0 == expr->data.operand[0].itm_ptr) { in dump_expr()
1239 dump_expr(itm_hdr, expr->data.operand[0]); in dump_expr()
1243 dump_expr(itm_hdr, expr->data.operand[0]); in dump_expr()
1245 dump_expr(itm_hdr, expr->data.operand[1]); in dump_expr()
[all …]

12345678910>>...20