[Linux-kernel-mentees] [PATCH 00/27] cocci: Add struct end attributes to SmPL
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Sun May 31 15:25:54 UTC 2020
This patch series aims to add struct/union end attributes to SmPL, and is a
continuation of the series "cocci: Improve C parsing of attributes"[1].
Two test cases are included:
- detect_struct_endattr: Test case to detect a struct end attribute.
- remove_struct_endattr: Test case to remove a struct end attribute as per the
given SmPL.
- remove_struct_endattr_allminus: Test case to remove a struct definition and
check if the end attribute is removed as well.
This series is rebased on [2].
[1]:
[RFC PATCH 00/25] cocci: Improve C parsing of attributes
https://lore.kernel.org/cocci/20200424091801.13871-1-jaskaransingh7654321@gmail.com/
[2]:
[PATCH 00/30] cocci: Add macrodecl attributes to C and SmPL ASTs
https://lore.kernel.org/cocci/20200524171935.2504-1-jaskaransingh7654321@gmail.com/
Jaskaran Singh (27):
parsing_cocci: ast0_cocci: Add struct end attributes
parsing_cocci: parser: Reflect struct end attributes
parsing_cocci: visitor_ast0: Visit struct end attributes
parsing_cocci: unparse_ast0: Reflect struct end attributes
parsing_cocci: index: Reflect struct end attributes
parsing_cocci: iso_pattern: Reflect struct end attributes
parsing_cocci: type_infer: Reflect struct end attributes
parsing_cocci: arity: Reflect struct end attributes
parsing_cocci: check_meta: Reflect struct end attributes
parsing_cocci: compute_lines: Reflect struct end attributes
parsing_cocci: context_neg: Reflect struct end attributes
parsing_cocci: single_statement: Reflect struct end attributes
parsing_cocci: ast_cocci: Add struct end attributes
parsing_cocci: visitor_ast: Visit struct end attributes
parsing_cocci: pretty_print_cocci: Reflect struct end attributes
parsing_cocci: disjdistr: Reflect struct end attributes
parsing_cocci: adjust_pragmas: Reflect struct end attributes
parsing_cocci: unify_ast: Reflect struct end attributes
parsing_cocci: ast0toast: Reflect struct end attributes
parsing_c: unparse_cocci: Reflect struct end attributes
engine: check_exhaustive_pattern: Reflect struct end attributes
engine: cocci_vs_c: Match struct end attributes
ocaml: coccilib: Reflect struct end attributes
tools: spgen: Reflect struct end attributes
tests: Add test case to remove a struct end attribute
tests: Add test case to detect a struct end attribute
tests: Add test case to check struct endattr allminus
engine/check_exhaustive_pattern.ml | 4 ++--
engine/cocci_vs_c.ml | 17 ++++++++++-------
ocaml/coccilib.mli | 4 ++--
parsing_c/unparse_cocci.ml | 6 +++++-
parsing_cocci/adjust_pragmas.ml | 8 ++++----
parsing_cocci/arity.ml | 8 +++++---
parsing_cocci/ast0_cocci.ml | 2 +-
parsing_cocci/ast0_cocci.mli | 2 +-
parsing_cocci/ast0toast.ml | 5 +++--
parsing_cocci/ast_cocci.ml | 2 +-
parsing_cocci/ast_cocci.mli | 2 +-
parsing_cocci/check_meta.ml | 2 +-
parsing_cocci/compute_lines.ml | 5 +++--
parsing_cocci/context_neg.ml | 3 ++-
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 | 6 +++++-
parsing_cocci/single_statement.ml | 4 ++--
parsing_cocci/type_infer.ml | 2 +-
parsing_cocci/unify_ast.ml | 5 ++++-
parsing_cocci/unparse_ast0.ml | 6 +++++-
parsing_cocci/visitor_ast.ml | 10 ++++++----
parsing_cocci/visitor_ast0.ml | 5 +++--
tests/detect_struct_endattr.c | 13 +++++++++++++
tests/detect_struct_endattr.cocci | 9 +++++++++
tests/detect_struct_endattr.res | 12 ++++++++++++
tests/remove_struct_endattr.c | 7 +++++++
tests/remove_struct_endattr.cocci | 7 +++++++
tests/remove_struct_endattr.res | 7 +++++++
tests/remove_struct_endattr_allminus.c | 13 +++++++++++++
tests/remove_struct_endattr_allminus.cocci | 6 ++++++
tests/remove_struct_endattr_allminus.res | 1 +
tools/spgen/source/position_generator.ml | 4 ++--
35 files changed, 158 insertions(+), 52 deletions(-)
More information about the Linux-kernel-mentees
mailing list