Open elfring opened 11 months ago
How do you think about to disable isomorphisms like the following for another analysis approach (so that extra case distinctions can be avoided from the application of SmPL disjunctions)? :thinking:
Why can known source code places also not be found with the following SmPL script variant?
@display disable is_null, isnt_null1, neg_if, ne_if, drop_else, commeq, commneq, ptr_to_array@
statement s;
@@
*if (tint != NULL)
*{
* ...
* PictureFreeColors(...);
* cs->tint = GetColor(tint);
* s
*}
*else if (tint == NULL)
*{
* ...
* PictureFreeColors(...);
* cs->tint = GetColor(black);
* s
*}
:crystal_ball: How will observed difficulties be resolved for the safe application of statement metavariables?
The analysis tool “Cppcheck 2.10.3-3.2” pointed a source code place out for further development considerations:
(style) Condition 'tint==NULL' is always true [knownConditionTrueFalse]
:eyes: See also a corresponding change suggestion.
I tried another SmPL script variant out.
The following test result demonstrates a possible code transformation:
:crystal_ball: How will the chances evolve to improve components of the software combination “Coccinelle 1.1.1-00478-g0afff7fa” for more desirable source code search (and change) results?