[Linux-kernel-mentees] [PATCH v3 0/3] cocci: Improve management of macros before typedefs
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Tue Jan 21 12:24:56 UTC 2020
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 continue to label <typedef> correctly as a
typedef identifier.
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 v3:
--------------
- Change "subsequent cases will label" to "subsequent cases will continue to
label" in commit messages of Patch 0/3 and Patch 1/3.
- Change the term "typedef ident" to "typedef identifier" wherever
suitable.
- Add metavariable symbol false to tests/macro_before_bool.cocci to
suppress warning.
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 | 10 ++++++++++
tests/macro_before_bool.res | 5 +++++
4 files changed, 55 insertions(+), 1 deletion(-)
More information about the Linux-kernel-mentees
mailing list