cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Checking size determinations with SmPL
@ 2019-11-17 11:47 Markus Elfring
  2019-11-17 12:21 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2019-11-17 11:47 UTC (permalink / raw)
  To: Coccinelle

Hello,

The following code example gets accepted by the Coccinelle software.

@display1@
expression* e;
type t;
@@
*\( sizeof(t) \| sizeof(*e) \)


Would it be nice if another script variant can work together with
such a SmPL disjunction also in this way?

@display2@
expression* e;
type t;
@@
*sizeof( \( t \| *e \) )


elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci check_sizeof2.cocci
…
minus: parse error:
  File "check_sizeof2.cocci", line 5, column 17, charpos = 54
  around = '*',
  whole content = *sizeof( \( t \| *e \) )


Regards,
Markus
_______________________________________________
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-11-17 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 11:47 [Cocci] Checking size determinations with SmPL Markus Elfring
2019-11-17 12:21 ` Julia Lawall
2019-11-17 14:46   ` 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).