use valueflow from cppcheck-1.88 for "normal" check level? - #4948
Conversation
b80fe38 to
5184c1b
Compare
|
I would not be against that we improve valueflow in ValueFlowNormal but my idea is that we will be extra careful.. |
| for (Token *tok = tokenlist->front(); tok; tok = tok->next()) | ||
| tok->clearValueFlow(); | ||
|
|
||
| ValueFlowNormal::setValues(tokenlist, symboldatabase, errorLogger, settings); |
There was a problem hiding this comment.
This is a temporary hack! We will check if "normal" check level is enabled and then call ValueFlowNormal::setValues
|
@firewave @pfultz2 @orbitcowboy @chrchr-github it would be interesting with some opinions. This PR is far from complete so don't bother too much looking at the code. |
|
I think using valueflow from 1.88 will introduce a lot of FPs(and FNs). I dont think its a good idea to make this the normal analysis. We could have a fast mode that ran this type of analysis. However, there is still a lot of code duplication. It would be better to prune back our current analysis in a way that can run faster and minimize FPs for such a fast mode. |
|
Also, when analyzing lib/, most of the time is spent for symboldatabase.cpp file: If we limit the max iterations to 1 and remove
|
|
@pfultz2 ok thanks for your inputs.. that makes sense. I close this. |
|
I would really like to look into and comment on this but I have been out sick for the week and I really need to step back from being so involved. This means I will try to finish up all my open stuff and add lots of tickets, TODOs and (unfortunately) also some draft PRs. I will also no longer participate in discussions outside of my tickets/PRs and also no longer keep an eye on the CI - I keep getting sidetracked all the time I cannot do this anymore. Sorry about that. |
|
@firewave please take care. |
Is it a good idea to use valueflow from cppcheck-1.88 for "normal" check level?
PRO: There is a significant speedup.
There has been many improvements in valueflow since 1.88 that slowed down the analysis and for me those can be part of "exhaustive" checking.
There has been many fixes for false positives. We will need to fix those in the normal valueflow also somehow.
What is your opinions?
I envision that we will move duplicated heuristics from "valueflow.cpp" to "valueflownormal.cpp" and call the ValueFlowNormal function from the exhaustive pipeline..
Checking "lib" folder with this branch:
Checking "lib" folder with main branch: