blah.c:<p><pre><code> void foo(item *x)
{
x->blah(1, 2, 3);
x->blah (4, 5,
6);
blah (7, 5, 1);
foo (4, 5, 6);
x->blah (4,
5, 6);
}
void foo2(item y, item *x)
{
y.blah(1, 2, 3);
y.blah (4, 5,
6);
blah (7, 5, 1);
foo (4, 5, 6);
x->blah (4,
5, 6);
}
</code></pre>
search in blah.c for a call to <i>blah()</i> with <i>5</i> as 2nd argument from any structure or pointer.<p><pre><code> cgrep --code --semantic '_1 . OR -> blah ( _2 , 5, _3 )' blah.c
</code></pre>
output:<p><pre><code> blah.c:6: x->blah (4, 5,
blah.c:7: 6);
blah.c:10: x->blah (4,
blah.c:11: 5, 6);
blah.c:18: y.blah (4, 5,
blah.c:19: 6);
blah.c:22: x->blah (4,
blah.c:23: 5, 6);</code></pre>