cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] [PATCH v2 0/3] cocci: Improve management of macros before typedefs
@ 2020-01-21  8:04 Jaskaran Singh
  2020-01-21  8:04 ` [Cocci] [PATCH v2 1/3] parsing_c: Handle case of macro before typedef Jaskaran Singh
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ 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] 10+ messages in thread
* Re: [Cocci] [PATCH v2 3/3] tests: Add test case for <macro> bool <ident>
@ 2020-01-21 10:22 Markus Elfring
  0 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-01-21 10:22 UTC (permalink / raw)
  To: Jaskaran Singh, cocci; +Cc: linux-kernel-mentees

> …, followed by ret on
> the next to next line.

Would you like to improve this wording?

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

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

end of thread, other threads:[~2020-01-25 15:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  8:04 [Cocci] [PATCH v2 0/3] cocci: Improve management of macros before typedefs Jaskaran Singh
2020-01-21  8:04 ` [Cocci] [PATCH v2 1/3] parsing_c: Handle case of macro before typedef Jaskaran Singh
2020-01-21  8:04 ` [Cocci] [PATCH v2 2/3] parsing_hacks: Add bool to list of known typedefs Jaskaran Singh
2020-01-21  8:04 ` [Cocci] [PATCH v2 3/3] tests: Add test case for <macro> bool <ident> Jaskaran Singh
2020-01-21 12:24 ` [Cocci] [PATCH v3 0/3] cocci: Improve management of macros before typedefs Jaskaran Singh
2020-01-25 15:01   ` Julia Lawall
2020-01-21 12:27 ` [Cocci] [PATCH v3 1/3] parsing_c: Handle case of macro before typedef Jaskaran Singh
2020-01-21 12:27   ` [Cocci] [PATCH v3 2/3] parsing_hacks: Add bool to list of known typedefs Jaskaran Singh
2020-01-21 12:27   ` [Cocci] [PATCH v3 3/3] tests: Add test case for <macro> bool <ident> Jaskaran Singh
2020-01-21 10:22 [Cocci] [PATCH v2 " Markus Elfring

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