Home
last modified time | relevance | path

Searched defs:expr (Results 1 – 25 of 255) sorted by relevance

1234567891011

/illumos-gate/usr/src/tools/smatch/src/
H A Dexpand.c57 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()
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()
318 static int simplify_cmp_binop(struct expression *expr, struct symbol *ctype) in simplify_cmp_binop()
350 static int simplify_float_binop(struct expression *expr) in simplify_float_binop()
399 static int simplify_float_cmp(struct expression *expr, struct symbol *ctype) in simplify_float_cmp()
422 static int expand_binop(struct expression *expr) in expand_binop()
[all …]
H A Dsmatch_conditions.c68 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()
115 static int ignore_builtin_expect(struct expression *expr) in ignore_builtin_expect()
130 struct expression *expr = NULL; in handle_compound_stmt() local
156 static int handle_preop(struct expression *expr) in handle_preop()
173 static void handle_logical(struct expression *expr) in handle_logical()
234 static void handle_select(struct expression *expr) in handle_select()
357 static void handle_comma(struct expression *expr) in handle_comma()
378 static void hackup_unsigned_compares(struct expression *expr) in hackup_unsigned_compares()
387 static void do_condition(struct expression *expr) in do_condition()
[all …]
H A Dcheck_precedence.c23 static int is_bool(struct expression *expr) in is_bool()
35 static int is_bool_from_context(struct expression *expr) in is_bool_from_context()
46 static int is_bool_op(struct expression *expr) in is_bool_op()
59 static void match_condition(struct expression *expr) in match_condition()
103 static void match_binop(struct expression *expr) in match_binop()
111 static void match_mask(struct expression *expr) in match_mask()
123 static void match_mask_compare(struct expression *expr) in match_mask_compare()
133 static void match_subtract_shift(struct expression *expr) in match_subtract_shift()
H A Dsmatch_kernel_user_data.c69 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()
229 static void tag_struct_members(struct symbol *type, struct expression *expr) in tag_struct_members()
261 static void tag_base_type(struct expression *expr) in tag_base_type()
270 static void tag_as_user_data(struct expression *expr) in tag_as_user_data()
[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()
78 static void match_states(const char *fn, struct expression *expr, void *info) in match_states()
97 static void match_print_value(const char *fn, struct expression *expr, void *info) in match_print_value()
116 static void match_print_known(const char *fn, struct expression *expr, void *info) in match_print_known()
135 static void match_print_implied(const char *fn, struct expression *expr, void *info) in match_print_implied()
149 static void match_real_absolute(const char *fn, struct expression *expr, void *info) in match_real_absolute()
163 static void match_print_implied_min(const char *fn, struct expression *expr, void *info) in match_print_implied_min()
180 static void match_print_implied_max(const char *fn, struct expression *expr, void *info) in match_print_implied_max()
[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()
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()
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()
258 static struct range_list *size_from_db(struct expression *expr) in size_from_db()
268 static void db_returns_buf_size(struct expression *expr, int param, char *unused, char *math) in db_returns_buf_size()
[all …]
H A Dsmatch_math.c66 struct expression *expr; in last_stmt_rl() local
86 static bool handle_expression_statement_rl(struct expression *expr, int implied, in handle_expression_statement_rl()
92 static bool handle_address(struct expression *expr, int implied, int *recurse_cnt, struct range_lis… in handle_address()
126 static bool handle_ampersand_rl(struct expression *expr, int implied, int *recurse_cnt, struct rang… in handle_ampersand_rl()
131 static bool handle_negate_rl(struct expression *expr, int implied, int *recurse_cnt, struct range_l… in handle_negate_rl()
158 static bool handle_bitwise_negate(struct expression *expr, int implied, int *recurse_cnt, sval_t *r… in handle_bitwise_negate()
173 static bool untrusted_type_min(struct expression *expr) in untrusted_type_min()
181 static bool handle_minus_preop(struct expression *expr, int implied, int *recurse_cnt, struct range… in handle_minus_preop()
252 static bool handle_preop_rl(struct expression *expr, int implied, int *recurse_cnt, struct range_li… in handle_preop_rl()
272 static bool handle_divide_rl(struct expression *expr, int implied, int *recurse_cnt, struct range_l… in handle_divide_rl()
[all …]
H A Dsmatch_helper.c106 struct smatch_state *alloc_state_expr(struct expression *expr) in alloc_state_expr()
136 struct expression *expr; in get_argument_from_call_expr() local
150 struct expression *get_array_expr(struct expression *expr) in get_array_expr()
176 struct expression *expr, int len, in __get_variable_from_expr()
382 struct expression *expr; member
389 struct expression *expr, int len, in get_variable_from_expr()
431 char *expr_to_str_sym(struct expression *expr, struct symbol **sym_ptr) in expr_to_str_sym()
450 char *expr_to_str(struct expression *expr) in expr_to_str()
460 char *expr_to_var_sym(struct expression *expr, in expr_to_var_sym()
484 char *expr_to_var(struct expression *expr) in expr_to_var()
[all …]
H A Dsmatch_expressions.c11 struct expression *expr; in get_cur_pos() local
27 struct expression *expr; in alloc_tmp_expression() local
53 struct expression *expr; in value_expr() local
66 struct expression *expr; in member_expression() local
76 struct expression *preop_expression(struct expression *expr, int op) in preop_expression()
86 struct expression *deref_expression(struct expression *expr) in deref_expression()
95 struct expression *expr; in assign_expression() local
110 struct expression *expr; in binop_expression() local
121 struct expression *expr; in array_element_expression() local
129 struct expression *expr; in symbol_expression() local
[all …]
H A Dsmatch_recurse.c22 static int recurse(struct expression *expr, in recurse()
23 int (func)(struct expression *expr, void *p), in recurse()
114 static int has_symbol_helper(struct expression *expr, void *_sym) in has_symbol_helper()
125 int has_symbol(struct expression *expr, struct symbol *sym) in has_symbol()
131 struct expression *expr; member
136 static int has_var_helper(struct expression *expr, void *_var) in has_var_helper()
161 int has_variable(struct expression *expr, struct expression *var) in has_variable()
176 static int has_inc_dec_helper(struct expression *expr, void *unused) in has_inc_dec_helper()
187 int has_inc_dec(struct expression *expr) in has_inc_dec()
H A Dsmatch_untracked_param.c58 static void call_untracked_callbacks(struct expression *expr, int param) in call_untracked_callbacks()
74 static void call_lost_callbacks(struct expression *expr, int param) in call_lost_callbacks()
88 static char *get_array_from_key(struct expression *expr, int param, const char *key, struct symbol … 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, const char *key, const char *value) in mark_untracked()
136 void mark_lost(struct expression *expr, int param, const char *key, const char *value) in mark_lost()
141 static int lost_in_va_args(struct expression *expr) in lost_in_va_args()
160 static void match_after_call(struct expression *expr) in match_after_call()
205 void mark_all_params_untracked(int return_id, char *return_ranges, struct expression *expr) in mark_all_params_untracked()
210 void mark_all_params_lost(int return_id, char *return_ranges, struct expression *expr) in mark_all_params_lost()
[all …]
H A Dsmatch_type.c62 static struct symbol *get_binop_type(struct expression *expr) in get_binop_type()
115 static struct symbol *get_type_symbol(struct expression *expr) in get_type_symbol()
142 static struct symbol *get_symbol_from_deref(struct expression *expr) in get_symbol_from_deref()
164 static struct symbol *handle__builtin_choose_expr(struct expression *expr) in handle__builtin_choose_expr()
181 static struct symbol *get_return_type(struct expression *expr) in get_return_type()
209 static struct symbol *get_select_type(struct expression *expr) in get_select_type()
227 struct symbol *get_pointer_type(struct expression *expr) in get_pointer_type()
244 static struct symbol *fake_pointer_sym(struct expression *expr) in fake_pointer_sym()
258 static struct symbol *get_type_helper(struct expression *expr) in get_type_helper()
330 static struct symbol *get_final_type_helper(struct expression *expr) in get_final_type_helper()
[all …]
H A Dbuiltin.c33 static int evaluate_to_int_const_expr(struct expression *expr) in evaluate_to_int_const_expr()
40 static int evaluate_pure_unop(struct expression *expr) in evaluate_pure_unop()
58 static int eval_args(struct expression *expr, int n) in eval_args()
85 static int args_triadic(struct expression *expr) in args_triadic()
90 static int evaluate_choose(struct expression *expr) in evaluate_choose()
106 static int expand_expect(struct expression *expr, int cost) in expand_expect()
119 static int expand_warning(struct expression *expr, int cost) in expand_warning()
161 static int expand_constant_p(struct expression *expr, int cost) in expand_constant_p()
170 static int expand_safe_p(struct expression *expr, int cost) in expand_safe_p()
203 static int expand_bswap(struct expression *expr, int cost) in expand_bswap()
[all …]
H A Dcheck_or_vs_and.c25 static int does_inc_dec(struct expression *expr) in does_inc_dec()
64 static void check_or(struct expression *expr) 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()
118 static void match_logic(struct expression *expr) in match_logic()
129 static int is_unconstant_macro(struct expression *expr) in is_unconstant_macro()
141 static void match_condition(struct expression *expr) in match_condition()
166 static void match_binop(struct expression *expr) in match_binop()
H A Dsmatch_modification_hooks.c49 static struct smatch_state *alloc_my_state(struct expression *expr, struct smatch_state *prev) in alloc_my_state()
141 static void call_modification_hooks(struct expression *expr, struct expression *mod_expr, int late) in call_modification_hooks()
154 static void db_param_add(struct expression *expr, int param, char *key, char *value) in db_param_add()
189 static void match_assign(struct expression *expr, int late) in match_assign()
194 static void unop_expr(struct expression *expr, int late) in unop_expr()
202 static void match_call(struct expression *expr) in match_call()
221 struct expression *expr; in asm_expr() local
230 static void match_assign_early(struct expression *expr) in match_assign_early()
235 static void unop_expr_early(struct expression *expr) in unop_expr_early()
245 static void match_assign_late(struct expression *expr) in match_assign_late()
[all …]
H A Dsmatch_function_ptrs.c30 static char *get_from__symbol_get(struct expression *expr) in get_from__symbol_get()
53 static int xxx_is_array(struct expression *expr) in xxx_is_array()
81 static struct expression *xxx_get_array_base(struct expression *expr) in xxx_get_array_base()
93 static char *get_array_ptr(struct expression *expr) in get_array_ptr()
155 char *get_returned_ptr(struct expression *expr) in get_returned_ptr()
180 char *get_fnptr_name(struct expression *expr) in get_fnptr_name()
235 static void match_passes_function_pointer(struct expression *expr) in match_passes_function_pointer()
286 static int can_hold_function_ptr(struct expression *expr) in can_hold_function_ptr()
313 static void match_function_assign(struct expression *expr) in match_function_assign()
369 static void match_returns_function_pointer(struct expression *expr) in match_returns_function_pointer()
[all …]
H A Dcheck_leaks.c68 static char *get_parent_from_expr(struct expression *expr, struct symbol **sym) in get_parent_from_expr()
83 static int is_local(struct expression *expr) in is_local()
100 static int is_param(struct expression *expr) in is_param()
122 static void match_alloc(const char *fn, struct expression *expr, void *unused) in match_alloc()
133 static void match_condition(struct expression *expr) in match_condition()
156 static void set_parent(struct expression *expr, struct smatch_state *state) in set_parent()
181 static void match_function_call(struct expression *expr) in match_function_call()
190 static void warn_if_allocated(struct expression *expr) in warn_if_allocated()
213 static void match_assign(struct expression *expr) in match_assign()
H A Dsmatch_type_val.c53 static void match_inline_start(struct expression *expr) in match_inline_start()
59 static void match_inline_end(struct expression *expr) in match_inline_end()
66 struct expression *expr; member
72 static int get_cached(struct expression *expr, struct range_list **rl, int *ret) in get_cached()
91 int get_db_type_rl(struct expression *expr, struct range_list **rl) in get_db_type_rl()
187 struct expression *expr; in is_ignored_fake_assignment() local
217 struct expression *expr; in is_container_of() local
233 struct expression *expr; in is_driver_data() local
265 struct expression *expr; in is_ignored_macro() local
305 struct expression *expr; in is_ignored_function() local
[all …]
H A Dcheck_pointer_math.c30 static int is_sizeof(struct expression *expr) in is_sizeof()
35 static int is_macro(struct expression *expr, const char *macro_name) in is_macro()
51 static int is_size_in_bytes(struct expression *expr) in is_size_in_bytes()
67 static void match_binop(struct expression *expr) in match_binop()
99 static void match_assign(struct expression *expr) in match_assign()
109 static void check_assign(struct expression *expr) in check_assign()
H A Dshow-parse.c539 struct expression *expr = case_stmt->case_expression; in show_switch_statement() local
733 static int show_call_expression(struct expression *expr) in show_call_expression()
778 static int show_comma(struct expression *expr) in show_comma()
784 static int show_binop(struct expression *expr) in show_binop()
807 static int show_slice(struct expression *expr) in show_slice()
815 static int show_regular_preop(struct expression *expr) in show_regular_preop()
837 static int show_address_gen(struct expression *expr) in show_address_gen()
842 static int show_load_gen(int bits, struct expression *expr, int addr) in show_load_gen()
850 static void show_store_gen(int bits, int value, struct expression *expr, int addr) in show_store_gen()
856 static int show_assignment(struct expression *expr) in show_assignment()
[all …]
H A Dcheck_uninitialized.c80 static void extra_mod_hook(const char *name, struct symbol *sym, struct expression *expr, struct sm… in extra_mod_hook()
89 static void match_assign(struct expression *expr) in match_assign()
98 static void match_negative_comparison(struct expression *expr) in match_negative_comparison()
133 static int is_initialized(struct expression *expr) in is_initialized()
148 static void match_dereferences(struct expression *expr) in match_dereferences()
169 static void match_condition(struct expression *expr) in match_condition()
189 static void match_call(struct expression *expr) in match_call()
233 static void match_call_struct_members(struct expression *expr) in match_call_struct_members()
274 static int is_being_modified(struct expression *expr) in is_being_modified()
299 static void match_symbol(struct expression *expr) in match_symbol()
[all …]
H A Dcheck_rosenberg.c35 static void extra_mod_hook(const char *name, struct symbol *sym, struct expression *expr, struct sm… in extra_mod_hook()
61 static int check_struct(struct expression *expr, struct symbol *type) in check_struct()
106 static int warn_on_holey_struct(struct expression *expr) in warn_on_holey_struct()
116 static int has_global_scope(struct expression *expr) in has_global_scope()
128 static void match_clear(const char *fn, struct expression *expr, void *_arg_no) in match_clear()
143 static int was_memset(struct expression *expr) in was_memset()
193 static int check_members_initialized(struct expression *expr) in check_members_initialized()
271 static void match_copy_to_user(const char *fn, struct expression *expr, void *_arg) in match_copy_to_user()
285 static void db_param_cleared(struct expression *expr, int param, char *key, char *value) in db_param_cleared()
295 static struct smatch_state *alloc_expr_state(struct expression *expr) in alloc_expr_state()
[all …]
H A Dsmatch_strlen.c61 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()
95 static void match_strlen_condition(struct expression *expr) in match_strlen_condition()
165 static void match_snprintf(const char *fn, struct expression *expr, void *unused) in match_snprintf()
183 static void match_strlcpycat(const char *fn, struct expression *expr, void *unused) in match_strlcpycat()
207 static void match_strcpy(const char *fn, struct expression *expr, void *unused) in match_strcpy()
223 static int get_strlen_from_string(struct expression *expr, struct range_list **rl) in get_strlen_from_string()
235 static int get_strlen_from_state(struct expression *expr, struct range_list **rl) in get_strlen_from_state()
246 static int get_strlen_from_equiv(struct expression *expr, struct range_list **rl) in get_strlen_from_equiv()
261 int get_implied_strlen(struct expression *expr, struct range_list **rl) in get_implied_strlen()
[all …]
H A Dsmatch_fresh_alloc.c104 bool is_fresh_alloc(struct expression *expr) in is_fresh_alloc()
130 static void record_alloc_func(int return_id, char *return_ranges, struct expression *expr) in record_alloc_func()
137 static void set_unfresh(struct expression *expr) in set_unfresh()
150 static void match_assign(struct expression *expr) in match_assign()
155 static void match_call(struct expression *expr) in match_call()
165 static void set_fresh(struct expression *expr) in set_fresh()
183 static void returns_fresh_alloc(struct expression *expr, int param, char *key, char *value) in returns_fresh_alloc()
193 static void match_alloc(const char *fn, struct expression *expr, void *_size_arg) in match_alloc()
/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

1234567891011