* [Cocci] expression list[n] el and ...
@ 2015-07-25 13:00 Peter Senna Tschudin
2015-07-25 14:35 ` Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Peter Senna Tschudin @ 2015-07-25 13:00 UTC (permalink / raw)
To: cocci
This works fine:
@r1@
identifier i;
position p;
expression list[n] el;
@@
i at p(el)
@script:python@
p << r1.p;
i << r1.i;
n << r1.n;
@@
print "f," + i + "," + n + "," + p[0].file
But if I change:
i at p(el)
to
i@p(el, ...)
Then I get multiple matches for each function call: One match for each
parameter. I don't need the ..., but it was there on my first version,
so I'm reporting in case this is not a feature.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cocci] expression list[n] el and ...
2015-07-25 13:00 [Cocci] expression list[n] el and Peter Senna Tschudin
@ 2015-07-25 14:35 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-07-25 14:35 UTC (permalink / raw)
To: cocci
On Sat, 25 Jul 2015, Peter Senna Tschudin wrote:
> This works fine:
>
> @r1@
> identifier i;
> position p;
> expression list[n] el;
> @@
> i at p(el)
>
> @script:python@
> p << r1.p;
> i << r1.i;
> n << r1.n;
> @@
> print "f," + i + "," + n + "," + p[0].file
>
> But if I change:
>
> i at p(el)
>
> to
>
> i at p(el, ...)
>
> Then I get multiple matches for each function call: One match for each
> parameter. I don't need the ..., but it was there on my first version,
> so I'm reporting in case this is not a feature.
It's completely normal. A priori, it doesn't know how long the list
should be, so it reports all possibilities.
julia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-25 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-25 13:00 [Cocci] expression list[n] el and Peter Senna Tschudin
2015-07-25 14:35 ` Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.