> I am not sure if Coccinelle is able to filter the %fmt e.g: %s only called 
> with
> a parameter of specific data-type.

I would expect general support for such a task by the semantic patch language.


> Basically, I intend to replace alls "%s" called with "mydata->name" by "%m" 
> with "mydata" or "&mydata"

I find that this is a succinct description for your source code transformation 
goal.


The usage of the other SmPL code seems to indicate that your understanding
grew for the application of previously mentioned syntax elements in significant 
ways.
We will probably be more curious then how the data processing for SmPL ellipses
(triple dots) within format strings can become better together with a different
selection of metavariables for possible SmPL disjunctions.

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to