Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: cocci@inria.fr
Subject: [cocci] scoped_guard
Date: Fri, 21 Mar 2025 12:50:47 +0100 (CET)	[thread overview]
Message-ID: <99c55fe9-b23f-a6c2-575-9a856a8a358c@inria.fr> (raw)

Coccinelle offers the "metavariable" type iterator for the names of things
that work like for or while.  That is, they represent the header of a
block and they cause a loop.

Now the Linux kernel has scoped_guard that represents the header of a
block, but isn't a loop.  So the name iterator is not suitable.  One
option would be to just make special cases for scoped_guard and
scoped_guard_cond, but other similar cases could come up over time.

Any suggestions about a possible metavariable kind for these names?  Maybe
just header and header name?

thanks,
julia

             reply	other threads:[~2025-03-21 11:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 11:50 Julia Lawall [this message]
2025-03-21 12:15 ` [cocci] Adjustments for “scoped_guard”? Markus Elfring
2025-03-21 12:46 ` [cocci] scoped_guard Håkon Løvdal
2025-03-21 12:54   ` Julia Lawall
2025-03-21 13:28   ` Markus Elfring
2025-03-21 13:37     ` Julia Lawall
2025-03-21 13:43       ` Markus Elfring
2025-03-21 14:00         ` Julia Lawall
2025-03-21 14:41 ` Markus Elfring
2025-03-21 14:45   ` Julia Lawall
2025-03-21 14:52     ` 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=99c55fe9-b23f-a6c2-575-9a856a8a358c@inria.fr \
    --to=julia.lawall@inria.fr \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).