On Sat, 29 Aug 2020, Markus Elfring wrote:
> >> Will this information trigger further consequences for the clarification
> >> of the topic “[RFC PATCH] coccinelle: api: add flex_array_size.cocci
> >> script”?
> >> https://lore.kernel.org/cocci/20200828163134.496386-1-efre...@linux.com/
> >> htt
>> Will this information trigger further consequences for the clarification
>> of the topic “[RFC PATCH] coccinelle: api: add flex_array_size.cocci script”?
>> https://lore.kernel.org/cocci/20200828163134.496386-1-efre...@linux.com/
>> https://systeme.lip6.fr/pipermail/cocci/2020-August/008169.html
On Sat, 29 Aug 2020, Markus Elfring wrote:
> >> @replacement@
> >> identifier array, instance, size;
> >> type T;
> >> @@
> >> (
> >> -sizeof(T)
> >> |
> >> -sizeof(*instance->array)
> >> )
> >> *
> >> +flex_array_size(instance, array,
> >> instance->size
> >> + )
>> @replacement@
>> identifier array, instance, size;
>> type T;
>> @@
>> (
>> -sizeof(T)
>> |
>> -sizeof(*instance->array)
>> )
>> *
>> +flex_array_size(instance, array,
>> instance->size
>> + )
>
> This semantic patch will fail if the sizeof(T) option is matched, b