For example, for a struct like this:
struct Foo {
char c;
struct {
int: 32;
struct {
int: 32;
int x;
};
};
};
We can not find the offset of the anonymous nested structs, even though we have a named field in there that a user might want to access.
Since we determine the offset of an anonymous struct by looking at the first field, we have to bail out when the first field is not named (as looking up offsets of unnamed field is not supported by libclang).
struct Foo {
char c;
struct {
int: 32;
struct {
int: 32;
int x;
};
};
};
We can not find the offset of the anonymous nested structs, even though we have a named field in there that a user might want to access.
Since we determine the offset of an anonymous struct by looking at the first field, we have to bail out when the first field is not named (as looking up offsets of unnamed field is not supported by libclang).