cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Chuhong Yuan <hslester96@gmail.com>, cocci@systeme.lip6.fr
Subject: Re: [Cocci] How to match function calls in macros?
Date: Tue, 19 May 2020 13:43:17 +0200	[thread overview]
Message-ID: <9b764738-8c6d-b066-925e-03d26c5ed063@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2005191321270.2503@hadrien>

>> With which SmPL constructs should be ensured that a search pattern
>> like “<+... f(...) ...+>” refers only to content from the same logical source line?
>> https://en.cppreference.com/w/c/language/translation_phases#Phase_2
>
> Please stop asking the same question over and over.

I hope that the expected and actually supported software functionality
will become clearer.


> In the context of a macro definition, <+... f(...) ...+> will only match
> what is from the same logical source line.

Does the functionality of the SmPL nest construct change according to
previous source code?

Are there more aspects to consider for the safe handling of physical source lines?


> Because that is all that there is in a macro definition.

We hope so also according to the initial clarification request for this issue.


> If Coccinelle is working on a macro definition, it works only on that macro definition.

Such an expectation can eventually be fine.

Did I overlook any information for this detail in the software documentation so far?
https://github.com/coccinelle/coccinelle/blob/7cf2c23e64066d5249a64a316cc5347831f7a63f/docs/manual/cocci_syntax.tex#L1736


> If it is working on a function definition, it works only on that function definition.

Does the position of the define directive influence this view?

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

  reply	other threads:[~2020-05-19 11:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  8:26 [Cocci] How to match function calls in macros? Markus Elfring
2020-05-18  9:19 ` Julia Lawall
2020-05-18 10:13   ` Markus Elfring
2020-05-18 10:18     ` Julia Lawall
2020-05-18 10:30       ` Markus Elfring
2020-05-18 10:34         ` Julia Lawall
2020-05-18 10:46           ` Markus Elfring
2020-05-18 10:50             ` Julia Lawall
2020-05-18 11:07               ` Markus Elfring
2020-05-19 11:15               ` Markus Elfring
2020-05-19 11:23                 ` Julia Lawall
2020-05-19 11:43                   ` Markus Elfring [this message]
2020-05-19 11:55                     ` Julia Lawall
2020-05-19 12:04                       ` Markus Elfring
2020-05-18 12:07       ` Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2020-05-16 11:42 Markus Elfring
2020-05-16  8:16 Chuhong Yuan
2020-05-16  8:49 ` Julia Lawall
2020-05-16 12:26   ` Chuhong Yuan
2020-05-16 12:45     ` Julia Lawall
2020-05-16 14:17       ` Chuhong Yuan

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=9b764738-8c6d-b066-925e-03d26c5ed063@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=hslester96@gmail.com \
    --cc=julia.lawall@inria.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).