Coccinelle archive on lore.kernel.org
 help / color / Atom feed
* [Cocci] How to concatenate identifier with text?
@ 2019-05-24 19:13 Timur Tabi
  2019-05-24 19:36 ` Timur Tabi
  2019-05-24 19:38 ` Julia Lawall
  0 siblings, 2 replies; 8+ messages in thread
From: Timur Tabi @ 2019-05-24 19:13 UTC (permalink / raw)
  To: cocci

@@
identifier func;
@@
func(...) {
<+...
     .... stuff
+   goto func_exit;
+}
...+>
}

So if I have this code:

void myfunc(int x)
{
}

I want it to look like this:

void myfunc(int x)
{
    goto myfunc_exit;
}

My problem is that cocci takes "func_exit" literally.  I tried
func##_exit, but that didn't work.  How do I make this work?
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 19:13 [Cocci] How to concatenate identifier with text? Timur Tabi
2019-05-24 19:36 ` Timur Tabi
2019-05-24 19:38   ` Julia Lawall
2019-06-11 21:51     ` Timur Tabi
2019-06-11 21:58       ` Timur Tabi
2019-06-12  7:12         ` [Cocci] Wider usage of “fresh identifiers”? Markus Elfring
2019-06-12  5:25       ` [Cocci] How to concatenate identifier with text? Julia Lawall
2019-05-24 19:38 ` Julia Lawall

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 cocci@archiver.kernel.org
	public-inbox-index cocci


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