All of lore.kernel.org
 help / color / mirror / Atom feed
* [cocci] Improving support for unary operators with SmPL?
@ 2026-09-05 14:38 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2026-09-05 14:38 UTC (permalink / raw)
  To: cocci

Hello,

Unary operators were mentioned in the manual for the semantic patch language
since a contribution by Corentin De Souza on 2020-04-02.

metadec: define them properly
https://gitlab.inria.fr/coccinelle/coccinelle/-/commit/013a81ad21ed2caf4bc5c46753828cefec4e60d5
https://github.com/coccinelle/coccinelle/commit/013a81ad21ed2caf4bc5c46753828cefec4e60d5


Thus I wonder again why an SmPL script variant (like the following) does not get accepted
also by the software combination “Coccinelle 1.3.3” so far.

@deletion@
expression x;
unary operator uo = { - };
@@
-uo
 x


Questionable test result:
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci suggestion_for_Stefan_Winter-20250402.cocci
…
meta: parse error: 
  File "suggestion_for_Stefan_Winter-20250402.cocci", line 3, column 0, charpos = 25
  around = 'unary',
  whole content = unary operator uo = { - };


Regards,
Markus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-05 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-05 14:38 [cocci] Improving support for unary operators with SmPL? Markus Elfring

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.