Thread (24 messages) flat view 24 messages, 3 authors, 2020-01-25

Re: coccinelle: adjustments for array.cocci?

From: Markus Elfring <hidden>
Date: 2019-11-17 08:19:39

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.

Removing broken or ineffective rules would be very welcome.
I suggest to reconsider programming opportunities also by the means of
the semantic patch language.

Specifying disjunctions inline can make rules shorter, but harder to
understand due to mixing languages.  Perhaps this is a matter of
getting used to it, and syntax highlighting might help a bit.
I agree to this view.

Mixing in the unrelated xmalloc/ALLOC_ARRAY transformation does
not make sense to me, though.
I propose to increase the sharing (or reuse) of involved metavariables.

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?

Regards,
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help