Home
last modified time | relevance | path

Searched refs:stmt (Results 1 – 25 of 72) sorted by relevance

123

/illumos-gate/usr/src/tools/smatch/src/
H A Dinline.c350 stmt = dup_statement(stmt); in copy_one_statement()
358 stmt = dup_statement(stmt); in copy_one_statement()
380 stmt = dup_statement(stmt); in copy_one_statement()
390 stmt = dup_statement(stmt); in copy_one_statement()
396 stmt = dup_statement(stmt); in copy_one_statement()
398 stmt->case_label->stmt = stmt; in copy_one_statement()
410 stmt = dup_statement(stmt); in copy_one_statement()
419 stmt = dup_statement(stmt); in copy_one_statement()
434 stmt = dup_statement(stmt); in copy_one_statement()
440 stmt = dup_statement(stmt); in copy_one_statement()
[all …]
H A Dcheck_unreachable.c28 if (!stmt) in empty_statement()
30 if (stmt->type == STMT_EXPRESSION && !stmt->expression) in empty_statement()
38 struct statement *stmt; in is_last_stmt() local
42 stmt = fn->stmt; in is_last_stmt()
43 if (!stmt) in is_last_stmt()
44 stmt = fn->inline_stmt; in is_last_stmt()
45 if (!stmt || stmt->type != STMT_COMPOUND) in is_last_stmt()
47 stmt = last_ptr_list((struct ptr_list *)stmt->stmts); in is_last_stmt()
48 if (stmt == cur_stmt) in is_last_stmt()
154 switch (stmt->type) { in unreachable_stmt()
[all …]
H A Dcheck_indenting.c61 if (stmt->pos.pos != inside_pos) in missing_curly_braces()
71 struct position pos = stmt->pos; in prev_lines_say_endif()
89 if (!stmt->parent) in is_pre_or_post_statement()
93 if (stmt->parent->iterator_pre_statement == stmt || in is_pre_or_post_statement()
94 stmt->parent->iterator_post_statement == stmt) in is_pre_or_post_statement()
115 if (stmt != __cur_stmt) in match_stmt()
126 if (stmt->type == STMT_EXPRESSION && !stmt->expression) in match_stmt()
142 if (stmt->type == STMT_CASE) { in match_stmt()
162 ignore_prev = stmt->pos; in match_stmt()
169 if (stmt->type == STMT_GOTO && stmt->goto_label && in match_stmt()
[all …]
H A Dcheck_continue_vs_break.c37 if (!stmt->iterator_post_condition) in is_do_while_zero()
46 add_ptr_list(stack, stmt); in push_statement()
56 struct statement *stmt; in inside_do_while_zero() local
59 return !!stmt; in inside_do_while_zero()
64 struct statement *stmt; in loop_is_macro() local
67 if (!stmt) in loop_is_macro()
76 if (stmt->type != STMT_ITERATOR) in match_stmt()
79 if (is_do_while_zero(stmt)) { in match_stmt()
87 if (stmt->type != STMT_ITERATOR) in match_stmt_after()
105 if (stmt->type != STMT_GOTO) in match_continue()
[all …]
H A Dsmatch_flow.c815 stmt = stmt->switch_statement; in split_known_switch()
847 expr_set_parent_stmt(stmt->case_to, stmt); in split_case()
850 stmt->case_expression, stmt->case_to); in split_case()
862 stmt = stmt->case_statement; in split_case()
899 stmt = fn->stmt; in is_last_stmt()
902 if (!stmt || stmt->type != STMT_COMPOUND) in is_last_stmt()
905 if (stmt && stmt->type == STMT_LABEL) in is_last_stmt()
906 stmt = stmt->label_statement; in is_last_stmt()
1029 stmt = fn->stmt; in need_delayed_scope_hooks()
1032 if (stmt && stmt->type == STMT_COMPOUND) in need_delayed_scope_hooks()
[all …]
H A Dsmatch_scope.c22 static int end_of_function(struct statement *stmt) in end_of_function() argument
29 if (stmt == fn->stmt || stmt == fn->inline_stmt) in end_of_function()
44 if (end_of_function(stmt)) in match_end_of_block()
47 FOR_EACH_PTR(stmt->stmts, tmp) { in match_end_of_block()
72 if (!stmt->parent) in is_outer_stmt()
74 if (stmt->parent == fn->stmt || in is_outer_stmt()
75 stmt->parent == fn->inline_stmt) in is_outer_stmt()
80 static void match_stmt(struct statement *stmt) in match_stmt() argument
87 if (stmt->type == STMT_COMPOUND) in match_stmt()
88 add_ptr_list(&stmt_list, stmt); in match_stmt()
[all …]
H A Dcheck_no_if_block.c22 static void match_if_stmt(struct statement *stmt) in match_if_stmt() argument
26 if (stmt->type != STMT_IF) in match_if_stmt()
28 if (stmt->if_true->type == STMT_COMPOUND) in match_if_stmt()
30 if (get_macro_name(stmt->pos)) in match_if_stmt()
32 if (stmt->pos.pos != stmt->if_true->pos.pos) in match_if_stmt()
37 static void match_for_stmt(struct statement *stmt) in match_for_stmt() argument
41 if (stmt->type != STMT_ITERATOR) in match_for_stmt()
43 if (stmt->iterator_statement->type == STMT_COMPOUND) in match_for_stmt()
45 if (get_macro_name(stmt->pos)) in match_for_stmt()
47 if (stmt->pos.pos != stmt->iterator_statement->pos.pos) in match_for_stmt()
H A Dast-inspect.c45 struct statement *stmt = node->ptr; in inspect_statement() local
47 switch (stmt->type) { in inspect_statement()
49 ast_append_child(node, "stmts:", stmt->stmts, inspect_statement_list); in inspect_statement()
56 ast_append_child(node, "if_true:", stmt->if_true, inspect_statement); in inspect_statement()
57 ast_append_child(node, "if_false:", stmt->if_false, inspect_statement); in inspect_statement()
60 ast_append_child(node, "break:", stmt->iterator_break, inspect_symbol); in inspect_statement()
62 ast_append_child(node, "pre_statement:", stmt->iterator_pre_statement, in inspect_statement()
64 ast_append_child(node, "statement:", stmt->iterator_statement, in inspect_statement()
66 ast_append_child(node, "post_statement:", stmt->iterator_post_statement, in inspect_statement()
78 ast_append_child(node, "case_to:", stmt->case_to, inspect_expression); in inspect_statement()
[all …]
H A Dshow-parse.c485 struct statement *stmt = type->stmt; in show_symbol() local
487 if (stmt) { in show_symbol()
489 val = show_statement(stmt); in show_symbol()
563 if (stmt->switch_break->used) in show_switch_statement()
582 if (!stmt) in show_statement()
584 switch (stmt->type) { in show_statement()
594 if (stmt->inline_fn) { in show_statement()
601 if (stmt->ret) { in show_statement()
609 if (stmt->inline_fn) in show_statement()
625 s = stmt->if_false; in show_statement()
[all …]
H A Dcheck_bogus_loop.c32 static struct expression *get_iterator_set(struct statement *stmt) in get_iterator_set() argument
36 if (!stmt) in get_iterator_set()
38 if (stmt->type != STMT_EXPRESSION) in get_iterator_set()
40 expr = stmt->expression; in get_iterator_set()
59 static void match_loop(struct statement *stmt) in match_loop() argument
65 if (get_macro_name(stmt->pos)) in match_loop()
68 iterator = get_iterator_set(stmt->iterator_pre_statement); in match_loop()
70 iterator = get_iterator_tested(stmt->iterator_pre_condition); in match_loop()
80 if (right_side_changes(stmt->iterator_pre_condition)) in match_loop()
83 if (implied_condition_false(stmt->iterator_pre_condition)) in match_loop()
H A Dparse.c668 return stmt; in alloc_statement()
2152 token = parse_asm_labels(token, stmt, &stmt->asm_labels); in parse_asm_statement()
2202 return stmt; in make_statement()
2253 return stmt; in start_function()
2284 switch_case->stmt = stmt; in start_switch()
2313 sym->stmt = stmt; in add_case_statement()
2494 stmt->context = stmt->expression; in parse_context_statement()
2521 *tree = stmt; in statement()
2537 s->stmt = stmt; in statement()
2831 *p = stmt; in parse_function_body()
[all …]
H A Dcheck_spectre.c35 struct statement *stmt; in is_read() local
58 stmt = expr_get_parent_stmt(last_parent); in is_read()
59 if (stmt && stmt->type == STMT_RETURN) in is_read()
68 struct statement *stmt; in is_harmless() local
80 stmt = expr_get_parent_stmt(parent); in is_harmless()
81 if (!stmt) in is_harmless()
83 if (stmt->type == STMT_IF && stmt->if_conditional == parent) in is_harmless()
85 if (stmt->type == STMT_ITERATOR && in is_harmless()
86 (stmt->iterator_pre_condition == parent || in is_harmless()
87 stmt->iterator_post_condition == parent)) in is_harmless()
H A Ddissect.c466 if (stmt) switch (stmt->type) { in do_statement()
468 warning(stmt->pos, "bad stmt->type: %d", stmt->type); in do_statement()
475 do_sym_list(stmt->declaration); in do_statement()
484 do_expression(U_R_VAL, stmt->asm_string); in do_statement()
486 do_asm_xputs(U_R_VAL, stmt->asm_inputs); in do_statement()
492 DO_LIST(stmt->stmts, st, in do_statement()
497 do_sym_list(stmt->iterator_syms); in do_statement()
506 do_statement(U_VOID, stmt->if_true); in do_statement()
507 do_statement(U_VOID, stmt->if_false); in do_statement()
515 do_expression(U_R_VAL, stmt->case_to); in do_statement()
[all …]
H A Dexpand.c1067 if (stmt->type == STMT_EXPRESSION && stmt->expression) in expand_expression()
1128 if (base_type->stmt) in expand_symbol()
1153 simple = expr->value ? stmt->if_true : stmt->if_false; in expand_if_statement()
1157 stmt->type = STMT_NONE; in expand_if_statement()
1161 *stmt = *simple; in expand_if_statement()
1185 if (stmt->ret) in expand_compound()
1186 expand_symbol(stmt->ret); in expand_compound()
1188 last = stmt->args; in expand_compound()
1198 *stmt = *last; in expand_compound()
1205 if (!stmt) in expand_statement()
[all …]
H A Dcheck_passes_sizeof.c28 struct statement *stmt; in get_returned_expr() local
30 stmt = last_ptr_list((struct ptr_list *)big_statement_stack); 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()
H A Dlinearize.c2048 bb->pos = stmt->pos; in linearize_inlined_call()
2247 bind_label(stmt->switch_break, switch_end, stmt->pos); in linearize_switch()
2294 bind_label(stmt->iterator_continue, loop_continue, stmt->pos); in linearize_iterator()
2295 bind_label(stmt->iterator_break, loop_end, stmt->pos); in linearize_iterator()
2316 if (!stmt) in linearize_statement()
2321 bb->pos = stmt->pos; in linearize_statement()
2324 switch (stmt->type) { in linearize_statement()
2405 if (stmt->inline_fn) in linearize_statement()
2425 if (stmt->if_false) { in linearize_statement()
2449 struct statement *stmt = base_type->stmt; in linearize_fn() local
[all …]
H A Dsmatch_real_absolute.c79 struct statement *stmt; in in_iterator_pre_statement() local
87 stmt = last_ptr_list((struct ptr_list *)big_statement_stack); in in_iterator_pre_statement()
89 if (!stmt || !stmt->parent) in in_iterator_pre_statement()
91 if (stmt->parent->type != STMT_ITERATOR) in in_iterator_pre_statement()
93 if (stmt->parent->iterator_pre_statement != stmt) in in_iterator_pre_statement()
H A Dcheck_all_func_returns.c30 struct statement *stmt; in check_func_return() local
75 stmt = last_ptr_list((struct ptr_list *)big_statement_stack); in check_func_return()
77 if (stmt && stmt->type == STMT_EXPRESSION && stmt->expression == expr) in check_func_return()
H A Dsmatch_conditions.c147 FOR_EACH_PTR(stmt->stmts, s) { in handle_compound_stmt()
158 struct statement *stmt; in handle_preop() local
165 stmt = get_expression_statement(expr); in handle_preop()
166 if (stmt) { in handle_preop()
167 handle_compound_stmt(stmt); in handle_preop()
691 FOR_EACH_PTR(stmt->stmts, tmp) { in split_then_return_last()
707 struct statement *stmt; in __handle_expr_statement_assigns() local
716 stmt = right->statement; in __handle_expr_statement_assigns()
717 if (stmt->type == STMT_COMPOUND) { in __handle_expr_statement_assigns()
736 __pass_to_client(stmt, STMT_HOOK_AFTER); in __handle_expr_statement_assigns()
[all …]
H A Dcheck_nospec.c176 static int is_nospec_asm(struct statement *stmt) in is_nospec_asm() argument
180 if (!stmt || stmt->type != STMT_ASM) in is_nospec_asm()
182 if (!stmt->asm_string) in is_nospec_asm()
184 macro = get_macro_name(stmt->asm_string->pos); in is_nospec_asm()
190 static void match_asm(struct statement *stmt) in match_asm() argument
192 if (is_nospec_asm(stmt)) in match_asm()
196 static void match_after_nospec_asm(struct statement *stmt) in match_after_nospec_asm() argument
221 static void match_barrier(struct statement *stmt) in match_barrier() argument
225 macro = get_macro_name(stmt->pos); in match_barrier()
H A Dcheck_double_checking.c129 struct statement *stmt; in previous_statement_was_synchronize() local
145 FOR_EACH_PTR_REVERSE(big_statement_stack, stmt) { in previous_statement_was_synchronize()
146 if (stmt->pos.line < prev_pos.line) in previous_statement_was_synchronize()
148 pos = stmt->pos; in previous_statement_was_synchronize()
163 } END_FOR_EACH_PTR_REVERSE(stmt); in previous_statement_was_synchronize()
237 static void after_loop(struct statement *stmt) in after_loop() argument
241 if (!stmt || stmt->type != STMT_ITERATOR) in after_loop()
H A Dcheck_readl_infinite_loops.c123 static void before_loop(struct statement *stmt) in before_loop() argument
127 if (!stmt || stmt->type != STMT_ITERATOR) in before_loop()
135 static void after_loop(struct statement *stmt) in after_loop() argument
139 if (!stmt || stmt->type != STMT_ITERATOR) in after_loop()
H A Dcheck_missing_break.c129 static void match_stmt(struct statement *stmt) in match_stmt() argument
131 if (stmt->type == STMT_CASE) in match_stmt()
137 static void match_switch(struct statement *stmt) in match_switch() argument
139 if (stmt->type != STMT_SWITCH) in match_switch()
161 static void match_switch_end(struct statement *stmt) in match_switch_end() argument
164 if (stmt->type != STMT_SWITCH) in match_switch_end()
/illumos-gate/usr/src/cmd/fm/modules/common/eversholt/
H A Deft_mdb.c466 if (node.u.stmt.nvpairs) { in eft_node()
477 if (node.u.stmt.nvpairs) { in eft_node()
714 if (node.u.stmt.nvpairs) { in eft_node()
725 if (node.u.stmt.nvpairs) { in eft_node()
736 if (node.u.stmt.nvpairs) { in eft_node()
747 if (node.u.stmt.nvpairs) { in eft_node()
758 if (node.u.stmt.nvpairs) { in eft_node()
769 if (node.u.stmt.nvpairs) { in eft_node()
774 } else if (node.u.stmt.lutp) { in eft_node()
784 if (node.u.stmt.nvpairs) { in eft_node()
[all …]
/illumos-gate/usr/src/lib/libdtrace/common/
H A Ddt_sugar.c315 dt_node_t *stmt = dt_node_statement(dt_node_op2(DT_TOK_ASGN, in dt_sugar_new_clearerror_clause() local
317 return (dt_node_clause(dp->dtsp_pdescs, NULL, stmt)); in dt_sugar_new_clearerror_clause()
392 dt_node_t *stmt; in dt_sugar_visit_stmts() local
397 for (stmt = stmts; stmt != NULL; stmt = next_stmt) { in dt_sugar_visit_stmts()
398 next_stmt = stmt->dn_list; in dt_sugar_visit_stmts()
400 if (stmt->dn_kind != DT_NODE_IF) { in dt_sugar_visit_stmts()
402 first_stmt_in_basic_block = stmt; in dt_sugar_visit_stmts()
403 prev_stmt = stmt; in dt_sugar_visit_stmts()
422 dt_sugar_do_if(dp, stmt, precondition); in dt_sugar_visit_stmts()
426 prev_stmt = stmt; in dt_sugar_visit_stmts()

123