Hi all,
I want to write a script to match a pattern of conditional statement.
However, I find that I can only match the first "if" in the block.
The script is like this:
fn(...) {
...
- f(arg1, arg2, arg3)
...
}
where f returns the condition check result.

But when I apply to source code like this:
if (f(a1, a2, a3)) {
...
} else if (f(a4, a5, a6)) {
...
}
I find it can only match f(a1, a2, a3).
So how to fix this problem?

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

Reply via email to