Print this page
11972 resync smatch


  34 {
  35         if (mod_expr == skip_mod)
  36                 return;
  37         set_state(my_id, sm->name, sm->sym, &undefined);
  38 }
  39 
  40 struct expression *get_assigned_expr(struct expression *expr)
  41 {
  42         struct smatch_state *state;
  43 
  44         state = get_state_expr(my_id, expr);
  45         if (!state)
  46                 return NULL;
  47         return (struct expression *)state->data;
  48 }
  49 
  50 struct expression *get_assigned_expr_name_sym(const char *name, struct symbol *sym)
  51 {
  52         struct smatch_state *state;
  53 
  54         state = get_state(my_id, name, sym);
  55         if (!state)
  56                 return NULL;
  57         return (struct expression *)state->data;
  58 }
  59 
  60 static void match_assignment(struct expression *expr)
  61 {
  62         static struct expression *ignored_expr;
  63         struct symbol *left_sym, *right_sym;
  64         char *left_name = NULL;
  65         char *right_name = NULL;
  66 
  67         if (expr->op != '=')
  68                 return;
  69         if (is_fake_call(expr->right))
  70                 return;
  71         if (__in_fake_struct_assign) {
  72                 struct range_list *rl;
  73 
  74                 if (!get_implied_rl(expr->right, &rl))




  34 {
  35         if (mod_expr == skip_mod)
  36                 return;
  37         set_state(my_id, sm->name, sm->sym, &undefined);
  38 }
  39 
  40 struct expression *get_assigned_expr(struct expression *expr)
  41 {
  42         struct smatch_state *state;
  43 
  44         state = get_state_expr(my_id, expr);
  45         if (!state)
  46                 return NULL;
  47         return (struct expression *)state->data;
  48 }
  49 
  50 struct expression *get_assigned_expr_name_sym(const char *name, struct symbol *sym)
  51 {
  52         struct smatch_state *state;
  53 
  54         state = __get_state(my_id, name, sym);
  55         if (!state)
  56                 return NULL;
  57         return (struct expression *)state->data;
  58 }
  59 
  60 static void match_assignment(struct expression *expr)
  61 {
  62         static struct expression *ignored_expr;
  63         struct symbol *left_sym, *right_sym;
  64         char *left_name = NULL;
  65         char *right_name = NULL;
  66 
  67         if (expr->op != '=')
  68                 return;
  69         if (is_fake_call(expr->right))
  70                 return;
  71         if (__in_fake_struct_assign) {
  72                 struct range_list *rl;
  73 
  74                 if (!get_implied_rl(expr->right, &rl))