Revert "sparse: Bump up sizeof(_Bool) to 8 bits"
[smatch.git] / dissect.h
blob3b72b89884df199a50022ee8063ca1ca822c7124
1 #ifndef DISSECT_H
2 #define DISSECT_H
4 #include <stdio.h>
5 #include "parse.h"
6 #include "expression.h"
8 #define U_SHIFT 8
10 #define U_R_AOF 0x01
11 #define U_W_AOF 0x02
13 #define U_R_VAL 0x04
14 #define U_W_VAL 0x08
16 #define U_R_PTR (U_R_VAL << U_SHIFT)
17 #define U_W_PTR (U_W_VAL << U_SHIFT)
19 struct reporter
21 void (*r_symdef)(struct symbol *);
23 void (*r_symbol)(unsigned, struct position *, struct symbol *);
24 void (*r_member)(unsigned, struct position *, struct symbol *, struct symbol *);
27 extern void dissect(struct symbol_list *, struct reporter *);
29 #define MK_IDENT(s) ({ \
30 static struct { \
31 struct ident ident; \
32 char __[sizeof(s)]; \
33 } ident = {{ \
34 .len = sizeof(s)-1, \
35 .name = s, \
36 }}; \
37 &ident.ident; \
40 #endif