Re: coccinelle: adjustments for array.cocci?
- From
René Scharfe <l.s.r@web.de>
- Date
- Nov 17, 2019, 13:40 UTC
- Message-ID
- <f28f5fb8-2814-9df5-faf2-7146ed1a1f4d@web.de>
- In-Reply-To
- <50b265f0-bcab-d0ec-a714-07e94ceaa508@web.de>
Am 17.11.19 um 09:19 schrieb Markus Elfring:
Show 5 quoted lines
>> Which transformation rules are questionable and why? > > It was chosen to transform source code fragments (pointer expressions) > by two SmPL rules so that the search pattern “sizeof(T)” would work > in the third rule.
Ah, right, it would be nice to get rid of those normalization rules, especially the second one. I don't see how, though, without either causing a combinatorial explosion or loosening up the matching too much.
>> Matching sizeof of anything (with the x) can produce inaccurate >> transformations, as mentioned in the other reply I just sent. > > Would you like to apply any further SmPL code fine-tuning?
I guess that's a question for Junio, and his reply in https://public-inbox.org/git/xmqqa790cyp1.fsf@gitster-ct.c.googlers.com/ seems relevant.
René