ValueFlow: extracted more code into separate files
@danmar can this be merged? It is not different in principal from the previous change I did in this and it blocks a lot of follow-ups (including prototyping some of the bigger refactoring still needed).
Isn't this going too extreme? Putting every function in a separate file. There are many small files that are less than 100 lines of code.
Isn't this going too extreme? Putting every function in a separate file. There are many small files that are less than 100 lines of code.
This is just because these are the low-hanging cases. And it is quite possible we might enhance the steps in the future so there might be more code.
This also allows us to actually write a unit test for each of these. It also makes it way easier to review the code (and I have a bunch of smaller cleanups coming).
I would still say it's pretty extreme to put each function in a separate file. We could end up with 1000's of files if you continue to refactor cppcheck.
As far as I see we can still write the same unit tests if we have several functions in a file.
I would still say it's pretty extreme to put each function in a separate file. We could end up with 1000's of files if you continue to refactor cppcheck.
We are not extracting an infinite number of functions but a finite number of passes with differing complexity.
Some other functionality will also be factored out but those involve a lot of code.
splitting out each function into a separate file that is extreme to me. how about a file for all "non-analyzer" passes.
this was always the plan from the beginning so the previous PR should have never been approved and there was some back and froth while this could have been brought up.
I would not want that we continue and split up astutils tokenizer etc like this.
I am not going to do that. valueflow.cpp is extremely monolithic, is slow to compile and is just way too big. That partially applies to some of the other files as well but there is not much which could be factored out. the ValueFlow is different in that way.