[Linux-kernel-mentees] [PATCH v3 0/3] cocci: Align the C AST and Cocci AST for pointer

Jaskaran Singh jaskaransingh7654321 at gmail.com
Sun Feb 9 11:54:16 UTC 2020

This series is to address the type matching problem in Coccinelle.

Patch 1/3 is for aligning the C and Cocci AST so that
pointer to const pointer and its variants can be matched.

Patch 2/3 reflects the pretty printing changes made in 
1/3 in the ptrconstptr test case. A space is added between
the * and const.

Patch 3/3 consists of a test case for matching a pointer to
const pointer and its variants.

Changes in v3:
- Add a space between the * and qualifier in Patch 1/3.
- Add Patch 2/3 to add a space between * and const in the test
  case ptrconstptr.

Changes in v2:
- Change body and subject of Patch 2/2 as per suggestion of Markus

[PATCH v3 1/3] parsing_c: Align C AST and Cocci AST for pointer
[PATCH v3 2/3] tests: Add space between * and const in
[PATCH v3 3/3] tests: Add test case to match const pointer variants

 parsing_c/parser_c.mly      |    4 ++--
 parsing_c/pretty_print_c.ml |   12 ++++++++----
 tests/constptr.c            |    7 +++++++
 tests/constptr.cocci        |   19 +++++++++++++++++++
 tests/constptr.res          |    7 +++++++
 tests/ptrconstptr.res       |    2 +-
 6 files changed, 44 insertions(+), 7 deletions(-)

More information about the Linux-kernel-mentees mailing list