dissect: teach do_initializer() to handle the nested EXPR_IDENTIFIER's
do_initializer() is very limited/buggy but it was able to parse the kernel
code until ftrace started to use ".a.b = x" rather than ".a = { .b = x }"
in initializers.
Test-case:
struct O {
struct I {
int mem;
} inn;
int end;
} var = {
.inn.mem = 0,
0,
};
before the patch:
1:8 s def O
2:16 s def I
6:3 g def var struct O
6:3 g -w- var struct O
7:10 s -w- O.inn struct I
7:10 s -w- I.* struct I
I.c:7:14: warning: bad expr->type: 25
8:9 s -w- O.end int
after:
1:8 s def O
2:16 s def I
6:3 g def var struct O
6:3 g -w- var struct O
7:10 s -w- O.inn struct I
7:14 s -w- I.mem int
8:9 s -w- O.end int
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>