cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] [PATCH v4 0/3] cocci: Align the C AST and Cocci AST for pointer
@ 2020-02-09 15:34 Jaskaran Singh
  2020-02-09 15:34 ` [Cocci] [PATCH v4 1/3] parsing_c: Align " Jaskaran Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jaskaran Singh @ 2020-02-09 15:34 UTC (permalink / raw)
  To: cocci; +Cc: linux-kernel-mentees

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 v4:
--------------
- Change coding style w/r/t placement of comment with List.iter and
  the qualifier printing function.

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

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

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

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

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

end of thread, other threads:[~2020-02-09 17:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-09 15:34 [Cocci] [PATCH v4 0/3] cocci: Align the C AST and Cocci AST for pointer Jaskaran Singh
2020-02-09 15:34 ` [Cocci] [PATCH v4 1/3] parsing_c: Align " Jaskaran Singh
2020-02-09 16:46   ` Julia Lawall
2020-02-09 15:34 ` [Cocci] [PATCH v4 2/3] tests: Add space between * and const in ptrconstptr.res Jaskaran Singh
2020-02-09 15:34 ` [Cocci] [PATCH v4 3/3] tests: Add test case to match const pointer variants Jaskaran Singh
2020-02-09 16:48   ` Julia Lawall
2020-02-09 17:32     ` Jaskaran Singh
2020-02-09 17:35       ` Julia Lawall

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