From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Subject: Re: [cocci] Development challenges for handling of selected code repetitions (with SmPL)?
Date: Wed, 11 Dec 2024 14:20:30 +0100 [thread overview]
Message-ID: <6a2c2d16-3171-48ad-aad8-65b167352dcc@web.de> (raw)
In-Reply-To: <78704675-cc81-b635-6161-a2fb91d2b6d@inria.fr>
>> @adjustment@
>> expression call;
>> expression * pointer;
>> statement action;
>> @@
>> if (pointer)
>> +{
>> action
>> <+... when != puts("Hello");
>> call(pointer);
>> ...+>
>> +}
>
> As noted, there is nothing to attach the } to.
I suggest to reconsider the software situation a bit more.
> The ... goes to the end of
> the function unless there is the when.
I might be looking for other variations of indicated system functionality.
* May any statement combinations (also behind an if check) be converted to
a compound statement (by adding extra curly brackets)?
* Can the possible code repetition ever be expressed in better ways
besides the usage of the SmPL ellipses so far?
Regards,
Markus
next prev parent reply other threads:[~2024-12-11 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 12:20 [cocci] Development challenges for handling of selected code repetitions (with SmPL)? Markus Elfring
2024-12-11 13:05 ` Julia Lawall
2024-12-11 13:20 ` Markus Elfring [this message]
2024-12-12 12:30 ` 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=6a2c2d16-3171-48ad-aad8-65b167352dcc@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=julia.lawall@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 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.