/illumos-gate/usr/src/tools/smatch/src/ |
H A D | parse.h | 47 struct statement { struct 50 struct statement *parent; argument 65 struct statement *if_true; argument 66 struct statement *if_false; 72 struct statement *args; 76 struct statement *label_statement; 81 struct statement *case_statement; 86 struct statement *switch_statement; 93 struct statement *iterator_pre_statement; 96 struct statement *iterator_statement; [all …]
|
H A D | check_continue_vs_break.c | 35 static int is_do_while_zero(struct statement *stmt) in is_do_while_zero() 44 static void push_statement(struct statement_list **stack, struct statement *stmt) in push_statement() 56 struct statement *stmt; in inside_do_while_zero() 64 struct statement *stmt; in loop_is_macro() 74 static void match_stmt(struct statement *stmt) in match_stmt() 85 static void match_stmt_after(struct statement *stmt) in match_stmt_after() 103 static void match_continue(struct statement *stmt) in match_continue()
|
H A D | check_unreachable.c | 26 static int empty_statement(struct statement *stmt) in empty_statement() 35 static int is_last_stmt(struct statement *cur_stmt) in is_last_stmt() 38 struct statement *stmt; in is_last_stmt() 64 static int is_ignored_macro(struct statement *stmt) in is_ignored_macro() 81 static int prev_line_was_endif(struct statement *stmt) in prev_line_was_endif() 103 static int we_jumped_into_the_middle_of_a_loop(struct statement *stmt) in we_jumped_into_the_middle_of_a_loop() 105 struct statement *prev; in we_jumped_into_the_middle_of_a_loop() 128 static void unreachable_stmt(struct statement *stmt) in unreachable_stmt() 194 static char *get_function_name(struct statement *stmt) in get_function_name() 208 static void turn_off_unreachable(struct statement *stmt) in turn_off_unreachable()
|
H A D | smatch_scope.c | 22 static int end_of_function(struct statement *stmt) in end_of_function() 39 static void match_end_of_block(struct statement *stmt) in match_end_of_block() 41 struct statement *tmp; in match_end_of_block() 59 static int is_outer_stmt(struct statement *stmt) in is_outer_stmt() 80 static void match_stmt(struct statement *stmt) in match_stmt() 82 struct statement *tmp; in match_stmt()
|
H A D | inline.c | 37 static void copy_statement(struct statement *src, struct statement *dst); 46 static struct statement * dup_statement(struct statement *stmt) in dup_statement() 48 struct statement *dup = alloc_statement(stmt->pos, stmt->type); in dup_statement() 197 struct statement *stmt = alloc_statement(expr->pos, STMT_COMPOUND); in copy_expression() 198 copy_statement(expr->statement, stmt); in copy_expression() 200 expr->statement = stmt; in copy_expression() 325 static struct statement *copy_one_statement(struct statement *stmt) in copy_one_statement() 334 struct statement *newstmt = dup_statement(stmt); in copy_one_statement() 363 struct statement *new = alloc_statement(stmt->pos, STMT_COMPOUND); in copy_one_statement() 370 struct statement *valt = stmt->if_true; in copy_one_statement() [all …]
|
H A D | parse.c | 51 static struct token *statement(struct token *token, struct statement **tree); 64 static struct token *parse_if_statement(struct token *token, struct statement *stmt); 65 static struct token *parse_return_statement(struct token *token, struct statement *stmt); 66 static struct token *parse_loop_iterator(struct token *token, struct statement *stmt); 67 static struct token *parse_default_statement(struct token *token, struct statement *stmt); 68 static struct token *parse_case_statement(struct token *token, struct statement *stmt); 69 static struct token *parse_switch_statement(struct token *token, struct statement *stmt); 70 static struct token *parse_for_statement(struct token *token, struct statement *stmt); 71 static struct token *parse_while_statement(struct token *token, struct statement *stmt); 72 static struct token *parse_do_statement(struct token *token, struct statement *stmt); [all …]
|
H A D | smatch_conditions.c | 128 static void handle_compound_stmt(struct statement *stmt) in handle_compound_stmt() 131 struct statement *last; in handle_compound_stmt() 132 struct statement *s; in handle_compound_stmt() 158 struct statement *stmt; in handle_preop() 681 static struct statement *split_then_return_last(struct statement *stmt) in split_then_return_last() 683 struct statement *tmp; in split_then_return_last() 684 struct statement *last_stmt; in split_then_return_last() 707 struct statement *stmt; in __handle_expr_statement_assigns() 716 stmt = right->statement; in __handle_expr_statement_assigns() 718 struct statement *last_stmt; in __handle_expr_statement_assigns() [all …]
|
H A D | smatch_flow.c | 55 struct statement *__prev_stmt; 56 struct statement *__cur_stmt; 57 struct statement *__next_stmt; 191 struct statement *last_stmt = NULL; in inlinable() 399 if (expr->statement && !expr->statement) { in __split_expr() 400 stmt_set_parent_stmt(expr->statement, in __split_expr() 403 __split_stmt(expr->statement); in __split_expr() 579 static int is_forever_loop(struct statement *stmt) in is_forever_loop() 611 static void handle_pre_loop(struct statement *stmt) in handle_pre_loop() 694 static void handle_post_loop(struct statement *stmt) in handle_post_loop() [all …]
|
H A D | check_indenting.c | 24 static int in_ignored_macro(struct statement *stmt) in in_ignored_macro() 40 static int missing_curly_braces(struct statement *stmt) in missing_curly_braces() 68 static int prev_lines_say_endif(struct statement *stmt) in prev_lines_say_endif() 87 static int is_pre_or_post_statement(struct statement *stmt) in is_pre_or_post_statement() 113 static void match_stmt(struct statement *stmt) in match_stmt()
|
H A D | expression.h | 182 struct statement *statement; member 285 extern struct symbol *evaluate_statement(struct statement *stmt); 324 struct statement *alloc_statement(struct position pos, int type); 326 struct token *compound_statement(struct token *, struct statement *);
|
H A D | evaluate.h | 5 struct statement; 21 struct symbol *evaluate_statement(struct statement *stmt);
|
H A D | show-parse.c | 485 struct statement *stmt = type->stmt; in show_symbol() 522 static void show_switch_statement(struct statement *stmt) in show_switch_statement() 538 struct statement *case_stmt = sym->stmt; in show_switch_statement() 575 static int show_return_stmt(struct statement *stmt); 580 int show_statement(struct statement *stmt) in show_statement() 591 struct statement *s; in show_statement() 623 struct statement *s = stmt->if_true; in show_statement() 654 struct statement *pre_statement = stmt->iterator_pre_statement; in show_statement() 656 struct statement *statement = stmt->iterator_statement; in show_statement() local 657 struct statement *post_statement = stmt->iterator_post_statement; in show_statement() [all …]
|
H A D | check_double_checking.c | 30 static struct statement *get_cur_stmt(void) in get_cur_stmt() 81 struct statement *parent; in is_obvious_else() 129 struct statement *stmt; in previous_statement_was_synchronize() 237 static void after_loop(struct statement *stmt) in after_loop()
|
H A D | check_missing_break.c | 129 static void match_stmt(struct statement *stmt) in match_stmt() 137 static void match_switch(struct statement *stmt) in match_switch() 161 static void match_switch_end(struct statement *stmt) in match_switch_end()
|
H A D | check_no_if_block.c | 22 static void match_if_stmt(struct statement *stmt) in match_if_stmt() 37 static void match_for_stmt(struct statement *stmt) in match_for_stmt()
|
H A D | check_nospec.c | 176 static int is_nospec_asm(struct statement *stmt) in is_nospec_asm() 190 static void match_asm(struct statement *stmt) in match_asm() 196 static void match_after_nospec_asm(struct statement *stmt) in match_after_nospec_asm() 221 static void match_barrier(struct statement *stmt) in match_barrier()
|
H A D | smatch_helper.c | 698 struct statement *get_expression_statement(struct expression *expr) in get_expression_statement() 710 if (expr->unop->statement->type != STMT_COMPOUND) in get_expression_statement() 712 return expr->unop->statement; in get_expression_statement() 725 expr->unop->statement->type == STMT_COMPOUND) in strip_parens() 757 expr->unop->statement->type == STMT_COMPOUND) in strip_expr_helper() 1003 struct statement *get_current_statement(void) in get_current_statement() 1005 struct statement *prev, *tmp; in get_current_statement() 1022 struct statement *get_prev_statement(void) in get_prev_statement() 1024 struct statement *tmp; in get_prev_statement() 1037 struct statement *stmt; in get_last_expr_from_expression_stmt() [all …]
|
H A D | check_bogus_loop.c | 32 static struct expression *get_iterator_set(struct statement *stmt) in get_iterator_set() 59 static void match_loop(struct statement *stmt) in match_loop()
|
H A D | smatch_expressions.c | 12 struct statement *stmt; in get_cur_pos() 309 void expr_set_parent_stmt(struct expression *expr, struct statement *parent) in expr_set_parent_stmt() 325 struct statement *expr_get_parent_stmt(struct expression *expr) in expr_get_parent_stmt() 331 return (struct statement *)expr->parent; in expr_get_parent_stmt()
|
H A D | lib.h | 70 struct statement; 79 DECLARE_PTR_LIST(statement_list, struct statement); 315 static inline void add_statement(struct statement_list **list, struct statement *stmt) in add_statement()
|
H A D | check_readl_infinite_loops.c | 123 static void before_loop(struct statement *stmt) in before_loop() 135 static void after_loop(struct statement *stmt) in after_loop()
|
/illumos-gate/usr/src/cmd/oawk/ |
H A D | awk.g.y | 313 statement: 315 | if statement { $$ = stat3(IF, $1, $2, 0); } 316 | if statement else statement 318 | while statement { $$ = stat2(WHILE, $1, $2); } 330 stat_list statement { $$ = linkum($1, $2); } 341 FOR '(' simple_stat ';' conditional ';' simple_stat ')' optNL statement 343 | FOR '(' simple_stat ';' ';' simple_stat ')' optNL statement 345 | FOR '(' VAR IN VAR ')' optNL statement
|
/illumos-gate/usr/src/cmd/awk_xpg4/ |
H A D | awk.y | 140 %type <node> statement statlist fileout exprlist eexprlist simplepattern 403 statement: 404 FOR LPAREN fexpr SEMI fexpr SEMI fexpr RPAREN statement { 407 | FOR LPAREN var IN var RPAREN statement { 426 | WHILE LPAREN expr RPAREN statement { 429 | DO statement WHILE LPAREN expr RPAREN { 432 | IF LPAREN expr RPAREN statement ELSE statement { 435 | IF LPAREN expr RPAREN statement %prec ELSE { 481 statement 482 | statlist statement {
|
/illumos-gate/usr/src/tools/smatch/src/Documentation/ |
H A D | data-structures.txt | 6 parse.h contains the definition of struct statement, which represents a C statement. 9 A series of statements forms a compound statement (STMT_COMPOUND). 10 That appears as another struct statement which has a statement_list member. 11 A function body consists of a compound statement. 12 …hat they just have a struct statement, not a statement_list; they can have multiple statements by … 13 Also note that all loops get turned into a single "iterator" statement. 20 Among other things, it has a struct statement for the body of a function (if any), a list of symbol… 21 Together, struct symbol, struct statement, and struct expression represent most of the abstract syn…
|
/illumos-gate/usr/src/lib/libsqlite/test/ |
H A D | trigger2.test | 15 # times relative to each other and the triggering statement. 211 set statement {UPDATE tbl SET c = 10 WHERE a = 1;} 221 set statement {DELETE FROM tbl WHERE a = 1;} 228 set statement {INSERT INTO tbl VALUES(1, 2, 3);} 235 set statement {} 248 set statement_type [string range $statement 0 5] 286 set before_data [ execsql "$prep $tr_program_cooked $statement $query" ] 289 execsql "CREATE TRIGGER the_trigger BEFORE [string range $statement 0 6]\ 292 do_test trigger2-2.$ii-before "execsql {$statement $query}" $before_data 298 set after_data [ execsql "$prep $statement $tr_program_cooked $query" ] [all …]
|