All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] [PATCH v2 0/3] cocci: Improve management of macros before typedefs
@ 2020-01-21  8:04 ` Jaskaran Singh
  0 siblings, 0 replies; 18+ 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] 18+ messages in thread

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

Thread overview: 18+ 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 ` [Linux-kernel-mentees] " 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   ` [Linux-kernel-mentees] " 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   ` [Linux-kernel-mentees] " 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  8:04   ` [Linux-kernel-mentees] " Jaskaran Singh
2020-01-21 12:24 ` [Cocci] [PATCH v3 0/3] cocci: Improve management of macros before typedefs Jaskaran Singh
2020-01-21 12:24   ` [Linux-kernel-mentees] " Jaskaran Singh
2020-01-25 15:01   ` [Cocci] " Julia Lawall
2020-01-25 15:01     ` [Linux-kernel-mentees] " 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   ` [Linux-kernel-mentees] " 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     ` [Linux-kernel-mentees] " 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 12:27     ` [Linux-kernel-mentees] " Jaskaran Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.