recompile the check_*.c files if the smatch headers are modified.
[smatch.git] / smatch_slist.h
blobbf0172db5404a0d7b719cc23faed8e5a20f42389
1 DECLARE_PTR_LIST(state_list, struct sm_state);
2 DECLARE_PTR_LIST(state_list_stack, struct state_list);
3 struct named_slist {
4 char *name;
5 struct state_list *slist;
6 };
7 DECLARE_ALLOCATOR(named_slist);
8 DECLARE_PTR_LIST(named_stack, struct named_slist);
10 extern struct state_list_stack *implied_pools;
12 void __print_slist(struct state_list *slist);
13 void add_history(struct sm_state *state);
14 int cmp_tracker(const struct sm_state *a, const struct sm_state *b);
15 struct sm_state *alloc_state(const char *name, int owner,
16 struct symbol *sym,
17 struct smatch_state *state);
19 void free_every_single_sm_state(void);
20 struct sm_state *clone_state(struct sm_state *s);
21 struct state_list *clone_slist(struct state_list *from_slist);
22 struct state_list_stack *clone_stack(struct state_list_stack *from_stack);
24 int slist_has_state(struct state_list *slist, struct smatch_state *state);
25 struct smatch_state *merge_states(const char *name, int owner,
26 struct symbol *sym,
27 struct smatch_state *state1,
28 struct smatch_state *state2);
30 struct sm_state *merge_sm_states(struct sm_state *one, struct sm_state *two);
31 struct smatch_state *get_state_slist(struct state_list *slist, const char *name, int owner,
32 struct symbol *sym);
34 struct sm_state *get_sm_state_slist(struct state_list *slist, const char *name, int owner,
35 struct symbol *sym);
37 void overwrite_sm_state(struct state_list **slist, struct sm_state *state);
38 void overwrite_sm_state_stack(struct state_list_stack **stack,
39 struct sm_state *state);
40 void set_state_slist(struct state_list **slist, const char *name, int owner,
41 struct symbol *sym, struct smatch_state *state);
43 void merge_state_slist(struct state_list **slist, const char *name, int owner,
44 struct symbol *sym, struct smatch_state *state);
46 void delete_state_slist(struct state_list **slist, const char *name, int owner,
47 struct symbol *sym);
49 struct smatch_state *get_state_slist(struct state_list *slist, const char *name, int owner,
50 struct symbol *sym);
52 void push_slist(struct state_list_stack **list_stack, struct state_list *slist);
54 struct state_list *pop_slist(struct state_list_stack **list_stack);
56 void free_slist(struct state_list **slist);
57 void free_stack(struct state_list_stack **stack);
58 void free_stack_and_slists(struct state_list_stack **slist_stack);
60 void set_state_stack(struct state_list_stack **stack, const char *name,
61 int owner, struct symbol *sym, struct smatch_state *state);
63 struct smatch_state *get_state_stack(struct state_list_stack *stack, const char *name,
64 int owner, struct symbol *sym);
66 void merge_slist(struct state_list **to, struct state_list *slist);
67 void and_slist_stack(struct state_list_stack **slist_stack);
69 void or_slist_stack(struct state_list_stack **pre_conds,
70 struct state_list *cur_slist,
71 struct state_list_stack **slist_stack);
73 struct state_list **get_slist_from_named_stack(struct named_stack *stack,
74 const char *name);
76 void overwrite_slist(struct state_list *from, struct state_list **to);