Skip to content

cocci: Add macrodecl attributes to C and SmPL ASTs

Jaskaran Singh cocci linux-kernel-mentees 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest30 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/30parsing_cocci: ast0_cocci: Add Macrodecl attributesparsing_cocci/ast0_cocci.ml parsing_cocci/ast0_cocci.mli+4 -20 replies
2/30parsing_cocci: parser: Parse Macrodecl attributesparsing_cocci/parser_cocci_menhir.mly+4 -40 replies
3/30parsing_cocci: visitor_ast0: Visit Macrodecl attributesparsing_cocci/visitor_ast0.ml+4 -30 replies
4/30parsing_cocci: unparse_ast0: Reflect Macrodecl attributesparsing_cocci/unparse_ast0.ml+5 -20 replies
5/30parsing_cocci: index: Reflect Macrodecl attributesparsing_cocci/index.ml+1 -10 replies
6/30parsing_cocci: iso_pattern: Reflect Macrodecl attributesparsing_cocci/iso_pattern.ml+6 -30 replies
7/30parsing_cocci: type_infer: Reflect Macrodecl attributesparsing_cocci/type_infer.ml+1 -10 replies
8/30parsing_cocci: arity: Reflect Macrodecl attributesparsing_cocci/arity.ml+3 -20 replies
9/30parsing_cocci: check_meta: Reflect Macrodecl attributesparsing_cocci/check_meta.ml+2 -10 replies
10/30parsing_cocci: compute_lines: Reflect Macrodecl attributesparsing_cocci/compute_lines.ml+4 -30 replies
11/30parsing_cocci: context_neg: Reflect Macrodecl attributesparsing_cocci/context_neg.ml+3 -30 replies
12/30parsing_cocci: single_statement: Reflect Macrodecl attributesparsing_cocci/single_statement.ml+3 -30 replies
13/30parsing_cocci: ast_cocci: Reflect Macrodecl attributesparsing_cocci/ast_cocci.ml parsing_cocci/ast_cocci.mli+4 -20 replies
14/30parsing_cocci: visitor_ast: Reflect Macrodecl attributesparsing_cocci/visitor_ast.ml+6 -40 replies
15/30parsing_cocci: pretty_print_cocci: Reflect Macrodecl attributesparsing_cocci/pretty_print_cocci.ml+5 -20 replies
16/30parsing_cocci: disjdistr: Reflect Macrodecl attributesparsing_cocci/disjdistr.ml+2 -20 replies
17/30parsing_cocci: adjust_pragmas: Reflect Macrodecl attributesparsing_cocci/adjust_pragmas.ml+6 -60 replies
18/30parsing_cocci: unify_ast: Reflect Macrodecl attributesparsing_cocci/unify_ast.ml+2 -20 replies
19/30parsing_cocci: ast0toast: Reflect Macrodecl attributesparsing_cocci/ast0toast.ml+3 -20 replies
20/30parsing_c: ast_c: Add Macrodecl attributesparsing_c/ast_c.ml parsing_c/ast_c.mli+5 -20 replies
21/30parsing_c: parser_c: Reflect Macrodecl attributesparsing_c/parser_c.mly+16 -70 replies
22/30parsing_c: visitor_c: Reflect Macrodecl attributesparsing_c/visitor_c.ml+4 -20 replies
23/30parsing_c: pretty_print_c: Reflect Macrodecl attributesparsing_c/pretty_print_c.ml+4 -30 replies
24/30parsing_c: unparse_cocci: Reflect Macrodecl attributesparsing_c/unparse_cocci.ml+5 -20 replies
25/30engine: check_exhaustive_pattern: Reflect Macrodecl attributesengine/check_exhaustive_pattern.ml+2 -20 replies
26/30engine: cocci_vs_c: Match Macrodecl attributesengine/cocci_vs_c.ml+13 -100 replies
27/30ocaml: coccilib: Reflect Macrodecl attributesocaml/coccilib.mli+5 -30 replies
28/30tools: spgen: Reflect Macrodecl attributestools/spgen/source/meta_variable.ml tools/spgen/source/position_generator.ml+3 -30 replies
29/30tests: Add test case to remove macrodecl attributestests/remove_macrodecl_attr.c tests/remove_macrodecl_attr.cocci tests/remove_macrodecl_attr.res+14 -00 replies
30/30tests: Add test case to detect a macrodecl attributetests/detect_macrodecl_attr.c tests/detect_macrodecl_attr.cocci tests/detect_macrodecl_attr.res+22 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Cocci] [PATCH 00/30] cocci: Add macrodecl attributes to C and SmPL ASTs

This patch series aims to add macrodecl attributes to C and SmPL ASTs, and match them in C source code. This is a continuation of the series "cocci: Improve C parsing of attributes"[1].

Two test cases are included:

- detect_macrodecl_attr: Test case to detect a macrodecl attribute.

- remove_macrodecl_attr: Test case to remove a macrodecl attribute as per the given SmPL.

[1]https://www.mail-archive.com/[email protected]/msg07133.html

Jaskaran Singh (30):
parsing_cocci: ast0_cocci: Add Macrodecl attributes
parsing_cocci: parser: Parse Macrodecl attributes
parsing_cocci: visitor_ast0: Visit Macrodecl attributes
parsing_cocci: unparse_ast0: Reflect Macrodecl attributes
parsing_cocci: index: Reflect Macrodecl attributes
parsing_cocci: iso_pattern: Reflect Macrodecl attributes
parsing_cocci: type_infer: Reflect Macrodecl attributes
parsing_cocci: arity: Reflect Macrodecl attributes
parsing_cocci: check_meta: Reflect Macrodecl attributes
parsing_cocci: compute_lines: Reflect Macrodecl attributes
parsing_cocci: context_neg: Reflect Macrodecl attributes
parsing_cocci: single_statement: Reflect Macrodecl attributes
parsing_cocci: ast_cocci: Reflect Macrodecl attributes
parsing_cocci: visitor_ast: Reflect Macrodecl attributes
parsing_cocci: pretty_print_cocci: Reflect Macrodecl attributes
parsing_cocci: disjdistr: Reflect Macrodecl attributes
parsing_cocci: adjust_pragmas: Reflect Macrodecl attributes
parsing_cocci: unify_ast: Reflect Macrodecl attributes
parsing_cocci: ast0toast: Reflect Macrodecl attributes
parsing_c: ast_c: Add Macrodecl attributes
parsing_c: parser_c: Reflect Macrodecl attributes
parsing_c: visitor_c: Reflect Macrodecl attributes
parsing_c: pretty_print_c: Reflect Macrodecl attributes
parsing_c: unparse_cocci: Reflect Macrodecl attributes
engine: check_exhaustive_pattern: Reflect Macrodecl attributes
engine: cocci_vs_c: Match Macrodecl attributes
ocaml: coccilib: Reflect Macrodecl attributes
tools: spgen: Reflect Macrodecl attributes
tests: Add test case to remove macrodecl attributes
tests: Add test case to detect a macrodecl attribute

 engine/check_exhaustive_pattern.ml       |    4 ++--
 engine/cocci_vs_c.ml                     |   23 +++++++++++++----------
 ocaml/coccilib.mli                       |    8 +++++---
 parsing_c/ast_c.ml                       |    3 ++-
 parsing_c/ast_c.mli                      |    4 +++-
 parsing_c/parser_c.mly                   |   23 ++++++++++++++++-------
 parsing_c/pretty_print_c.ml              |    7 ++++---
 parsing_c/unparse_cocci.ml               |    7 +++++--
 parsing_c/visitor_c.ml                   |    6 ++++--
 parsing_cocci/adjust_pragmas.ml          |   12 ++++++------
 parsing_cocci/arity.ml                   |    5 +++--
 parsing_cocci/ast0_cocci.ml              |    3 ++-
 parsing_cocci/ast0_cocci.mli             |    3 ++-
 parsing_cocci/ast0toast.ml               |    5 +++--
 parsing_cocci/ast_cocci.ml               |    3 ++-
 parsing_cocci/ast_cocci.mli              |    3 ++-
 parsing_cocci/check_meta.ml              |    3 ++-
 parsing_cocci/compute_lines.ml           |    7 ++++---
 parsing_cocci/context_neg.ml             |    6 +++---
 parsing_cocci/disjdistr.ml               |    4 ++--
 parsing_cocci/index.ml                   |    2 +-
 parsing_cocci/iso_pattern.ml             |    9 ++++++---
 parsing_cocci/parser_cocci_menhir.mly    |    8 ++++----
 parsing_cocci/pretty_print_cocci.ml      |    7 +++++--
 parsing_cocci/single_statement.ml        |    6 +++---
 parsing_cocci/type_infer.ml              |    2 +-
 parsing_cocci/unify_ast.ml               |    4 ++--
 parsing_cocci/unparse_ast0.ml            |    7 +++++--
 parsing_cocci/visitor_ast.ml             |   10 ++++++----
 parsing_cocci/visitor_ast0.ml            |    7 ++++---
 tests/detect_macrodecl_attr.c            |    5 +++++
 tests/detect_macrodecl_attr.cocci        |   12 ++++++++++++
 tests/detect_macrodecl_attr.res          |    5 +++++
 tests/remove_macrodecl_attr.c            |    3 +++
 tests/remove_macrodecl_attr.cocci        |    8 ++++++++
 tests/remove_macrodecl_attr.res          |    3 +++
 tools/spgen/source/meta_variable.ml      |    2 +-
 tools/spgen/source/position_generator.ml |    4 ++--
 38 files changed, 161 insertions(+), 82 deletions(-)

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees