public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Subject: Re: [cocci] Reproducing a known patch with SmPL?
Date: Sun, 1 Mar 2026 17:51:20 +0100	[thread overview]
Message-ID: <ea0289b9-912d-449f-a348-e7744a92f238@web.de> (raw)
In-Reply-To: <349a12a9-f70d-4c8f-a730-9f8ec90b593f@web.de>

> * 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

  reply	other threads:[~2026-03-01 16:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 13:50 [cocci] Reproducing a known patch with SmPL? Markus Elfring
2026-03-01 16:51 ` Markus Elfring [this message]
2026-03-02 11:15 ` Markus Elfring
2026-03-07 10:15 ` [cocci] Reconsidering source code search challenges for nested compound statements Markus Elfring
2026-03-08 13:00   ` Markus Elfring
2026-03-08 13:24     ` Julia Lawall
2026-03-08 14:05       ` Markus Elfring
2026-03-08 14:55       ` Markus Elfring
2026-03-08 15:24         ` Julia Lawall
2026-03-08 16:08           ` Markus Elfring
2026-03-08 16:53             ` Julia Lawall
2026-03-08 17:35               ` Markus Elfring
2026-03-08 17:46                 ` Julia Lawall
2026-03-08 17:52                   ` Markus Elfring
2026-03-08 18:01                     ` Julia Lawall
2026-03-08 18:11                       ` Markus Elfring
2026-03-08 18:20                         ` Julia Lawall
2026-03-08 18:30                           ` Markus Elfring
2026-03-08 19:54                           ` Markus Elfring
2026-03-09  6:07                           ` [cocci] Too limited support for SmPL statement lists? Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea0289b9-912d-449f-a348-e7744a92f238@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox