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: Wellington Wallace <wellingtonwallace@gmail.com>,
	Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
Date: Tue, 4 Feb 2020 09:11:33 +0100	[thread overview]
Message-ID: <f0ccaf84-1b37-4936-3a7a-d5c11e3ef1c3@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2002032226260.3356@hadrien>

>> Do you distinguish between the storage class specifier
>> and other uses of such a key word?
>> https://en.cppreference.com/w/cpp/language/auto
>
> Sorry.  I know nothing about C++.

I guess that you know something also for this programming language
according to the program option “--c++”.
https://github.com/coccinelle/coccinelle/blob/0cece3639048dc7e81c4b2cc8f2a6f7a57fd546b/docs/spatch.1.in#L434
https://github.com/coccinelle/coccinelle/issues/1


> Auto seems to be supported

I am looking for further evolution around this software area.


> - I see it in both the C parser and the SmPL parser.

How would we like to handle corresponding development challenges?

@display@
expression X;
identifier I;
@@
*auto I = X(...);


elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci show_variable_definition_with_auto1.cocci
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
minus: parse error:
  File "show_variable_definition_with_auto1.cocci", line 5, column 6, charpos = 47
  around = 'I',
  whole content = *auto I = X(...);


Can such a source code search approach make sense also according to
the rules of the C programming language?

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

  reply	other threads:[~2020-02-04  8:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 20:45 [Cocci] Replacing a std::string check by strcmp() with SmPL Markus Elfring
2020-02-03 20:52 ` Julia Lawall
2020-02-03 21:13   ` Markus Elfring
2020-02-03 21:28     ` Julia Lawall
2020-02-04  8:11       ` Markus Elfring [this message]
2020-02-04  8:14         ` Julia Lawall
2020-02-04  8:39           ` Markus Elfring
2020-02-04 10:38           ` [Cocci] Replacing usages of “auto” with SmPL? Markus Elfring
2020-02-04 11:01             ` Julia Lawall
2020-02-04 11:45               ` Markus Elfring
2020-02-04 12:07                 ` Julia Lawall
2020-02-04 12:18                   ` Markus Elfring
2020-02-03 21:31     ` [Cocci] Replacing a std::string check by strcmp() with SmPL Julia Lawall
2020-02-04  8:19       ` Markus Elfring
2020-02-04 12:24   ` [Cocci] Searching for usage of “auto” with SmPL? Markus Elfring
2020-02-04 12:42     ` Julia Lawall
2020-02-04 12:52       ` Markus Elfring
2020-02-03 21:00 ` [Cocci] Replacing a std::string check by strcmp() with SmPL wellington wallace
2020-02-04 13:02   ` Markus Elfring
2020-02-04 13:19     ` Julia Lawall
2020-02-04 13:28       ` Markus Elfring
2020-02-04 13:47         ` Julia Lawall
2020-02-04 14:08           ` Markus Elfring
     [not found]             ` <alpine.DEB.2.21.2002041524400.3345@hadrien>
2020-02-04 14:42               ` [Cocci] Usage concerns around the SmPL construct “<+... … ...+>” 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=f0ccaf84-1b37-4936-3a7a-d5c11e3ef1c3@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@inria.fr \
    --cc=wellingtonwallace@gmail.com \
    /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).