[Linux-kernel-mentees] [PATCH v2 0/3] cocci: Improve management of macros before typedefs

Jaskaran Singh jaskaransingh7654321 at gmail.com
Tue Jan 21 08:04:52 UTC 2020

This patch series is for improving the management of the following

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

More information about the Linux-kernel-mentees mailing list