Re: [Cocci] Adding code after function return types with SmPL

2019-10-08 Thread Markus Elfring
>> Will the addition of such an annotation in a function declaration >> become supported for the semantic patch language? > > Perhaps some day. The desired modification for a known preprocessor symbol like “__must_check” points software development challenges out. But the following SmPL script

Re: [Cocci] Adding code after function return types with SmPL

2019-10-07 Thread Julia Lawall
On Mon, 7 Oct 2019, Markus Elfring wrote: > Hello, > > I would like to try the following transformation approach out with > the software combination “Coccinelle 1.0.8-4-g842075f7”. > > @addition@ > identifier f; > type rt != void; > @@ > rt > +__must_check > f(...); > > >

[Cocci] Adding code after function return types with SmPL

2019-10-07 Thread Markus Elfring
Hello, I would like to try the following transformation approach out with the software combination “Coccinelle 1.0.8-4-g842075f7”. @addition@ identifier f; type rt != void; @@ rt +__must_check f(...); elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci use_must_check.cocci

[Cocci] Adding code after function return types with SmPL

2019-10-07 Thread Markus Elfring
Hello, I would like to try the following transformation approach out with the software combination “Coccinelle 1.0.8-4-g842075f7”. @addition@ identifier f; type rt != void; @@ rt +__must_check f(...); elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci use_must_check.cocci