[Cocci] Finding function implementations that call only a single function.

Julia Lawall julia.lawall at lip6.fr
Sun Dec 7 13:38:25 CET 2014


On Sun, 7 Dec 2014, SF Markus Elfring wrote:

> > If the return type has no impact on the match, it can be omitted.
> 
> Is another metavariable needed to filter on functions with a non-void
> return type?

I already explained how this should be done.  Match the functions that 
have a void return type, record their positions, and then match the 
functions at other positions.  The first set have void type, the second do 
not.

Of course, you can also tell from the returns, or lack there of, in the 
function whether the function has void return type as well.

julia

> 
> 
> >> When should a filter pattern on function implementations be adapted to
> >> the property that there will be a return value affected (or not)?
> > 
> > I don't understand the question.
> 
> It seems that I need to describe my small SmPL example with more
> drastic words. Would it introduce programming errrors in such an
> application of the semantic patch language?
> 
> Does it contain logical mistakes?
> 
> Regards,
> Markus
> 


More information about the Cocci mailing list