All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Adding parameter to function if missing
Date: Thu, 7 Jul 2016 18:14:43 +0200	[thread overview]
Message-ID: <66d3ac21-174b-dbf1-7c92-6b1f4f691968@users.sourceforge.net> (raw)
In-Reply-To: <924f7230d5074b14b8658f65e00de85a@vprd-opci0018.b-com.local>

> I was confusing between the type name 'my_type' and type value 'my_type'.
> 
> What I would to do is something like that :
> 
> @fn_with_user@
> identifier fn, foo;
> typedef T = "my_type"; // '= ...' is not correct

Does such a specification indicate that you want to make a detail
better configurable?


> parameter list pl;
> @@
> 
> fn(T *foo, pl) {
> <+...
> bar(...);
> ...+>
> }
> 
> But I don't know how to link 'my_type' value to type T ...

Do you imagine to apply another parameter?

Is the functionality around "virtual" in the semantic patch language
relevant here?
http://coccinelle.lip6.fr/docs/main_grammar001.html


> I am sure that I am missing something obvious there :(

I hope that a better understanding can be achieved for special aspects
of your use case.

Regards,
Markus

  reply	other threads:[~2016-07-07 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 13:54 [Cocci] Adding missing parameter to function if missing Frédéric LEROY (ext)
2016-07-06 16:23 ` Julia Lawall
2016-07-07 12:18   ` Frédéric LEROY (ext)
2016-07-07 16:14     ` SF Markus Elfring [this message]
2016-07-08 10:46       ` [Cocci] Adding " Frédéric LEROY (ext)
2016-07-07 17:09     ` [Cocci] Adding missing " Julia Lawall
2016-07-06 16:50 ` [Cocci] Adding " SF Markus Elfring
2016-07-07 11:54   ` Frédéric LEROY (ext)
2016-07-07 15:43     ` SF 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=66d3ac21-174b-dbf1-7c92-6b1f4f691968@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --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
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.