Coccinelle archive on lore.kernel.org
 help / color / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Using SmPL scripts to mangle function arguments
Date: Sun, 17 May 2020 11:45:32 +0200 (CEST)
Message-ID: <alpine.DEB.2.21.2005171144210.2822@hadrien> (raw)
In-Reply-To: <24b3f013-21e4-99e8-5366-cfc944077cc2@web.de>


[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

> > @@
> > expression O1, O2, O3
> > @@
> >
> > - func_old(O1, O2, O3, ...);
>
> Can it be that the item “charstring” would contain multiple expressions?
>
> If you would like to reuse the last function parameters,
> the passed code should be stored into corresponding metavariables
> of a type like “constant” or “expression list”.


Making O3 an expression list could be useful.  Or you can just put the
part that doesn't change on a shared line with no - or + annotation.

julia

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

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

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17  9:22 Markus Elfring
2020-05-17  9:45 ` Julia Lawall [this message]
2020-05-26  1:21 ` Thomas Adam
2020-05-26  6:00   ` Markus Elfring
2020-05-26  6:41   ` Julia Lawall
2020-05-27 14:21   ` Markus Elfring
2020-05-26 11:23 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=alpine.DEB.2.21.2005171144210.2822@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.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

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 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/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git