[cfe-dev] traversing structure initializers in c99 style

Vladimir Kirillov proger at uaoug.org.ua
Sat Nov 27 08:42:49 PST 2010


Hello, cfe-dev!

Suppose i have such statement:

struct data {
	int a;
	int b;
} instance = {
	.b = 10,
	.a = 5,
};

When calling getAnyInitializer() for VarDecl of instance, and
traversing it's children Stmts, it sequentially iterates over the
values, without any mentions of the C99 style used.

Is it possible to detect it and be aware of the order of fields
during initialization?

Thanks!



More information about the cfe-dev mailing list