>>> static struct my_string
>>> {
>>> unsigned int length;
>>> char* text;
>>> } message = { .text = get_default_message(1), .length = 123 };
>
> Actually, I don't see where you expect your rule to match your code.
The following small SmPL script seems to work.
@show_designated_initialisers@
identifier allocation, element, structure_type, structure_var;
@@
*struct structure_type { ... } structure_var = { ..., .element =
allocation(...), ... };
Do I stumble on another open issue if I would dare to reuse the SmPL
construct "<+... ...+>" for such an use case again?
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci