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] Distinguishing pointer data types with SmPL
Date: Wed, 17 Dec 2014 21:30:05 +0100	[thread overview]
Message-ID: <5491E7CD.3070207@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1412172019440.2523@hadrien>

>> * Which is the best way to distinguish non-pointer types from pointer data types
>>   with metavariables?
> 
> If you do the following:
> 
> @@
> expression * e1;
> expression e2;
> @@
> 
> (
> e1
> |
> e2
> )
> 
> Then e2 should match the non-pointer type expressions.

Is it relevant if you use "expression" or "type" here?


I guess that my previous use case was a bit different because the pointer
distinction was distributed over function parameters in separate SmPL rules.

I got the impression that a single metavariable with the SmPL type "type"
might be insufficient for a selection if the asterisk is omitted there.
Does the filter approach need to be disambiguated with additional criteria
like variable constraints or a part from the function implementation?

Regards,
Markus

      reply	other threads:[~2014-12-17 20:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28 22:33 [Cocci] Finding function implementations that call only a single function SF Markus Elfring
     [not found] ` <alpine.DEB.2.02.1412032218310.2303@localhost6.localdomain6>
     [not found]   ` <547F8C2B.5090601@users.sourceforge.net>
     [not found]     ` <alpine.DEB.2.02.1412032334330.2303@localhost6.localdomain6>
2014-12-05 14:20       ` SF Markus Elfring
     [not found]         ` <alpine.DEB.2.10.1412051633240.2360@hadrien>
2014-12-05 20:05           ` SF Markus Elfring
     [not found]             ` <54834F76.1090104@users.sourceforge.net>
     [not found]               ` <alpine.DEB.2.10.1412061955440.2042@hadrien>
     [not found]                 ` <548358DE.6020409@users.sourceforge.net>
     [not found]                   ` <alpine.DEB.2.02.1412062139570.2256@localhost6.localdomain6>
     [not found]                     ` <548371FB.9060402@users.sourceforge.net>
     [not found]                       ` <alpine.DEB.2.02.1412062219530.2256@localhost6.localdomain6>
     [not found]                         ` <54837413.8000902@users.sourceforge.net>
     [not found]                           ` <alpine.DEB.2.02.1412062232470.2256@localhost6.localdomain6>
     [not found]                             ` <5483806D.3070805@users.sourceforge.net>
     [not found]                               ` <alpine.DEB.2.02.1412062342540.2256@localhost6.localdomain6>
     [not found]                                 ` <5483902E.8060109@users.sourceforge.net>
     [not found]                                   ` <alpine.DEB.2.02.1412070749130.2044@localhost6.localdomain6>
2014-12-07  9:15                                     ` SF Markus Elfring
2014-12-07  9:31                                       ` Julia Lawall
2014-12-07 10:22                                         ` SF Markus Elfring
2014-12-07 10:28                                           ` Julia Lawall
2014-12-07 10:37                                             ` SF Markus Elfring
2014-12-07 11:45                                               ` Julia Lawall
2014-12-07 12:00                                                 ` SF Markus Elfring
2014-12-07 12:38                                                   ` Julia Lawall
2014-12-07 14:41                                                     ` SF Markus Elfring
2014-12-17 15:30                                                       ` SF Markus Elfring
2014-12-17 19:20                                                         ` Julia Lawall
2014-12-17 20:30                                                           ` SF Markus Elfring [this message]

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=5491E7CD.3070207@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