Coccinelle archive on
 help / color / Atom feed
From: Markus Elfring <>
To: "Jérôme Glisse" <>
Subject: Re: [Cocci] Add code after local variable declarations?
Date: Wed, 17 Apr 2019 18:42:23 +0200
Message-ID: <> (raw)
In-Reply-To: <>

> No i want to add some code to _all_ function that have a specific
> structure as one of their argument. Thus i match on the function
> parameter list for the struct i am interested in

This source code search approach is generally fine.

> and then after all the declaration i add a code snippet.

Our programmer eyes are trained for pattern recognition according to
such a software transformation.

* How many efforts would you like to invest into the development
  for the automation of this refactoring (together with
  the semantic patch language)?

* Would you like to determine the source code positions between
  variable declaration (or definition) blocks and other statements safely?

* Will any additional constraints become relevant for this change attempt?

Cocci mailing list

      parent reply index

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
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     ` Markus Elfring [this message]

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Coccinelle archive on

Archives are clonable:
	git clone --mirror cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ \
	public-inbox-index cocci

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox