Coccinelle archive on
 help / color / Atom feed
From: Markus Elfring <>
To: Coccinelle <>
Subject: [Cocci] Searching for last two statements in code blocks
Date: Thu, 18 Apr 2019 12:00:37 +0200
Message-ID: <> (raw)
In-Reply-To: <>


I have tried another small SmPL script out.

identifier work;
statement s1, s2;
type T;
 T work(...)
 ... when any
 ... when any
 ... when any

I have observed that no statements were shown from if branches
in my test source file.
This happened then after the addition of the SmPL specification “if (...)”
before an opening curly bracket in this analysis approach.
Now I am curious if compound statements can be handled also without
the addition of a SmPL disjunction for known C key words.
Can extra code be treated as optional by default there?

Cocci mailing list

  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12  9:42 [Cocci] Checking the “display” of " Markus Elfring
2019-04-12  9:45 ` Julia Lawall
2019-04-12 10:28   ` Markus Elfring
2019-04-12 10:32     ` Julia Lawall
2019-04-12 10:42       ` [Cocci] Clarification for SmPL asterisk functionality Markus Elfring
2019-04-18 10:00 ` Markus Elfring [this message]
2019-04-19 12:14 ` [Cocci] Checking the search for duplicate statements at the end of if branches Markus Elfring
2019-04-20  7:30   ` [Cocci] Checking execution environment for Python code in SmPL scripts Markus Elfring
2019-04-20  7:35     ` Julia Lawall
2019-04-20  7:51       ` Markus Elfring
2019-04-20  8:05         ` Julia Lawall
2019-04-20  8:11           ` Markus Elfring

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Coccinelle archive on

Archives are clonable:
	git clone --mirror cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ \
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox