, the space next to
the right paranthesis should be dropped:
if(a)
-{
-result = b;
goto c;
-}
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_c.ml | 33 -
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git
This is in response to the following "continue statement of death"
report:
https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06199.html
Coccinelle would crash in similar cases, so add a test case for it.
Signed-off-by: Jaskaran Singh
---
tests/stmt_removed_and_added
The cocci info tag can sometimes have circular references in the
MINUS/NOREPLACEMENT case in the transformation. Pass the binding
info through clean_env to remove circular references.
Signed-off-by: Jaskaran Singh
---
engine/transformation_c.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion
The following patch series is for fixing the "continue statement of
death" report here:
https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06199.html
Changes include removing circular references that cause the crash
and adding a corresponding test case.
engine/transformation_c.ml |
Pointer to const pointer and its variants would not match previously.
Add a test case for matching these types.
Signed-off-by: Jaskaran Singh
---
tests/constptr.c | 7 +++
tests/constptr.cocci | 19 +++
tests/constptr.res | 7 +++
3 files changed, 33 insertions
ci AST constructed would be:
Pointer2 -> const Pointer1 -> char
Change the pointer rule in the C parser so that an AST similar to the
Cocci AST is constructed.
Make necessary changes in the C pretty printer so that the pointer type
is printed correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/
A space is now added between the * and qualifier. Reflect this
change in the ptrconstptr test case.
Signed-off-by: Jaskaran Singh
---
tests/ptrconstptr.res | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ptrconstptr.res b/tests/ptrconstptr.res
index f5b2210c..1d0c3c1d
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
On Tue, 2020-01-21 at 06:20 +, Julia Lawall wrote:
>
> On Sun, 19 Jan 2020, Jaskaran Singh wrote:
>
> > bool is widely used in the Linux kernel. Certain cases of
> > parsing_hacks.ml would mislabel bool.
> >
> > Add bool to the list of known typedefs.
>
On Tue, 2020-01-21 at 06:23 +, Julia Lawall wrote:
>
> On Sun, 19 Jan 2020, Jaskaran Singh wrote:
>
> > bool is widely used in the Linux kernel. Certain cases of
> > parsing_hacks.ml would mislabel bool.
> >
> > Add bool to the list of known typedefs.
>
Before:
passed:bool
passed:bool
passed:bool
passed:bool
passed:bool
After:
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
Signed-off-by: Jaskaran Singh
---
par
:
nb good = 18956150, nb passed = 134061 => 0.70% passed
After:
nb good = 18956150, nb passed = 134062 => 0.70% passed
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 35 +++
1 file changed, 35 insertions(+)
diff
This would previously yield pretty printing errors,
i.e. bool would be printed on the next line, followed by ret on
the next to next line.
The metatype should be only bool and not bool.
Signed-off-by: Jaskaran Singh
---
tests/macro_before_bool.c | 4
tests/macro_before_bool.cocci | 9
This patch series is for improving the management of the following
case:
If is a known typedef (such as u8 or *_t) then label
as a CppMacro. Subsequent cases will label correctly as a
typedef ident.
Also add bool to the list of known typedefs so that cases of
bool
are handled
On Tue, 2020-01-21 at 11:10 +0100, Markus Elfring wrote:
> > Before:
> > passed:bool
>
> I wonder if subsequent duplicate information can really help to
> achieve a better understanding
> by the suggested description of a software situation.
>
Hm, I thought it would but you're probably right.
This patch series is for improving the management of the following
case:
If is a known typedef (such as u8 or *_t) then label as a
CppMacro. Subsequent cases will continue to label correctly as a
typedef identifier.
Also add bool to the list of known typedefs so that cases of
bool
are
This would previously yield pretty printing errors,
i.e. bool would be printed on the next line, followed by ret on
the next to next line.
The metatype should be only bool and not bool.
Signed-off-by: Jaskaran Singh
---
tests/macro_before_bool.c | 4
tests/macro_before_bool.cocci
Before:
passed:bool
passed:bool
passed:bool
passed:bool
passed:bool
After:
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
passed:nokprobe_inline
Signed-off-by: Jaskaran Singh
---
par
on the Linux Kernel v5.5-rc4:
Before:
nb good = 18956150, nb passed = 134061 => 0.70% passed
After:
nb good = 18956150, nb passed = 134062 => 0.70% passed
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 35 +++
1 file chang
On Wed, 2020-02-05 at 19:55 +0100, Markus Elfring wrote:
> Would you like to avoid any abbreviations in the patch subject?
>
I used abbreviations to keep the patch subject short but still clear.
Would the following be a better subject?
"tests: Add test case to match const pointer variants"
On Wed, 2020-02-05 at 19:36 +0100, Markus Elfring wrote:
> …
> > +++ b/parsing_c/pretty_print_c.ml
> > @@ -804,11 +804,12 @@ and pp_string_format (e,ii) =
> > (FunctionType (return=void, params=int i) *)
> >(*WRONG I THINK, use left & right function *)
> >(*
Pointer to const pointer and its variants would not match previously.
Add a test case for matching these types.
Signed-off-by: Jaskaran Singh
---
tests/constptr.c | 7 +++
tests/constptr.cocci | 19 +++
tests/constptr.res | 7 +++
3 files changed, 33 insertions
This series is to address the type matching problem in Coccinelle.
Patch 1/2 is for aligning the C and Cocci AST so that
pointer to const pointer and its variants can be matched.
Patch 2/2 consists of a test case for matching a pointer to
const pointer and its variants.
Changes in v2:
ci AST constructed would be:
Pointer2 -> const Pointer1 -> char
Change the pointer rule in the C parser so that an AST similar to the
Cocci AST is constructed.
Make necessary changes in the C pretty printer so that the pointer type
is printed correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/
On Fri, 2020-02-07 at 07:07 +0100, Markus Elfring wrote:
> > Would the following be a better subject?
>
> The alternative is nicer.
>
>
> Will other implementation details become also more interesting?
>
> The information “Align C AST and Cocci AST” was provided.
>
On Sat, 2020-02-08 at 09:30 +0100, Markus Elfring wrote:
> > For a pointer, the C parser constructed an AST dissimilar from that
> > of the Cocci AST. This caused failures in matching with certain
> > pointer types. For example, for the following case:
> >
> > char *1 const *2 id;
> >
> > The C
This series is to address the type matching problem in Coccinelle.
Patch 1/2 is for aligning the C and Cocci AST so that
pointer to const pointer and its variants can be matched.
Patch 2/2 consists of a test case for matching a pointer to
const pointer and its variants.
parsing_c/parser_c.mly
These types would not match previously. Add a test case for matching
a pointer to a const pointer and its variants.
Signed-off-by: Jaskaran Singh
---
tests/constptr.c | 7 +++
tests/constptr.cocci | 19 +++
tests/constptr.res | 7 +++
3 files changed, 33
ci AST constructed would be:
Pointer2 -> const Pointer1 -> char
Change the pointer rule in the C parser so that an AST similar to the
Cocci AST is constructed.
Make necessary changes in the C pretty printer so that the pointer type
is printed correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/
On Sun, 2020-02-09 at 17:48 +0100, Julia Lawall wrote:
> On Sun, 9 Feb 2020, Jaskaran Singh wrote:
>
> > Pointer to const pointer and its variants would not match
> > previously.
> > Add a test case for matching these types.
> >
> > Signed-off-by: Jaskaran
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
A space is now added between the * and qualifier. Reflect this
change in the ptrconstptr test case.
Signed-off-by: Jaskaran Singh
---
tests/ptrconstptr.res | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ptrconstptr.res b/tests/ptrconstptr.res
index f5b2210c..1d0c3c1d
Pointer to const pointer and its variants would not match previously.
Add a test case for matching these types.
Signed-off-by: Jaskaran Singh
---
tests/constptr.c | 7 +++
tests/constptr.cocci | 19 +++
tests/constptr.res | 7 +++
3 files changed, 33 insertions
ci AST constructed would be:
Pointer2 -> const Pointer1 -> char
Change the pointer rule in the C parser so that an AST similar to the
Cocci AST is constructed.
Make necessary changes in the C pretty printer so that the pointer type
is printed correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/
ci AST constructed would be:
Pointer2 -> const Pointer1 -> char
Change the pointer rule in the C parser so that an AST similar to the
Cocci AST is constructed.
Make necessary changes in the C pretty printer so that the pointer type
is printed correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/
Pointer to const pointer and its variants would not match previously.
Add a test case for matching these types.
Signed-off-by: Jaskaran Singh
---
tests/constptr.c | 7 +++
tests/constptr.cocci | 19 +++
tests/constptr.res | 7 +++
3 files changed, 33 insertions
A space is now added between the * and qualifier. Reflect this
change in the ptrconstptr test case.
Signed-off-by: Jaskaran Singh
---
tests/ptrconstptr.res | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ptrconstptr.res b/tests/ptrconstptr.res
index f5b2210c..1d0c3c1d
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
In certain cases, there is no space added after the Pointer type.
Examples of such cases are * const, * __attr and * const *.
In the Pointer case of pp_type_with_ident_rest and pp_type_left, if
the * is followed by anything within the type, add a space after the
printing.
Signed-off-by: Jaskaran
good = 18956150, nb passed = 134061 => 0.70% passed
---
nb good = 18956150, nb passed = 134062 => 0.70% passed
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 33 +
1 file changed, 33 insertions(+)
diff --git a/par
On Sun, 2020-01-19 at 18:48 +0530, Jaskaran Singh wrote:
> For the following case:
>
>
>
> A case in parsing_hacks.ml sometimes mislabels as a
> typedef ident.
>
> If is a known typedef (such as u8 or *_t), then label
> as a CppMacro. Subsequent cases w
:
nb good = 18956150, nb passed = 134061 => 0.70% passed
After:
nb good = 18956150, nb passed = 134062 => 0.70% passed
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 35 +++
1 file changed, 35 insertions(+)
diff
150, nb passed = 134073 => 0.70% passed
Signed-off-by: Jaskaran Singh
---
The above diff has been obtained after applying
https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06706.html
parsing_c/parsing_hacks.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/par
The Pointer cases in pp_type_with_ident_rest and pp_type_left of
pretty_print_c.ml sometimes do not add a necessary space, if there
exist tokens after the *.
Create changes necessary for adding this space and add a test case
for * const *.
parsing_c/pretty_print_c.ml |4
In certain cases, there is no space added after the Pointer type.
Examples of such cases are * const, * __attr and * const *.
In the Pointer case of pp_type_with_ident_rest and pp_type_left, if
the * is followed by anything within the type, add a space after the
printing.
Signed-off-by: Jaskaran
Previously, a space would not be added after the * const. Add
a test case for testing spacing with use of the type.
Signed-off-by: Jaskaran Singh
---
tests/ptrconstptr.c | 3 +++
tests/ptrconstptr.cocci | 7 +++
tests/ptrconstptr.res | 3 +++
3 files changed, 13 insertions(+)
create
On Thu, 2020-01-16 at 17:01 +0530, Jaskaran Singh wrote:
> On Thu, 2020-01-16 at 11:59 +0100, Julia Lawall wrote:
> > On Thu, 16 Jan 2020, Jaskaran Singh wrote:
> >
> > > On Thu, 2020-01-16 at 11:40 +0100, Markus Elfring wrote:
> > > > > In certain cases, th
On Thu, 2020-01-16 at 11:59 +0100, Julia Lawall wrote:
>
> On Thu, 16 Jan 2020, Jaskaran Singh wrote:
>
> > On Thu, 2020-01-16 at 11:40 +0100, Markus Elfring wrote:
> > > > In certain cases, there is no space added after the Pointer
> > > > type.
> >
For the following case:
[const_vol] [ptr]
The lookahead function in Parsing_hacks would mislabel as a
CppDirective, causing pretty printing errors.
Add a case in the lookahead function for handling this case.
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 14
When comments were appended to an identifier passed from python to cocci or
ocaml to cocci, two cases showed pretty printing errors. Add a test case
for both of the erroneous cases.
Signed-off-by: Jaskaran Singh
---
tests/id_comments.c | 4
tests/id_comments.cocci | 19
to pretty printing errors. The reason for this is that
cases in unparse_cocci.ml do not recognize the identifier and the comments
as different tokens.
Add a function to support user comments.
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_cocci.ml | 32 +---
1 file
Comments attached to identifiers via OCaml/Python bindings can be helpful
in using Coccinelle for source code analysis. Users of SmPL can attach
these comments to identifiers for denoting some information.
This patch series is for handling these comments and adding a corresponding
test case for
For the following case:
[const_vol] [ptr]
The lookahead function in Parsing_hacks would mislabel as a
CppDirective.
Add cases in the lookahead function for handling this case.
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 31 +++
1 file
On Mon, 2020-03-09 at 15:15 +0100, Julia Lawall wrote:
>
> On Sun, 8 Mar 2020, Jaskaran Singh wrote:
>
> > The C AST and SmPL AST differs with respect to the enum type.
> >
> > For an enumerator, the C AST is as follows:
> > Enum -> list of (name, (info
Add a test case to match against an array of function pointers.
This would previously not work due to differences in the C
and SmPL ASTs.
Signed-off-by: Jaskaran Singh
---
tests/funptr_array.c | 1 +
tests/funptr_array.cocci | 9 +
tests/funptr_array.res | 1 +
3 files changed, 11
to print
ParenType in Pretty_print_c.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast0.ml | 163 ++
1 file changed, 163 insertions(+)
diff --git a/parsing_cocci/visitor_ast0.ml b/parsing_cocci/visitor_ast0.ml
index c282e1f8..c56cd7a7 100644
The aim of this patch series is to add the types ParenType
and FunctionType to the SmPL AST. These types are present in
the C AST but not in the SmPL AST.
Preliminarily, a hack to resolve a reduce/reduce conflict
with the funproto rule in the SmPL parser is implemented.
Upon this, rules similar
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in type_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/type_cocci.mli | 2 ++
1 file changed, 2 insertions(+)
diff --git a/parsing_cocci/type_cocci.mli b/parsing_cocci/type_cocci.mli
index c1ccb58f
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in index.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/index.ml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/parsing_cocci/index.ml b/parsing_cocci/index.ml
index a1103503..5c91f620 100644
parser with the
above mentioned rules. All usages of d_ident, however, have not been
removed due to reduce/reduce conflicts.
Remove rules/productions that parse function pointers with usage of
direct_declarator and direct_abstract_d.
Signed-off-by: Jaskaran Singh
---
parsing_cocci
ParenType and FunctionType are types present in the C AST that
are not present in the SmPL AST. In the pursuit of aligning
both the C and SmPL ASTs, add these types to the SmPL ASTs.
Signed-off-by: Jaskaran Singh
---
ocaml/coccilib.mli | 6 ++
parsing_cocci/ast0_cocci.ml | 3
-by: Jaskaran Singh
---
parsing_cocci/parse_cocci.ml | 72 +++
parsing_cocci/parser_cocci_menhir.mly | 9 ++--
2 files changed, 67 insertions(+), 14 deletions(-)
diff --git a/parsing_cocci/parse_cocci.ml b/parsing_cocci/parse_cocci.ml
index 679d213a..4b2cb7e4 100644
ParenType/FunctionType are now types in the SmPL ASTs. Add
cases for these types in single_statement.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/single_statement.ml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/parsing_cocci/single_statement.ml
b/parsing_cocci
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in adjust_pragmas.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/adjust_pragmas.ml | 4
1 file changed, 4 insertions(+)
diff --git a/parsing_cocci/adjust_pragmas.ml b/parsing_cocci/adjust_pragmas.ml
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in iso_pattern.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/iso_pattern.ml | 5 +
1 file changed, 5 insertions(+)
diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci/iso_pattern.ml
index
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in check_meta.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/check_meta.ml | 5 +
1 file changed, 5 insertions(+)
diff --git a/parsing_cocci/check_meta.ml b/parsing_cocci/check_meta.ml
index 02b0fd9c
to print
ParenType in Pretty_print_c.
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_cocci.ml | 60 ++
1 file changed, 60 insertions(+)
diff --git a/parsing_c/unparse_cocci.ml b/parsing_c/unparse_cocci.ml
index 30e755e9..9dd84821 100644
--- a/parsing_c
ParenType and FunctionType are added to the SmPL ASTs. Add
cases for these types in arity.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/arity.ml | 17 +
1 file changed, 17 insertions(+)
diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml
index f29b86eb..3b408554
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in compute_lines.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/compute_lines.ml | 11 +++
1 file changed, 11 insertions(+)
diff --git a/parsing_cocci/compute_lines.ml b/parsing_cocci
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in function_prototypes.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/function_prototypes.ml | 4
1 file changed, 4 insertions(+)
diff --git a/parsing_cocci/function_prototypes.ml
b/parsing_cocci
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in disjdistr.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/disjdistr.ml | 10 ++
1 file changed, 10 insertions(+)
diff --git a/parsing_cocci/disjdistr.ml b/parsing_cocci/disjdistr.ml
index
to print
ParenType in Pretty_print_c.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/pretty_print_cocci.ml | 57 +
1 file changed, 57 insertions(+)
diff --git a/parsing_cocci/pretty_print_cocci.ml
b/parsing_cocci/pretty_print_cocci.ml
index 6338e464..ef60106c 100644
ParenType/FunctionType are now types in the SmPL ASTs. Add
cases for these types in unparse_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unparse_ast0.ml | 43 +++
1 file changed, 43 insertions(+)
diff --git a/parsing_cocci/unparse_ast0.ml b
to print
ParenType in Pretty_print_c.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast.ml | 75
1 file changed, 75 insertions(+)
diff --git a/parsing_cocci/visitor_ast.ml b/parsing_cocci/visitor_ast.ml
index 3d5de794..99af7652 100644
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in context_neg.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/context_neg.ml | 4
1 file changed, 4 insertions(+)
diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci/context_neg.ml
index
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in unify_ast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unify_ast.ml | 8
1 file changed, 8 insertions(+)
diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index d4ad3030
ParenType and FunctionType are now in the SmPL AST, and these
types have replaced all productions related to the FunctionPointer
type in the SmPL parser.
Remove FunctionPointer from the SmPL ASTs, its cases and any functions
or constructs related to it from the codebase.
Signed-off-by: Jaskaran
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in ast_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast_cocci.ml | 10 ++
1 file changed, 10 insertions(+)
diff --git a/parsing_cocci/ast_cocci.ml b/parsing_cocci/ast_cocci.ml
index
ParenType and FunctionType are added to the SmPL AST as types.
Match these types correctly.
Signed-off-by: Jaskaran Singh
---
engine/check_exhaustive_pattern.ml | 2 ++
engine/cocci_vs_c.ml | 27 +++
2 files changed, 29 insertions(+)
diff --git a/engine
ParenType and FunctionType are now added to the SmPL ASTs. Add
cases for these types in position_generator.ml.
Signed-off-by: Jaskaran Singh
---
tools/spgen/source/position_generator.ml | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/spgen/source/position_generator.ml
b/tools
On Mon, 2020-04-27 at 19:31 +0200, Julia Lawall wrote:
>
> 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 pa
On Fri, 2020-04-24 at 14:02 +0200, Markus Elfring wrote:
> > This patch series aims to improve parsing of attributes in C by
> > Coccinelle's C parser.
>
> How do you think about to use the wording “in C source code by”?
>
>
> > These parsing errors were discovered by running a build of
> >
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 b/parsing_c
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 b/parsing_cocci
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 b/parsing_cocci
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 09c28c06
identifier.
Signed-off-by: Jaskaran Singh
---
tests/detect_param_attr.c | 3 +++
tests/detect_param_attr.cocci | 13 +
tests/detect_param_attr.res | 3 +++
3 files changed, 19 insertions(+)
create mode 100644 tests/detect_param_attr.c
create mode 100644 tests
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 b/parsing_cocci
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 b/parsing_cocci
to detect a parameter attribute.
- remove_param_attr: Test case to remove a parameter attribute as per the
given SmPL.
[1]https://www.mail-archive.com/cocci@systeme.lip6.fr/msg07133.html
Jaskaran Singh (23):
parsing_cocci: ast0_cocci: Add parameter attributes
parsing_cocci: par
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 5a348ba3
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. 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
b
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 a/parsing_cocci
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
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 e8aad810
1 - 100 of 591 matches
Mail list logo