The following are some of the reasons why a .cocci script fails to match the expected source code constructs:
The source contains a syntax error. For instance, if a function definition contains a syntax error the contents of that function might be ignored when matching. The
parse_c option can be used to check whether any syntax errors were encountered in the source.
There is a fault in Coccinelle. Complain to the developers:
cocci@diku.dk