Home
last modified time | relevance | path

Searched refs:expr (Results 76 – 100 of 467) sorted by relevance

12345678910>>...19

/illumos-gate/usr/src/lib/libsqlite/src/
H A Dparse.y568 expr(A) ::= expr(X) OR expr(Y). {A = sqliteExpr(TK_OR, X, Y, 0);}
579 expr(A) ::= expr(X) likeop(OP) expr(Y). [LIKE] {
586 expr(A) ::= expr(X) NOT likeop(OP) expr(Y). [LIKE] {
603 expr(A) ::= expr(X) ISNULL(E). {
607 expr(A) ::= expr(X) IS NULL(E). {
611 expr(A) ::= expr(X) NOTNULL(E). {
615 expr(A) ::= expr(X) NOT NULL(E). {
623 expr(A) ::= NOT(B) expr(X). {
627 expr(A) ::= BITNOT(B) expr(X). {
644 expr(A) ::= expr(W) BETWEEN expr(X) AND expr(Y). {
[all …]
/illumos-gate/usr/src/tools/smatch/src/
H A Dcompile-i386.c1066 sort_array(expr); in emit_array()
1239 switch(expr->op) { in emit_compare()
1354 if ((expr->op == '/') || (expr->op == '%')) in emit_binop()
1541 if (expr && expr->ctype) { in emit_return_stmt()
1732 if (!expr) in emit_switch_statement()
2099 fn = expr->fn; in x86_call_expression()
2165 if (!expr->ctype) in x86_assignment()
2198 if (!expr->ctype) in x86_initialization()
2251 if (expr) in x86_symbol_init()
2319 if (!expr) in x86_expression()
[all …]
H A Dsmatch_comparison.c801 if (!expr || expr->type != EXPR_ASSIGNMENT) in match_add_sub_assign()
839 if (!expr || expr->type != EXPR_ASSIGNMENT || expr->op != '=') in is_self_assign()
841 return expr_equiv(expr->left, expr->right); in is_self_assign()
909 expr = strip_expr(expr); in chunk_to_var_sym()
918 expr = strip_expr(expr->unop); in chunk_to_var_sym()
955 expr = strip_expr(expr); in save_link()
1370 handle_comparison(expr->left, expr->op, expr->right, &state_name, &false_state); in __comparison_match_condition()
1654 copy_comparisons(expr->left, expr->right); in match_assign()
2471 expr = strip_expr(expr->right); in db_return_comparison()
2476 expr = strip_expr(expr->right); in db_return_comparison()
[all …]
H A Dlinearize.c962 if (expr->type == EXPR_PREOP && expr->op == '*') in linearize_address_gen()
1584 op = map_opcode(opcode[expr->op], expr->ctype); in linearize_binop()
1712 if (!ep->active || !expr->left || !expr->right) in linearize_logical()
1881 return add_setval(ep, expr->ctype, expr); in linearize_expression()
1908 return linearize_short_conditional(ep, expr, expr->conditional, expr->cond_false); in linearize_expression()
1911 expr->cond_true, expr->cond_false); in linearize_expression()
1939 warning(expr->pos, "unknown expression (%d %d)", expr->type, expr->op); in linearize_expression()
2116 if (!expr || expr->type != EXPR_STRING) { in linearize_asm_statement()
2128 add_asm_input(ep, insn, expr->expr, constraint, expr->name); in linearize_asm_statement()
2136 add_asm_output(ep, insn, expr->expr, constraint, expr->name); in linearize_asm_statement()
[all …]
H A Dcheck_deref.c69 expr = strip_expr(expr); in check_dereference()
70 if (is_static(expr)) in check_dereference()
77 if (implied_not_equal(expr, 0)) in check_dereference()
143 if (expr->type != EXPR_PREOP) in match_dereferences()
145 check_dereference(expr->unop); in match_dereferences()
150 if (!is_array(expr)) in match_pointer_as_array()
189 if (!expr_is_zero(expr->right)) in match_assign()
208 right = strip_expr(expr->right); in match_assigns_address()
217 match_condition(expr->right); in match_condition()
218 match_condition(expr->left); in match_condition()
[all …]
H A Dcheck_logical_instead_of_bitwise.c23 static int is_bitshift(struct expression *expr) in is_bitshift() argument
25 expr = strip_expr(expr); in is_bitshift()
27 if (expr->type != EXPR_BINOP) in is_bitshift()
29 if (expr->op == SPECIAL_LEFTSHIFT) in is_bitshift()
34 static void match_logic(struct expression *expr) in match_logic() argument
38 if (expr->type != EXPR_LOGICAL) in match_logic()
41 if (get_macro_name(expr->pos)) in match_logic()
44 if (!get_value(expr->right, &sval)) { in match_logic()
45 if (!get_value(expr->left, &sval)) in match_logic()
55 static void match_assign(struct expression *expr) in match_assign() argument
[all …]
H A Dsmatch_constraints.c164 if (is_fake_call(expr)) in get_func_constraint()
166 name = expr_to_str(expr->fn); in get_func_constraint()
179 expr = strip_expr(expr); in get_toplevel_name()
180 if (expr->type != EXPR_SYMBOL || !expr->symbol || !expr->symbol->ident) in get_toplevel_name()
183 sym = expr->symbol; in get_toplevel_name()
199 expr = strip_expr(expr); in get_constraint_str()
200 if (!expr) in get_constraint_str()
202 if (expr->type == EXPR_CALL) in get_constraint_str()
205 return expr_to_str(expr); in get_constraint_str()
394 handle_comparison(expr->left, expr->op, expr->right); in match_condition()
[all …]
H A Dcheck_atomic_inc_dec.c105 while (expr->type == EXPR_ASSIGNMENT) in db_inc_dec()
106 expr = strip_expr(expr->right); in db_inc_dec()
107 if (expr->type != EXPR_CALL) in db_inc_dec()
176 while (expr->type == EXPR_ASSIGNMENT) in is_inc_dec_primitive()
177 expr = strip_expr(expr->right); in is_inc_dec_primitive()
178 if (expr->type != EXPR_CALL) in is_inc_dec_primitive()
181 if (expr->fn->type != EXPR_SYMBOL) in is_inc_dec_primitive()
194 if (is_inc_dec_primitive(expr)) in db_inc()
196 db_inc_dec(expr, param, key, ATOMIC_INC); in db_inc()
201 if (is_inc_dec_primitive(expr)) in db_dec()
[all …]
H A Dsmatch_param_cleared.c44 while (expr->type == EXPR_ASSIGNMENT) in db_param_cleared()
45 expr = strip_expr(expr->right); in db_param_cleared()
46 if (expr->type != EXPR_CALL) in db_param_cleared()
49 arg = get_argument_from_call_expr(expr->args, param); in db_param_cleared()
141 inout = get_argument_from_call_expr(expr->args, 3); in match_usb_control_msg()
146 db_param_cleared(expr, 6, (char *)"$", (char *)""); in match_usb_control_msg()
149 static void match_assign(struct expression *expr) in match_assign() argument
157 type = get_type(expr->left); in match_assign()
160 set_state_expr(my_id, expr->left, &cleared); in match_assign()
167 if (!is_array(expr->left)) in match_array_assign()
[all …]
H A Dsmatch_constraints_required.c63 type = get_type(expr); in bytes_per_element()
219 call = strip_expr(expr->right); in match_alloc()
232 pointer = strip_expr(expr->left); in match_calloc()
233 call = strip_expr(expr->right); in match_calloc()
286 if (expr->op != '=') in match_assign_has_buf_comparison()
305 if (expr->op != '=') in match_assign_data()
370 array = strip_expr(expr->right); in match_assign_ARRAY_SIZE()
400 if (expr->op != '=') in match_assign_buf_comparison()
421 if (get_state_expr(my_id, expr)) in has_constraint()
436 if (expr->op != '=') in match_assign_constraint()
[all …]
H A Dcheck_dereferences_param.c60 tmp = get_assigned_expr(expr); in check_deref()
62 expr = tmp; in check_deref()
63 expr = strip_expr(expr); in check_deref()
65 if (get_param_num(expr) < 0) in check_deref()
68 if (param_was_set(expr)) in check_deref()
71 sm = get_sm_state_expr(my_id, expr); in check_deref()
74 set_state_expr(my_id, expr, &derefed); in check_deref()
79 if (expr->type != EXPR_PREOP) in match_dereference()
81 check_deref(expr->unop); in match_dereference()
113 if (!is_array(expr)) in match_pointer_as_array()
[all …]
H A Dsmatch_extra.h107 struct range_list *var_to_absolute_rl(struct expression *expr);
108 int custom_get_absolute_rl(struct expression *expr,
109 struct range_list *(*fn)(struct expression *expr),
167 bool is_impossible_variable(struct expression *expr);
168 struct sm_state *get_extra_sm_state(struct expression *expr);
169 struct smatch_state *get_extra_state(struct expression *expr);
185 int parent_is_null(struct expression *expr);
188 int parent_is_free(struct expression *expr);
203 void remove_from_equiv_expr(struct expression *expr);
214 struct expression *deref_expression(struct expression *expr);
[all …]
H A Dcheck_passes_sizeof.c26 static struct expression *get_returned_expr(struct expression *expr) in get_returned_expr() argument
35 if (stmt->expression->right != expr) in get_returned_expr()
40 static struct expression *remove_dereference(struct expression *expr) in remove_dereference() argument
42 if (!expr || expr->type != EXPR_PREOP || expr->op != '*') in remove_dereference()
43 return expr; in remove_dereference()
44 expr = expr->unop; in remove_dereference()
45 if (!expr || expr->type != EXPR_PREOP || expr->op != '*') in remove_dereference()
46 return expr; in remove_dereference()
47 return expr->unop; in remove_dereference()
H A Dcheck_shift_to_zero.c22 static void match_binop(struct expression *expr) in match_binop() argument
27 if (expr->op != SPECIAL_RIGHTSHIFT) in match_binop()
30 if (!get_implied_value(expr->right, &bits)) in match_binop()
33 type = get_type(expr->left); in match_binop()
38 if (is_ignored_expr(my_id, expr)) in match_binop()
49 if (expr->op != SPECIAL_RIGHTSHIFT) in match_binop2()
52 left = strip_expr(expr->left); in match_binop2()
59 if (!get_value(expr->right, &shift)) in match_binop2()
75 if (expr->op != SPECIAL_SHR_ASSIGN) in match_assign()
78 if (!get_implied_value(expr->right, &bits)) in match_assign()
[all …]
H A Dcheck_cast_assign.c24 static struct symbol *get_cast_type(struct expression *expr) in get_cast_type() argument
26 if (!expr || expr->type != EXPR_PREOP || expr->op != '*') in get_cast_type()
28 expr = strip_parens(expr->unop); in get_cast_type()
29 if (expr->type != EXPR_CAST) in get_cast_type()
31 return get_pointer_type(expr); in get_cast_type()
34 static void match_overflow(struct expression *expr) in match_overflow() argument
41 type = get_cast_type(expr->left); in match_overflow()
46 ptr = strip_expr(expr->left->unop); in match_overflow()
H A Dcheck_buffer_too_small_for_struct.c24 static void match_assign(struct expression *expr) in match_assign() argument
32 left_type = get_type(expr->left); in match_assign()
39 right_type = get_type(expr->right); in match_assign()
48 bytes = get_array_size_bytes(expr->right); in match_assign()
62 set_state_expr(my_id, expr->left, &too_small); in match_assign()
75 if (expr->type != EXPR_PREOP) in match_dereferences()
78 expr = strip_expr(expr->unop); in match_dereferences()
79 state = get_state_expr(my_id, expr); in match_dereferences()
83 left_type = get_type(expr); in match_dereferences()
90 right = get_assigned_expr(expr); in match_dereferences()
[all …]
H A Dcheck_bogus_loop.c23 static int right_side_changes(struct expression *expr) in right_side_changes() argument
27 if (get_value(expr->right, &dummy)) in right_side_changes()
34 struct expression *expr; in get_iterator_set() local
40 expr = stmt->expression; in get_iterator_set()
41 if (expr->type != EXPR_ASSIGNMENT) in get_iterator_set()
43 if (expr->op != '=') in get_iterator_set()
45 if (right_side_changes(expr)) in get_iterator_set()
47 return expr->left; in get_iterator_set()
52 if (!expr) in get_iterator_tested()
54 if (expr->type != EXPR_COMPARE) in get_iterator_tested()
[all …]
H A Dcheck_64bit_shift.c23 static void match_shift_mask(struct expression *expr) in match_shift_mask() argument
29 expr = strip_expr(expr); in match_shift_mask()
30 if (expr->type != EXPR_BINOP || expr->op != '&') in match_shift_mask()
33 if (get_type(expr->left) != &ullong_ctype) in match_shift_mask()
36 if (type_bits(get_type(expr->right)) == 64) in match_shift_mask()
39 right = strip_expr(expr->right); in match_shift_mask()
48 str = expr_to_str(expr->right); in match_shift_mask()
53 static void match_shift_assignment(struct expression *expr) in match_shift_assignment() argument
61 right = strip_expr(expr->right); in match_shift_assignment()
65 left_type = get_type(expr->left); in match_shift_assignment()
[all …]
H A Dexpression.h251 struct expression *expr; member
294 expr->type = type; in alloc_expression()
295 expr->pos = pos; in alloc_expression()
296 expr->flags = CEF_NONE; in alloc_expression()
297 return expr; in alloc_expression()
303 expr->type = EXPR_VALUE; in alloc_const_expression()
304 expr->pos = pos; in alloc_const_expression()
305 expr->value = value; in alloc_const_expression()
306 expr->ctype = &int_ctype; in alloc_const_expression()
307 expr->flags = CEF_SET_INT; in alloc_const_expression()
[all …]
H A Dsmatch_param_to_mtag_data.c79 static void match_assign(struct expression *expr) in match_assign() argument
88 if (expr->op != '=') in match_assign()
90 left = strip_expr(expr->left); in match_assign()
93 right_sym = expr_to_sym(expr->right); in match_assign()
118 arg = get_argument_from_call_expr(expr->args, param); in propogate_assignment()
153 if (!create_mtag_alias(tag, expr, &alias)) in assign_to_alias()
170 while (expr->type == EXPR_ASSIGNMENT) in call_does_mtag_assign()
171 expr = strip_expr(expr->right); in call_does_mtag_assign()
172 if (expr->type != EXPR_CALL) in call_does_mtag_assign()
182 propogate_assignment(expr, tag, offset, param, key); in call_does_mtag_assign()
[all …]
H A Dbuiltin.c35 expr->ctype = &int_ctype; in evaluate_to_int_const_expr()
51 expr->flags = flags; in evaluate_pure_unop()
80 sym = expr->fn->ctype; in eval_args()
111 *expr = *arg; in expand_expect()
154 expr->type = EXPR_VALUE; in expand_warning()
155 expr->value = 1; in expand_warning()
156 expr->taint = 0; in expand_warning()
164 expr->value = !cost; in expand_constant_p()
165 expr->taint = 0; in expand_constant_p()
174 expr->taint = 0; in expand_safe_p()
[all …]
H A Dcheck_missing_break.c56 expr = strip_expr(expr); in alloc_my_state()
57 name = expr_to_str(expr); in alloc_my_state()
62 state->data = expr; in alloc_my_state()
75 name = expr_to_var(expr); in print_missing_break()
80 static void match_assign(struct expression *expr) in match_assign() argument
84 if (expr->op != '=') in match_assign()
88 left = strip_expr(expr->left); in match_assign()
96 static void match_symbol(struct expression *expr) in match_symbol() argument
103 expr = strip_expr(expr); in match_symbol()
104 if (expr == skip_this) in match_symbol()
[all …]
/illumos-gate/usr/src/cmd/hal/hald/
H A Dlogger.h67 #define HAL_TRACE(expr) do {logger_setup(HAL_LOGPRI_TRACE, __FILE__, __LINE__, __FUNCTION__); l… argument
70 #define HAL_DEBUG(expr) do {logger_setup(HAL_LOGPRI_DEBUG, __FILE__, __LINE__, __FUNCTION__); l… argument
73 #define HAL_INFO(expr) do {logger_setup(HAL_LOGPRI_INFO, __FILE__, __LINE__, __FUNCTION__); l… argument
76 #define HAL_WARNING(expr) do {logger_setup(HAL_LOGPRI_WARNING, __FILE__, __LINE__, __FUNCTION__); l… argument
79 #define HAL_ERROR(expr) do {logger_setup(HAL_LOGPRI_ERROR, __FILE__, __LINE__, __FUNCTION__); l… argument
82 #define DIE(expr) do {printf("*** [DIE] %s:%s():%d : ", __FILE__, __FUNCTION__, __LINE__); printf e… argument
/illumos-gate/usr/src/contrib/ast/src/lib/libast/string/
H A Dstrexpr.c92 n = -expr(ex, 13); in expr()
95 n = expr(ex, 13); in expr()
98 n = !expr(ex, 13); in expr()
101 n = ~expr(ex, 13); in expr()
119 n = expr(ex, 1); in expr()
134 x = expr(ex, 2); in expr()
139 x = expr(ex, 2); in expr()
148 expr(ex, 2); in expr()
172 x = expr(ex, 6); in expr()
195 x = expr(ex, 8); in expr()
[all …]
/illumos-gate/usr/src/cmd/oawk/
H A Dawk.g.y119 expr {
146 expr MATCHOP regular_expr {
172 | SUBSTR '(' expr ',' expr ',' expr ')'
174 | SUBSTR '(' expr ',' expr ')'
176 | SPLIT '(' expr ',' VAR ',' expr ')'
178 | SPLIT '(' expr ',' VAR ')'
180 | INDEX '(' expr ',' expr ')'
197 expr:
239 expr
248 expr ',' expr {$$ = linkum($1, $3); }
[all …]

12345678910>>...19