You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Coccinelle software provides the search operator "question mark". If I try a small script for the semantic patch language out on a source file like the following, I get an incomplete analysis result.
show_variable_definitions1.cocci:
@variable_definition@
expression value;
identifier var;
type data_type;
@@
*data_type var
?= value
;
elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch.opt -sp-file show_variable_definitions1.cocci ../Probe/optional_initialisation1.c
init_defs_builtins: /usr/local/lib64/coccinelle/standard.h
HANDLING: ../Probe/optional_initialisation1.c
diff =
warning: incompatible arity found on line 7
warning: incompatible arity found on line 6
warning: incompatible arity found on line 6
--- ../Probe/optional_initialisation1.c
+++ /tmp/cocci-output-30894-5c6d7c-optional_initialisation1.c
@@ -2,7 +2,6 @@
int main(void)
{
- char const message[] = "Test example\n";
int result;
result = puts(message);
I hope that the mentioned arity can become compatible. It seems that SmPL disjunctions need to be used instead for a while.
show_variable_definitions2.cocci:
@variable_definition@
expression value;
identifier var;
type data_type;
@@
(
*data_type var;
|
*data_type var = value;
)
I hope that the software implementation can also be improved around the operator "question mark" so that search element duplication can be avoided in more use cases.
The text was updated successfully, but these errors were encountered:
The Coccinelle software provides the search operator "question mark". If I try a small script for the semantic patch language out on a source file like the following, I get an incomplete analysis result.
show_variable_definitions1.cocci:
optional_initialisation1.c:
Output:
I hope that the mentioned arity can become compatible. It seems that SmPL disjunctions need to be used instead for a while.
show_variable_definitions2.cocci:
Output:
I hope that the software implementation can also be improved around the operator "question mark" so that search element duplication can be avoided in more use cases.
The text was updated successfully, but these errors were encountered: