From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Subject: Re: [cocci] Reducing parentheses (with SmPL)?
Date: Tue, 22 Jul 2025 09:33:35 +0200 [thread overview]
Message-ID: <8c949c3e-cb28-42f4-9db6-e4e81231236e@web.de> (raw)
In-Reply-To: <2914d20-68da-a23d-6345-fd48f0b9bed8@inria.fr>
>> Can you recognise development concerns better from another SmPL code variant?
>>
>>
>> @adjustment@
>> expression e;
>> statement s;
>> @@
>> -if
>> +my_result =
>> (e)
>> +&& true;
>> - s
> And what is the problem?
It is supported (to some degree by the means of the semantic patch language)
to construct expressions for the usage within SmPL plus slice specifications.
Developers can generally apply the design choice to use additional parentheses then.
Some properties might be even unknown so far according to metavariable instances
of the type “expression”.
Programming interfaces can be extended accordingly.
> If you don't want the parentheses around e, then remove them.
There is a desire to avoid extra parentheses in the generated diff output.
If such difference displays should be accepted as patches for known code bases,
it would probably be more helpful if they could adhere better to coding
style preferences.
Regards,
Markus
next prev parent reply other threads:[~2025-07-22 7:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-19 12:04 [cocci] Reducing parentheses (with SmPL)? Markus Elfring
2025-07-19 19:16 ` Julia Lawall
2025-07-20 7:21 ` Markus Elfring
2025-07-20 14:10 ` Julia Lawall
2025-07-20 18:08 ` Markus Elfring
2025-07-21 5:30 ` Markus Elfring
2025-07-21 5:48 ` Julia Lawall
2025-07-21 6:30 ` Markus Elfring
2025-07-21 6:46 ` Julia Lawall
2025-07-21 6:58 ` Markus Elfring
2025-07-21 7:45 ` Julia Lawall
2025-07-21 7:55 ` Markus Elfring
2025-07-21 7:58 ` Julia Lawall
2025-07-21 8:10 ` Markus Elfring
2025-07-21 8:23 ` Julia Lawall
2025-07-21 8:45 ` Markus Elfring
2025-07-21 9:51 ` Markus Elfring
2025-07-21 11:00 ` Julia Lawall
2025-07-21 11:21 ` Markus Elfring
2025-07-21 11:54 ` Julia Lawall
2025-07-21 12:14 ` Markus Elfring
2025-07-22 6:21 ` Markus Elfring
2025-07-22 7:33 ` Markus Elfring [this message]
[not found] ` <479a2492-62de-2b9d-4899-4d4f35f653e9@inria.fr>
2025-07-22 11:10 ` Markus Elfring
2025-07-22 11:12 ` Julia Lawall
2025-07-22 11:26 ` 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=8c949c3e-cb28-42f4-9db6-e4e81231236e@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.