-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
Disjunctions of the semantic patch language are using short-circuit evaluation.
It has got the consequence that the last element of the specified condition will only be checked if all previous parts did not match.
👀 Such a technical detail can occasionally be overlooked.
Another SmPL script example:
@test_replacements@
@@
(
-1
+9
|
-1 + 2
+3 + 4
)Questionable test result (by the software combination “Coccinelle 1.3.0” for example):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch test-replace_expression.cocci return_test_addition.c
…
@@ -1,4 +1,4 @@
int my_addition(void)
{
- return 1 + 2;
+ return 9 + 2;
}💭 I would like to be notified somehow that such source code search patterns should be reconsidered once more.
🔮 Will any additional error explanations become helpful?
Metadata
Metadata
Assignees
Labels
No labels