Re: [cocci] Reproducing a known patch with SmPL?

Markus Elfring <[email protected]> Sun, 1 Mar 2026 17:51:20 +0100
Newsgroups fr.inria.cocci
Message-ID <[email protected]>
> * How should the data processing be improved in more desirable ways?

The following SmPL script variant seems to work as expected.


@movement exists@
expression action, context, last_action;
expression list el;
identifier member, rc;
@@
 {
 ...
+   last_action(el);
    rc = context->member;
+target:
    action(context);
-   last_action(el);
    return rc;
 }


How should related if branches be adjusted on demand here?

Regards,
Markus