Is it me not understanding cocci grammar again?
Given these input and cocci script files:
Why isn't the show_test1 function transformed?
Why is only the show_test2 function transformed?
The only difference between the files is some
commented out lines with a for loop and if test.
$ cat test.c
s
> Is it me not understanding cocci grammar again?
You are also struggling with expressing your data processing needs
by the means of the semantic patch language.
You would like to rename three parameters for selected functions.
I imagine that an other transformation specification will be more app
On Sun, 30 Aug 2020, Markus Elfring wrote:
> > - T x@p;
> > + int len
> > <...
> > - x
> > + len
> > ...>
>
> How do you think about to use the following transformation variant?
This is uselessly expensive. It is already known that there is at least
one occurrence of x.
julia
>
> -T x@p
On Sun, 30 Aug 2020, Markus Elfring wrote:
> >> How do you think about to use the following transformation variant?
> >
> > This is uselessly expensive. It is already known that there is at least
> > one occurrence of x.
>
> Would we like to care if the affected identifier should be updated mo
On Sat, 29 Aug 2020, Joe Perches wrote:
> Is it me not understanding cocci grammar again?
The problem is the loop. You are trying to change something in the body
of a loop and the body of a for loop might not be executed. ... means
that the thing must be found on every execution path.
Do yo
On Sun, 2020-08-30 at 08:57 +0200, Julia Lawall wrote:
>
> On Sat, 29 Aug 2020, Joe Perches wrote:
>
> > Is it me not understanding cocci grammar again?
>
> The problem is the loop. You are trying to change something in the body
> of a loop and the body of a for loop might not be executed. ...
On Sun, 30 Aug 2020, Joe Perches wrote:
> On Sun, 2020-08-30 at 08:57 +0200, Julia Lawall wrote:
> >
> > On Sat, 29 Aug 2020, Joe Perches wrote:
> >
> > > Is it me not understanding cocci grammar again?
> >
> > The problem is the loop. You are trying to change something in the body
> > of a lo
On Sun, 2020-08-30 at 10:27 +0200, Julia Lawall wrote:
>
> On Sun, 30 Aug 2020, Joe Perches wrote:
>
> > On Sun, 2020-08-30 at 08:57 +0200, Julia Lawall wrote:
> > > On Sat, 29 Aug 2020, Joe Perches wrote:
> > >
> > > > Is it me not understanding cocci grammar again?
> > >
> > > The problem is
[...]
> Thanks, I used the slightly different from your suggestion
> where sysfs is an identifier with function args and a
> semicolon after the transform type, (otherwise I get cocci errors).
> like this below:
>
> But it doesn't work (no renaming) when there is an
> initializer to the variable t
On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote:
> [...]
>
> > Thanks, I used the slightly different from your suggestion
> > where sysfs is an identifier with function args and a
> > semicolon after the transform type, (otherwise I get cocci errors).
> > like this below:
> >
> > But it doe
On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote:
> The following:
>
> @not_int_not_len exists@
> type T != int;
> identifier x != len;
> position p;
> identifier sysfs =~ "^sysfs_emit.*$";
> assignment operator aop;
> @@
>
> T@p x;
> ...
> x aop sysfs(...)
>
> @@
> type not_int_not_len.T;
On Sun, 30 Aug 2020, Joe Perches wrote:
> On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote:
> > The following:
> >
> > @not_int_not_len exists@
> > type T != int;
> > identifier x != len;
> > position p;
> > identifier sysfs =~ "^sysfs_emit.*$";
> > assignment operator aop;
> > @@
> >
> >
On Wed, 2 Sep 2020, Joe Perches wrote:
> On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> > On Sun, 30 Aug 2020, Joe Perches wrote:
> > > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote:
> > > > Unfortunately this does not work when the declaration
> > > is comma terminated and no
On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> On Sun, 30 Aug 2020, Joe Perches wrote:
> > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote:
> > > Unfortunately this does not work when the declaration
> > is comma terminated and not semicolon terminated.
[]
> I will have to look into
On Wed, 2 Sep 2020, Joe Perches wrote:
> On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
> >
> > On Wed, 2 Sep 2020, Joe Perches wrote:
> >
> > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> > > > On Sun, 30 Aug 2020, Joe Perches wrote:
> > > > > On Sun, 2020-08-30 at 17:46 +
On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
>
> On Wed, 2 Sep 2020, Joe Perches wrote:
>
> > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> > > On Sun, 30 Aug 2020, Joe Perches wrote:
> > > > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote:
> > > > > Unfortunately this
On Wed, 2020-09-02 at 23:38 +0200, Julia Lawall wrote:
> On Wed, 2 Sep 2020, Joe Perches wrote:
> > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
> > > On Wed, 2 Sep 2020, Joe Perches wrote:
> > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> > > > > On Sun, 30 Aug 2020, Joe P
On Wed, 2 Sep 2020, Joe Perches wrote:
> On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
> >
> > On Wed, 2 Sep 2020, Joe Perches wrote:
> >
> > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> > > > On Sun, 30 Aug 2020, Joe Perches wrote:
> > > > > On Sun, 2020-08-30 at 17:46 +
On Thu, 3 Sep 2020, Joe Perches wrote:
> On Thu, 2020-09-03 at 17:14 +0200, Julia Lawall wrote:
> > On Wed, 2 Sep 2020, Joe Perches wrote:
> > > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
> > > > On Wed, 2 Sep 2020, Joe Perches wrote:
> > > > > On Sun, 2020-08-30 at 20:41 +0200, Jul
On Thu, 2020-09-03 at 17:14 +0200, Julia Lawall wrote:
> On Wed, 2 Sep 2020, Joe Perches wrote:
> > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
> > > On Wed, 2 Sep 2020, Joe Perches wrote:
> > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote:
> > > > > On Sun, 30 Aug 2020, Joe P
On Thu, 3 Sep 2020, Joe Perches wrote:
> On Thu, 2020-09-03 at 17:14 +0200, Julia Lawall wrote:
> > On Wed, 2 Sep 2020, Joe Perches wrote:
> > > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote:
> > > > On Wed, 2 Sep 2020, Joe Perches wrote:
> > > > > On Sun, 2020-08-30 at 20:41 +0200, Jul
21 matches
Mail list logo