cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* Re: [Cocci] [PATCH v2 0/3] cocci: Improve management of macros before typedefs
@ 2020-01-21  9:56 Markus Elfring
  2020-01-21 10:43 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2020-01-21  9:56 UTC (permalink / raw)
  To: Jaskaran Singh, cocci; +Cc: linux-kernel-mentees

> If <typedef> is a known typedef (such as u8 or *_t) then label <macro>
> as a CppMacro. Subsequent cases will label <typedef> correctly as a
> typedef ident.
>
> Also add bool to the list of known typedefs so that cases of

Can a wording like the following be nicer for such a change description?

  Label <macro> as a CppMacro if <typedef> is a known type definition
  (such as u8 or *_t).
  Subsequent cases will label <typedef> correctly as a type definition identifier.

  Add bool also to the list of known type definition identifiers so that cases of


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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Cocci] [PATCH v2 0/3] cocci: Improve management of macros before typedefs
@ 2020-01-21  8:04 Jaskaran Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Jaskaran Singh @ 2020-01-21  8:04 UTC (permalink / raw)
  To: cocci; +Cc: linux-kernel-mentees

This patch series is for improving the management of the following
case:

<macro> <typedef> <ident>

If <typedef> is a known typedef (such as u8 or *_t) then label <macro>
as a CppMacro. Subsequent cases will label <typedef> correctly as a
typedef ident.

Also add bool to the list of known typedefs so that cases of

<macro> bool <ident>

are handled correctly just like any known typedef will be.

Changes in v2:
--------------
- Group these patches as a series for clarity
- Add a test case for <macro> bool <ident> (Patch 3/3)
- Explain what has been improved with Patch 2/3

 parsing_c/parsing_hacks.ml    |   37 ++++++++++++++++++++++++++++++++++++-
 tests/macro_before_bool.c     |    4 ++++
 tests/macro_before_bool.cocci |    9 +++++++++
 tests/macro_before_bool.res   |    5 +++++
 4 files changed, 54 insertions(+), 1 deletion(-)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-21 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  9:56 [Cocci] [PATCH v2 0/3] cocci: Improve management of macros before typedefs Markus Elfring
2020-01-21 10:43 ` Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2020-01-21  8:04 Jaskaran Singh

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).