>> @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, becuse
> then it won't be able to create the + code, since it won't know what array
> should be.

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

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to