public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH RFC] Coccinelle: Check for return not matching function signature
       [not found] <1430820761-28122-1-git-send-email-hofrat@osadl.org>
@ 2015-05-06  7:15 ` SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2015-05-06  7:15 UTC (permalink / raw)
  To: cocci

> +virtual context
> +virtual org
> +virtual report

Where do you want to reuse these variables in your SmPL scripts?


> +@match@
> +identifier f,ret;
> +position p;
> +type T1,T2;
> +@@
> +
> +T1 f(...) {
> + T2 ret;

Will it be more helpful to mark only such variable declarations
where the specified data type should be reconsidered
by a minus character or an asterisk (instead of the following
return statement)?

> +<+...
> +* return@p ret
> +;
> +...+>
> +}


Regards,
Markus


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-06  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1430820761-28122-1-git-send-email-hofrat@osadl.org>
2015-05-06  7:15 ` [PATCH RFC] Coccinelle: Check for return not matching function signature SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox