On Mon, 27 Apr 2020, Jaskaran Singh wrote:
> Add a test case for removing Parameter attributes. The test case checks
> correct removal of the attribute when it is:
>
> - before the parameter type.
> - after the parameter type and before the parameter identifier.
> - after the parameter
On Mon, 27 Apr 2020, Jaskaran Singh wrote:
> Parameter attributes are added to the SmPL AST. Visit these attributes in
> the AST visitor.
>
> Signed-off-by: Jaskaran Singh
> ---
> parsing_cocci/visitor_ast.ml | 22 +-
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
>
On Mon, 27 Apr 2020, Jaskaran Singh wrote:
> Parameter attributes are added to the SmPL AST. Reflect these changes in
> unparse_ast0.ml.
>
> Signed-off-by: Jaskaran Singh
> ---
> parsing_cocci/unparse_ast0.ml | 15 ---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff
On Mon, 27 Apr 2020, Jaskaran Singh wrote:
> Parameter attributes are added to the SmPL AST. Reflect these changes in
> iso_pattern.ml.
>
> Signed-off-by: Jaskaran Singh
> ---
> parsing_cocci/iso_pattern.ml | 22 ++
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
>
On Mon, 27 Apr 2020, Jaskaran Singh wrote:
> Parameter attributes are added to the SmPL AST. Reflect these changes in
> compute_lines.ml.
>
> Signed-off-by: Jaskaran Singh
> ---
> parsing_cocci/compute_lines.ml | 15 +--
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff
On Mon, 27 Apr 2020, Jaskaran Singh wrote:
> Parameter attributes are added to the SmPL AST. Reflect these changes in
> check_meta.ml.
Maybe add a comment that for the moment there are no metavariables for
attributes.
julia
>
> Signed-off-by: Jaskaran Singh
> ---
>
Parameter attributes are added to the SmPL AST. Reflect these changes in
function_prototypes.ml.
Signed-off-by: Jaskaran Singh
---
Changes in v2:
- Removed unnecessary function name change (collect_ident_strings).
parsing_cocci/function_prototypes.ml | 8
1 file changed, 4
Add a test case for removing Parameter attributes. The test case checks
correct removal of the attribute when it is:
- before the parameter type.
- after the parameter type and before the parameter identifier.
- after the parameter identifier.
Signed-off-by: Jaskaran Singh
---
Parameter attributes are added to the SmPL AST. Reflect these changes in
ast0toast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0toast.ml | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml
index
Add a test case to detect parameter attributes in C. The test case
changes the type of the parameter if it has the attribute. The cases
covered are for when the attribute is:
- before the parameter type.
- after the parameter type and before the parameter identifier.
- after the parameter
Add parameter attributes to the SmPL AST. This is a list of attributes
in the VoidParam and Param types of the SmPL AST.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast_cocci.ml | 4 ++--
parsing_cocci/ast_cocci.mli | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
Parameter attributes are added to the SmPL AST. Visit these attributes in
the AST visitor.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast.ml | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/parsing_cocci/visitor_ast.ml
Parameter attributes are added to the SmPL AST. Reflect these changes in
iso_pattern.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/iso_pattern.ml | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/parsing_cocci/iso_pattern.ml
Parameter attributes are added to the SmPL AST. Reflect these changes in
unparse_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unparse_ast0.ml | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/parsing_cocci/unparse_ast0.ml
Parameter attributes are added to the SmPL AST. Print these attributes
correctly in unparse_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_cocci.ml | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/parsing_c/unparse_cocci.ml
Parameter attributes are added to the SmPL AST. Reflect these changes in
type_infer.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/type_infer.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parsing_cocci/type_infer.ml b/parsing_cocci/type_infer.ml
index
Parameter attributes are added to the SmPL AST. Reflect these changes in
disjdistr.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/disjdistr.ml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/parsing_cocci/disjdistr.ml b/parsing_cocci/disjdistr.ml
index
Parameter attributes are added to the SmPL AST. Reflect these changes in
coccilib.mli.
Signed-off-by: Jaskaran Singh
---
ocaml/coccilib.mli | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ocaml/coccilib.mli b/ocaml/coccilib.mli
index 0e807c9a..59c58aea 100644
---
Parameter attributes are added to the C and SmPL AST. Match the
attributes correctly in cocci_vs_c.ml.
Signed-off-by: Jaskaran Singh
---
engine/cocci_vs_c.ml | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/engine/cocci_vs_c.ml b/engine/cocci_vs_c.ml
index
Parameter attributes are added to the SmPL AST. Print these attributes
correctly in pretty_print_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/pretty_print_cocci.ml | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git
Parameter attributes are added to the SmPL AST. Reflect these changes in
unify_ast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unify_ast.ml | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index
This patch series aims to add parameter attributes to SmPL, and is a
continuation of the series "cocci: Improve C parsing of attributes"[1].
In [1], parameter attributes were added to the C AST of Coccinelle, but
not to SmPL.
Two test cases are included:
- detect_param_attr: Test case to detect
Parameter attributes are added to the SmPL AST. Reflect these changes in
check_meta.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/check_meta.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parsing_cocci/check_meta.ml b/parsing_cocci/check_meta.ml
index
Parameter attributes are added to the SmPL AST. Parse these attributes
correctly in the SmPL parser. The added production only supports
attributes after the type or the type and identifier.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/parser_cocci_menhir.mly | 7 ---
1 file changed, 4
Parameter attributes are added to the SmPL AST. Reflect these changes in
function_prototypes.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/function_prototypes.ml | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/parsing_cocci/function_prototypes.ml
Parameter attributes are added to the SmPL AST. Reflect these changes in
compute_lines.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/compute_lines.ml | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/parsing_cocci/compute_lines.ml
Parameter attributes are added to the SmPL AST. Reflect these changes in
index.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/index.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/parsing_cocci/index.ml b/parsing_cocci/index.ml
index f7ae48b4..1baeb2bb 100644
---
Parameter attributes are added to the SmPL AST. Reflect these changes in
arity.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/arity.ml | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml
index
Parameter attributes are added to AST0 of SmPL. Visit these attributes
in the AST0 visitor.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast0.ml | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/parsing_cocci/visitor_ast0.ml
Parameter attributes are added to the SmPL AST. Reflect these changes in
context_neg.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/context_neg.ml | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci/context_neg.ml
Add parameter attributes to AST0 of SmPL. This is a list of attributes
in the VoidParam and Param types of AST0.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0_cocci.ml | 4 ++--
parsing_cocci/ast0_cocci.mli | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
> Fixes coccicheck warning:
> ./drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2110:30-31:
> WARNING comparing pointer to 0
Such information is actually provided by a known script for
the semantic patch language.
32 matches
Mail list logo