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 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, 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
[...]
> 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
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
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
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
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
> 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
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 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
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
12 matches
Mail list logo