Coccinelle Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Support for SmPL ellipsis in logical expressions?
Date: Mon, 29 Dec 2014 14:08:45 +0100	[thread overview]
Message-ID: <54A1525D.3040009@users.sourceforge.net> (raw)

Dear Julia,

I have tried the following semantic filter approach out.

@safety_check_with_pointer@
identifier input, member, process, work;
statement is, es;
type input_type, return_type;
@@
 return_type work(input_type * input)
 {
  ... when any
(
* if (!input)
     return ... ;
|
* if (unlikely(ZERO_OR_NULL_PTR(input)))
     return ... ;
|
* if (!input || ... process(& input->member) ... )
     return ... ;
|
* if (input && ... process(& input->member) ... )
     is
  else
     es
)
  ... when any
 }

elfring at Sonne:~/Projekte/Coccinelle/janitor> spatch.opt -sp-file show_input_parameter_validation7.cocci ~/Projekte/Linux/next-patched/fs/kernfs/dir.c
init_defs_builtins: /usr/local/share/coccinelle/standard.h
293 300
Fatal error: exception Failure("minus: parse error: \n = File \"show_input_parameter_validation7.cocci\", line 16, column 20,  charpos = 293\n    around = 'process', whole content = * if (!input || ... process(& input->member) ... )\n")


Does the Coccinelle software not like my placement of the SmPL ellipsis within a condition specification?

Regards,
Markus

             reply	other threads:[~2014-12-29 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 13:08 SF Markus Elfring [this message]
     [not found] ` <alpine.DEB.2.10.1412291422340.2558@hadrien>
2014-12-29 13:41   ` [Cocci] Support for SmPL ellipsis in logical expressions? SF 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=54A1525D.3040009@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox