cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Searching for functions with non-internal linkage
Date: Mon, 21 Sep 2020 16:27:02 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2009211626370.2630@hadrien> (raw)
In-Reply-To: <12c105f8-80e3-b47d-3bc5-141d6011fe89@web.de>

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]



On Mon, 21 Sep 2020, Markus Elfring wrote:

> >>> That is, in the third rule, if you remove the depends on and add disable
> >>> optional_qualifier, then it would not match a static function.
> >>
> >> Would such a setting be better than the dependency check according to
> >> the SmPL rule “find_static”?
> >
> > Optional_storage is indeed probably the right one.
>
> The following SmPL script variant seems to work as expected then.
>
> @find disable optional_storage@
> identifier i;
> type t;
> @@
> (
> *t i(...)
>  { ... }
> |
> *extern t i(...)
>  { ... }
> )
>
>
> Can another SmPL script variant become similarly useful?
>
> @find2 disable optional_storage@
> identifier i;
> type t;
> @@
> (
> *t
> |
> *extern t
> )
> *i(...)
>  { ... }

I doubt that this parses.  I don't think extern t is considered to be a
type.

julia

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  parent reply	other threads:[~2020-09-21 14:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 12:32 [Cocci] Searching for functions with non-internal linkage Markus Elfring
2020-09-21 13:22 ` Julia Lawall
     [not found]   ` <38815e95-833b-e2fd-4630-8ae7cfe54aa7@web.de>
2020-09-21 13:48     ` Julia Lawall
     [not found]       ` <12c105f8-80e3-b47d-3bc5-141d6011fe89@web.de>
2020-09-21 14:27         ` Julia Lawall [this message]
     [not found]           ` <6746e72b-ad50-7b03-f059-8e22e21d32c9@web.de>
2020-09-22  9:29             ` Julia Lawall
     [not found]           ` <1367af30-cbff-dd2d-f17d-5b9464fad359@web.de>
2020-09-22 10:28             ` [Cocci] Searching for functions with linkage specifications Julia Lawall
     [not found]               ` <cf0e8aa0-67f0-966c-4fa4-6942331069a6@web.de>
2020-09-22 12:37                 ` Julia Lawall
     [not found]                   ` <eaacd91c-4752-2031-266f-243557dd0f72@web.de>
2020-09-22 12:54                     ` Julia Lawall
     [not found]                       ` <245d6cf2-438b-ed0c-ac60-d5448b408cb2@web.de>
2020-09-22 13:14                         ` Julia Lawall
     [not found]                           ` <3bae0270-a34a-9133-daaf-8be0de0bbcbb@web.de>
2020-09-22 19:33                             ` Julia Lawall

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=alpine.DEB.2.22.394.2009211626370.2630@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --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;
as well as URLs for NNTP newsgroup(s).