Re: [RFC PATCH] coccinelle: misc: add uninitialized_var.cocci script

From: Julia Lawall
Date: Wed Aug 12 2020 - 05:27:48 EST




On Wed, 12 Aug 2020, Markus Elfring wrote:

> > +@r@
> > +identifier var;
> > +type T;
> > +position p;
> > +@@
> > +
> > +(
> > +* T var@p = var;
> > +|
> > +* T var@p = *(&(var));
>
> I suggest to simplify such code for the semantic patch language a bit.
> Can an other variant be more succinct for the application of a SmPL disjunction?
>
> +*T var@p = \( var \| *(&(var)) \);

It's fine as is.

julia