Re: [Cocci] Checking the application of a SmPL disjunction for a function call addition

2020-08-29 Thread Julia Lawall
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

Re: [Cocci] Checking the application of a SmPL disjunction for a function call addition

2020-08-29 Thread Markus Elfring
>> 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

Re: [Cocci] Checking the application of a SmPL disjunction for a function call addition

2020-08-29 Thread Julia Lawall
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 > >> + )

Re: [Cocci] Checking the application of a SmPL disjunction for a function call addition

2020-08-29 Thread Markus Elfring
>> @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