On Sun, 29 Nov 2020, Markus Elfring wrote: > > A rule for each of the functions you have in the big disjunction > > you have on the first line of your rule. > > I find that the size of such SmPL disjunctions can grow considerably. > > > > But it only helps in your case because in your C code, > > the first two lines have different function names. > > This would be usual for the C programming language. > Would you ever like to consider additional development challenges for C++ > where distinctions would be more relevant for data types on input parameters? I don't see any connection between your comment and what I said. I think that in both C and C++, people may call the same function on two subsequent lines. > > > >> Two changes should be performed in combination for a code replacement. > >> How should a separation help then? > >> > >> Can the shown change pattern be applied recursively? > > > > You can follow the example in demos/iteration.cocci. > > Does a corresponding information like “Modification is not allowed when using iteration.” > need further clarification for the discussed use case? > https://github.com/coccinelle/coccinelle/blob/730dbb034559b3e549ec0b2973cd0400a3fa072f/docs/manual/cocci_syntax.tex#L1999 If you use the argument --in-place, there is no restriction. julia