cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Remove entire multidecl
@ 2019-08-08 10:51 Christoph Böhmwalder
  2019-08-08 11:01 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Böhmwalder @ 2019-08-08 10:51 UTC (permalink / raw)
  To: cocci

So I've looked around in the demos/ and tests/ as well as the documentation,
but I can't seem to figure out what I'm doing wrong:

test.c
------
int x, y;


test.cocci
----------
@@
identifier x, y;
@@
- int x, y;


Should be pretty straightforward, but the rule does not match. Is there
another syntax to use here? In my real use case, I'm trying the same thing
within a function, and that doesn't match either.

Also, while playing around with it, I found this weird behaviour:

@@
identifier x, y;
@@
- int x;

Yields:

--- test.c
+++ /tmp/cocci-output-6916-8bc8e1-test.c
@@ -1 +1 @@
-int x, y;
+


Not exactly what I expected...

Thanks,
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

end of thread, other threads:[~2019-08-09  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 10:51 [Cocci] Remove entire multidecl Christoph Böhmwalder
2019-08-08 11:01 ` Julia Lawall
2019-08-09  6:33   ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).