Home
last modified time | relevance | path

Searched refs:expression (Results 1 – 25 of 302) sorted by relevance

12345678910>>...13

/illumos-gate/usr/src/tools/smatch/src/
H A Dsmatch_extra.h45 int str_to_comparison_arg(const char *c, struct expression *call, int *comparison, struct expressio…
47 void call_results_to_rl(struct expression *call, struct symbol *type, const char *value, struct ran…
67 int possibly_true(struct expression *left, int comparison, struct expression *right);
71 int possibly_false(struct expression *left, int comparison, struct expression *right);
103 int get_implied_rl(struct expression *expr, struct range_list **rl);
104 int get_absolute_rl(struct expression *expr, struct range_list **rl);
105 void set_real_absolute(struct expression *expr, struct smatch_state *state);
106 int get_real_absolute_rl(struct expression *expr, struct range_list **rl);
107 struct range_list *var_to_absolute_rl(struct expression *expr);
108 int custom_get_absolute_rl(struct expression *expr,
[all …]
H A Dsmatch.h173 typedef void (func_hook)(const char *fn, struct expression *expr, void *data);
174 typedef void (implication_hook)(const char *fn, struct expression *call_expr,
175 struct expression *assign_expr, void *data);
176 typedef void (return_implies_hook)(struct expression *call_expr,
178 typedef int (implied_return_hook)(struct expression *call_expr, void *info, struct range_list **rl);
197 int get_implied_return(struct expression *expr, struct range_list **rl);
203 struct expression *cur;
206 typedef void (modification_hook)(struct sm_state *sm, struct expression *mod_expr);
209 struct smatch_state *get_modification_state(struct expression *expr);
355 struct smatch_state *get_state_expr(int owner, struct expression *expr);
[all …]
H A Dsmatch_expressions.c5 __ALLOCATOR(struct expression, "temporary expr", tmp_expression);
11 struct expression *expr; in get_cur_pos()
25 struct expression *alloc_tmp_expression(struct position pos, int type) in alloc_tmp_expression()
27 struct expression *expr; in alloc_tmp_expression()
41 struct expression *zero_expr(void) in zero_expr()
43 struct expression *zero; in zero_expr()
51 struct expression *value_expr(long long val) in value_expr()
53 struct expression *expr; in value_expr()
64 struct expression *member_expression(struct expression *deref, int op, struct ident *member) in member_expression()
66 struct expression *expr; in member_expression()
[all …]
H A Dexpression.h145 struct expression { struct
171 struct expression *unop; argument
186 struct expression *left, *right;
190 struct expression *deref;
196 struct expression *base;
203 struct expression *cast_expression;
208 struct expression *conditional, *cond_true, *cond_false;
212 struct expression *fn;
226 struct expression *ident_expression;
231 struct expression *idx_expression;
[all …]
H A Dcheck_debug.c34 static void match_all_values(const char *fn, struct expression *expr, void *info) in match_all_values()
43 static void match_cur_stree(const char *fn, struct expression *expr, void *info) in match_cur_stree()
48 static void match_state(const char *fn, struct expression *expr, void *info) in match_state()
50 struct expression *check_arg, *state_arg; in match_state()
78 static void match_states(const char *fn, struct expression *expr, void *info) in match_states()
80 struct expression *check_arg; in match_states()
97 static void match_print_value(const char *fn, struct expression *expr, void *info) in match_print_value()
101 struct expression *arg_expr; in match_print_value()
116 static void match_print_known(const char *fn, struct expression *expr, void *info) in match_print_known()
118 struct expression *arg; in match_print_known()
[all …]
H A Dparse.h56 struct expression *expression; member
57 struct expression *context;
60 struct expression *ret_value;
64 struct expression *if_conditional;
79 struct expression *case_expression;
80 struct expression *case_to;
85 struct expression *switch_expression;
94 struct expression *iterator_pre_condition;
99 struct expression *iterator_post_condition;
105 struct expression *goto_expression;
[all …]
H A Dsmatch_struct_assignment.c69 static struct symbol *get_struct_type(struct expression *expr) in get_struct_type()
88 static struct expression *get_right_base_expr(struct symbol *left_type, struct expression *right) in get_right_base_expr()
113 static struct expression *remove_addr(struct expression *expr) in remove_addr()
132 static struct expression *faked_expression;
133 struct expression *get_faked_expression(void) in get_faked_expression()
140 static void split_fake_expr(struct expression *expr) in split_fake_expr()
149 static void handle_non_struct_assignments(struct expression *left, struct expression *right) in handle_non_struct_assignments()
152 struct expression *assign; in handle_non_struct_assignments()
180 …oid set_inner_struct_members(int mode, struct expression *faked, struct expression *left, struct e… in set_inner_struct_members()
182 struct expression *left_member; in set_inner_struct_members()
[all …]
H A Dsmatch_strlen.c51 static void set_strlen_undefined(struct sm_state *sm, struct expression *mod_expr) in set_strlen_undefined()
56 static void set_strlen_equiv_undefined(struct sm_state *sm, struct expression *mod_expr) in set_strlen_equiv_undefined()
61 static void match_string_assignment(struct expression *expr) in match_string_assignment()
72 static void match_strlen(const char *fn, struct expression *expr, void *unused) in match_strlen()
74 struct expression *right; in match_strlen()
75 struct expression *str; in match_strlen()
76 struct expression *len_expr; in match_strlen()
95 static void match_strlen_condition(struct expression *expr) in match_strlen_condition()
97 struct expression *left; in match_strlen_condition()
98 struct expression *right; in match_strlen_condition()
[all …]
H A Dsmatch_buf_comparison.c49 struct expression *expr1, *expr2; in merge_links()
59 static void match_link_modify(struct sm_state *sm, struct expression *mod_expr) in match_link_modify()
61 struct expression *expr; in match_link_modify()
112 static struct smatch_state *alloc_compare_size(int limit_type, struct expression *expr) in alloc_compare_size()
128 static int bytes_per_element(struct expression *expr) in bytes_per_element()
143 static void db_save_type_links(struct expression *array, int type_limit, struct expression *size) in db_save_type_links()
153 static void match_alloc_helper(struct expression *pointer, struct expression *size) in match_alloc_helper()
155 struct expression *tmp; in match_alloc_helper()
173 struct expression *mult_left, *mult_right; in match_alloc_helper()
205 static void match_alloc(const char *fn, struct expression *expr, void *_size_arg) in match_alloc()
[all …]
H A Dexpand.c48 static int expand_expression(struct expression *);
57 static int expand_symbol_expression(struct expression *expr) in expand_symbol_expression()
73 static long long get_longlong(struct expression *expr) in get_longlong()
89 void cast_value(struct expression *expr, struct symbol *newtype, in cast_value()
90 struct expression *old, struct symbol *oldtype) in cast_value()
166 static void warn_shift_count(struct expression *expr, struct symbol *ctype, long long count) in warn_shift_count()
183 static bool check_shift_count(struct expression *expr, struct expression *right) in check_shift_count()
202 static int simplify_int_binop(struct expression *expr, struct symbol *ctype) in simplify_int_binop()
204 struct expression *left = expr->left, *right = expr->right; in simplify_int_binop()
318 static int simplify_cmp_binop(struct expression *expr, struct symbol *ctype) in simplify_cmp_binop()
[all …]
H A Dcheck_passes_sizeof.c26 static struct expression *get_returned_expr(struct expression *expr) in get_returned_expr()
31 if (!stmt || stmt->type != STMT_EXPRESSION || !stmt->expression) in get_returned_expr()
33 if (stmt->expression->type != EXPR_ASSIGNMENT) in get_returned_expr()
35 if (stmt->expression->right != expr) in get_returned_expr()
37 return stmt->expression->left; in get_returned_expr()
40 static struct expression *remove_dereference(struct expression *expr) in remove_dereference()
50 static int get_buf_number(struct expression *call, struct expression *size_arg) in get_buf_number()
52 struct expression *arg; in get_buf_number()
71 static void match_call(struct expression *call) in match_call()
73 struct expression *arg; in match_call()
H A Dsmatch_untracked_param.c44 typedef void (untracked_hook)(struct expression *call, int param);
51 void add_untracked_param_hook(void (func)(struct expression *call, int param)) in add_untracked_param_hook()
58 static void call_untracked_callbacks(struct expression *expr, int param) in call_untracked_callbacks()
67 void add_lost_param_hook(void (func)(struct expression *call, int param)) in add_lost_param_hook()
74 static void call_lost_callbacks(struct expression *expr, int param) in call_lost_callbacks()
83 static void assume_tracked(struct expression *call_expr, int param, char *key, char *value) in assume_tracked()
88 static char *get_array_from_key(struct expression *expr, int param, const char *key, struct symbol … in get_array_from_key()
90 struct expression *arg; in get_array_from_key()
105 static void mark_untracked_lost(struct expression *expr, int param, const char *key, int type) in mark_untracked_lost()
131 void mark_untracked(struct expression *expr, int param, char *key, char *value) in mark_untracked()
[all …]
H A Dsmatch_buf_size.c34 static char *get_fn_name(struct expression *expr) in get_fn_name()
43 static int is_allocation_function(struct expression *expr) in is_allocation_function()
98 static void set_size_undefined(struct sm_state *sm, struct expression *mod_expr) in set_size_undefined()
126 static int bytes_per_element(struct expression *expr) in bytes_per_element()
150 static int bytes_to_elements(struct expression *expr, int bytes) in bytes_to_elements()
160 static int elements_to_bytes(struct expression *expr, int elements) in elements_to_bytes()
168 static int get_initializer_size(struct expression *expr) in get_initializer_size()
174 struct expression *tmp; in get_initializer_size()
209 static struct range_list *size_from_db_type(struct expression *expr) in size_from_db_type()
239 static struct range_list *size_from_db_symbol(struct expression *expr) in size_from_db_symbol()
[all …]
H A Dexpression.c61 static struct token *comma_expression(struct token *, struct expression **);
63 struct token *parens_expression(struct token *token, struct expression **expr, const char *where) in parens_expression()
70 struct expression *e = alloc_expression(token->pos, EXPR_STATEMENT); in parens_expression()
136 static struct token *parse_type(struct token *token, struct expression **tree) in parse_type()
150 struct expression **tree) in builtin_types_compatible_p_expr()
152 struct expression *expr = alloc_expression( in builtin_types_compatible_p_expr()
176 struct expression **tree) in builtin_offsetof_expr()
178 struct expression *expr = NULL; in builtin_offsetof_expr()
179 struct expression **p = &expr; in builtin_offsetof_expr()
198 struct expression *e; in builtin_offsetof_expr()
[all …]
H A Dcheck_index_overflow.c28 static int definitely_just_used_as_limiter(struct expression *array, struct expression *offset) in definitely_just_used_as_limiter()
31 struct expression *tmp; in definitely_just_used_as_limiter()
47 static int fake_get_hard_max(struct expression *expr, sval_t *sval) in fake_get_hard_max()
69 static int get_the_max(struct expression *expr, sval_t *sval) in get_the_max()
105 static int common_false_positives(struct expression *array, sval_t max) in common_false_positives()
163 static int is_subtract(struct expression *expr) in is_subtract()
165 struct expression *tmp; in is_subtract()
180 static int constraint_met(struct expression *array_expr, struct expression *offset) in constraint_met()
205 static int should_warn(struct expression *expr) in should_warn()
207 struct expression *array_expr; in should_warn()
[all …]
H A Dcheck_err_ptr_deref.c39 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use()
45 static void check_is_err_ptr(struct expression *expr) in check_is_err_ptr()
65 static void match_returns_err_ptr(const char *fn, struct expression *expr, in match_returns_err_ptr()
71 static void set_param_dereferenced(struct expression *call, struct expression *arg, char *key, char… in set_param_dereferenced()
100 static void match_checked(const char *fn, struct expression *call_expr, in match_checked()
101 struct expression *assign_expr, void *unused) in match_checked()
103 struct expression *arg; in match_checked()
112 static void match_err(const char *fn, struct expression *call_expr, in match_err()
113 struct expression *assign_expr, void *unused) in match_err()
115 struct expression *arg; in match_err()
[all …]
H A Dcheck_kernel.c30 static int implied_err_cast_return(struct expression *call, void *unused, struct range_list **rl) in implied_err_cast_return()
32 struct expression *arg; in implied_err_cast_return()
80 static void match_param_valid_ptr(const char *fn, struct expression *call_expr, in match_param_valid_ptr()
81 struct expression *assign_expr, void *_param) in match_param_valid_ptr()
84 struct expression *arg; in match_param_valid_ptr()
102 static void match_param_err_or_null(const char *fn, struct expression *call_expr, in match_param_err_or_null()
103 struct expression *assign_expr, void *_param) in match_param_err_or_null()
106 struct expression *arg; in match_param_err_or_null()
124 static void match_not_err(const char *fn, struct expression *call_expr, in match_not_err()
125 struct expression *assign_expr, void *unused) in match_not_err()
[all …]
H A Dinline.c39 static struct expression * dup_expression(struct expression *expr) in dup_expression()
41 struct expression *dup = alloc_expression(expr->pos, expr->type); in dup_expression()
78 static struct expression * copy_expression(struct expression *expr) in copy_expression()
107 struct expression *unop = copy_expression(expr->unop); in copy_expression()
116 struct expression *base = copy_expression(expr->base); in copy_expression()
127 struct expression *left = copy_expression(expr->left); in copy_expression()
128 struct expression *right = copy_expression(expr->right); in copy_expression()
138 struct expression *left = copy_expression(expr->left); in copy_expression()
139 struct expression *right = copy_expression(expr->right); in copy_expression()
150 struct expression *deref = copy_expression(expr->deref); in copy_expression()
[all …]
H A Dsmatch_conditions.c66 static void split_conditions(struct expression *expr);
68 static int is_logical_and(struct expression *expr) in is_logical_and()
75 static int handle_zero_comparisons(struct expression *expr) in handle_zero_comparisons()
77 struct expression *tmp = NULL; in handle_zero_comparisons()
78 struct expression *zero; in handle_zero_comparisons()
115 static int ignore_builtin_expect(struct expression *expr) in ignore_builtin_expect()
130 struct expression *expr = NULL; in handle_compound_stmt()
138 expr = last->label_statement->expression; in handle_compound_stmt()
144 expr = last->expression; in handle_compound_stmt()
156 static int handle_preop(struct expression *expr) in handle_preop()
[all …]
H A Dsmatch_constraints_required.c59 static int bytes_per_element(struct expression *expr) in bytes_per_element()
74 static void save_constraint_required(struct expression *pointer, int op, struct expression *constra… in save_constraint_required()
97 static int handle_zero_size_arrays(struct expression *pointer, struct expression *size) in handle_zero_size_arrays()
99 struct expression *left, *right; in handle_zero_size_arrays()
133 struct expression *mult_left, *mult_right; in handle_zero_size_arrays()
163 static void match_alloc_helper(struct expression *pointer, struct expression *size, int recurse) in match_alloc_helper()
165 struct expression *size_orig, *tmp; in match_alloc_helper()
191 struct expression *mult_left, *mult_right; in match_alloc_helper()
214 static void match_alloc(const char *fn, struct expression *expr, void *_size_arg) in match_alloc()
217 struct expression *call, *arg; in match_alloc()
[all …]
H A Dcheck_free.c33 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use()
45 static int is_freed(struct expression *expr) in is_freed()
55 static void match_symbol(struct expression *expr) in match_symbol()
57 struct expression *parent; in match_symbol()
78 static void match_dereferences(struct expression *expr) in match_dereferences()
102 static void set_ignored_params(struct expression *call) in set_ignored_params()
104 struct expression *arg; in set_ignored_params()
141 static int is_free_func(struct expression *fn) in is_free_func()
156 static void match_call(struct expression *expr) in match_call()
158 struct expression *arg; in match_call()
[all …]
H A Dsmatch_helper.c106 struct smatch_state *alloc_state_expr(struct expression *expr) in alloc_state_expr()
133 struct expression *get_argument_from_call_expr(struct expression_list *args, in get_argument_from_call_expr()
136 struct expression *expr; in get_argument_from_call_expr()
150 struct expression *get_array_expr(struct expression *expr) in get_array_expr()
152 struct expression *parent; in get_array_expr()
176 struct expression *expr, int len, in __get_variable_from_expr()
187 struct expression *deref; in __get_variable_from_expr()
193 struct expression *unop = strip_expr(deref->unop); in __get_variable_from_expr()
272 struct expression *array_expr; in __get_variable_from_expr()
318 struct expression *tmp; in __get_variable_from_expr()
[all …]
H A Dcheck_or_vs_and.c25 static int does_inc_dec(struct expression *expr) in does_inc_dec()
35 static int expr_equiv_no_inc_dec(struct expression *one, struct expression *two) in expr_equiv_no_inc_dec()
42 static int inconsistent_check(struct expression *left, struct expression *right) in inconsistent_check()
64 static void check_or(struct expression *expr) in check_or()
66 struct expression *left, *right; in check_or()
81 static int is_kernel_min_macro(struct expression *expr) in is_kernel_min_macro()
98 static void check_and(struct expression *expr) in check_and()
100 struct expression *left, *right; in check_and()
118 static void match_logic(struct expression *expr) in match_logic()
129 static int is_unconstant_macro(struct expression *expr) in is_unconstant_macro()
[all …]
H A Dsmatch_kernel_user_data.c55 static void set_points_to_user_data(struct expression *expr);
69 static void match_save_states(struct expression *expr) in match_save_states()
75 static void match_restore_states(struct expression *expr) in match_restore_states()
105 static void extra_nomod_hook(const char *name, struct symbol *sym, struct expression *expr, struct … in extra_nomod_hook()
124 static bool binop_capped(struct expression *expr) in binop_capped()
152 bool user_rl_capped(struct expression *expr) in user_rl_capped()
178 bool user_rl_treat_untagged(struct expression *expr) in user_rl_treat_untagged()
200 static void tag_inner_struct_members(struct expression *expr, struct symbol *member) in tag_inner_struct_members()
202 struct expression *edge_member; in tag_inner_struct_members()
229 static void tag_struct_members(struct symbol *type, struct expression *expr) in tag_struct_members()
[all …]
/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_grammar.y126 %type <l_immediate> expression
142 | expression pipeline shell_pipe terminator {
147 | expression ',' expression pipeline shell_pipe terminator {
152 | ',' expression pipeline shell_pipe terminator {
158 | expression terminator {
186 | expression ',' expression shell_pipe terminator {
192 | ',' expression shell_pipe terminator {
240 | format_list MDB_TOK_LEXPR expression MDB_TOK_REXPR {
278 | argument_list MDB_TOK_LEXPR expression MDB_TOK_REXPR {
297 expression: expression '+' expression { $$ = $1 + $3; }
[all …]

12345678910>>...13