All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Patching nested if's?
Date: Tue, 31 Mar 2015 15:15:25 +0200	[thread overview]
Message-ID: <551A9DED.3050604@users.sourceforge.net> (raw)
In-Reply-To: <CABE47THmL74Gy62cmGE+=V5bF6gqUP4qUPkKLxijcSbbrW4smQ@mail.gmail.com>

> I've been able so far to replace the if (t <MAXR) but this
> also replaces lines with it (expresion < constant) elsewhere.

Would you like to consider any additional SmPL constraints?


> Which is why I'd like to constrain the pacth to this 3 nested
> ifs pattern.

Do you really want to deal only with a specific nesting level?


>        if (
> -       t < M
> +          myfunc()

How do you think about to add also " == 0" here?


>           )
>           {
>       ...
>       } else {
>       ...
>       }

Would you like to replace these ellipsis by metavariables
of the type "statement"?

Regards,
Markus

  reply	other threads:[~2015-03-31 13:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 12:56 [Cocci] Patching nested if's? François Armand
2015-03-31 13:15 ` SF Markus Elfring [this message]
2015-03-31 13:47 ` Julia Lawall
2015-03-31 15:18   ` François Armand
2015-03-31 15:49     ` Julia Lawall
2015-03-31 16:06       ` François Armand
2015-03-31 16:11         ` Julia Lawall
2015-03-31 16:12           ` François Armand

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=551A9DED.3050604@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=cocci@systeme.lip6.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.