All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Add code after local variable declarations?
Date: Wed, 17 Apr 2019 11:42:12 +0200	[thread overview]
Message-ID: <779805f3-cf62-a39e-09ed-3596ed38358e@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.1904171111410.2612@hadrien>

>> Would you like to add any source code only after a variable declaration
>
> Coccinelle doesn't allow this.  It has no way of knowing whether other
> declarations come afterwards,

I suggest to reconsider this quick response.
Are there approximations supported for such a source code search approach?


> and in the Linux kernel it is not allowed to mix statements and declarations.

There are adjustments possible for the desired scopes, aren't there?


>> (or definition) block?

Which details will become more interesting for corresponding
transformation patterns?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-04-17  9:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 22:11 [Cocci] Add code after local variable declarations ? Jerome Glisse
2019-04-17  5:14 ` Julia Lawall
2019-04-17  9:10   ` [Cocci] Add code after local variable declarations? Markus Elfring
2019-04-17  9:12     ` Julia Lawall
2019-04-17  9:42       ` Markus Elfring [this message]
2019-04-17  9:42       ` Markus Elfring
2019-04-17 14:14   ` [Cocci] Add code after local variable declarations ? Jerome Glisse
2019-04-17 14:32     ` Julia Lawall
2019-04-17 16:42     ` [Cocci] Add code after local variable declarations? Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=779805f3-cf62-a39e-09ed-3596ed38358e@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.