In certain cases, there is no space added after the Pointer type.
Examples of such cases are * const, * __attr and * const *.
In the Pointer case of pp_type_with_ident_rest and pp_type_left, if
the * is followed by anything within the type, add a space after the
printing.
Signed-off-by: Jaskaran
On Wed, 15 Jan 2020, Oleg Nesterov wrote:
> On 01/15, Julia Lawall wrote:
> >
> > On Wed, 15 Jan 2020, Oleg Nesterov wrote:
> >
> > > $ spatch --sp-file test.cocci test.c
> > >
> > > (ONCE) Expected tokens mem TTT
> > > Skipping: test.c
> > >
> > > I tried to play with various --.*include.*
On 01/15, Julia Lawall wrote:
>
> On Wed, 15 Jan 2020, Oleg Nesterov wrote:
>
> > $ spatch --sp-file test.cocci test.c
> >
> > (ONCE) Expected tokens mem TTT
> > Skipping: test.c
> >
> > I tried to play with various --.*include.* options, but nothing seems to
> > work
> > unless I add "inc
On Wed, 15 Jan 2020, Oleg Nesterov wrote:
> On 01/15, Oleg Nesterov wrote:
> >
> > Another question...
>
> Oh, and another one ;)
>
> http://coccinelle.lip6.fr/docs/main_grammar006.html mentions
> "typeof(expr/ctype)", but I failed to find any doc/example of
> how can it be used in SPL.
>
> Cou
On 01/15, Oleg Nesterov wrote:
>
> Another question...
Oh, and another one ;)
http://coccinelle.lip6.fr/docs/main_grammar006.html mentions
"typeof(expr/ctype)", but I failed to find any doc/example of
how can it be used in SPL.
Could you explain it?
Oleg.
__
On Wed, 15 Jan 2020, Oleg Nesterov wrote:
> On 01/15, Julia Lawall wrote:
> >
> > Yes, it doesn't currently understand typeof. If it's a big problem, it
> > should be easy to fix.
>
> OK, thanks Julia.
>
> Another question...
>
> inc.h:
>
> struct TTT { int mem; } *ptr;
>
> test.c:
>
>
On 01/15, Julia Lawall wrote:
>
> Yes, it doesn't currently understand typeof. If it's a big problem, it
> should be easy to fix.
OK, thanks Julia.
Another question...
inc.h:
struct TTT { int mem; } *ptr;
test.c:
#include "inc.h"
void func(void)
{
On Wed, 15 Jan 2020, Oleg Nesterov wrote:
> Hello,
>
> trivial example:
>
> @r@
> int x;
> @@
>
> * x = 0;
>
> C code:
>
> void f(void)
> {
> int a;
> __typeof__(a) b;
>
> a = 0; // this matches
>
Hello,
trivial example:
@r@
int x;
@@
* x = 0;
C code:
void f(void)
{
int a;
__typeof__(a) b;
a = 0; // this matches
b = 0; // this doesn't
}
is it correc