-
Notifications
You must be signed in to change notification settings - Fork 1.5k
extracted ValueFlow::Value
to vfvalue.{cpp|h}
#4642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Those helper structs in If we need those in more places we should probably add those to |
@pfultz2 I am also looking at splitting the ValueFlow analysis i.e. It seems like most of the code related to the various steps is not shared at all. So I am wondering if it would be feasible to put these steps into separate modular files like That approach would allow us to make this refactoring incremental and we don't need one big commit. That would also help with preventing/easing with potential conflicts in local branches and existing PRs. @danmar I would also prefer to add an underscore to the file names though but we have not been doing that so far. There's also some minor quibbles this exposed which I would clean up anyways. |
I think it would be better to put valueflow under a subdirectory. And then include it with
The same here, each pass would be under lib/valueflow/ directory. The issue I see with this is some passes need to construct the analyzer directly, so we should probably add a new valueFlowForward function. That is my personal opinion. I dont know what @danmar thinks about it. |
Yea I would like to move the |
I thought about that as well.
That would fall under "shared code" i.e. internal stuff. That could probably go into several separate files as suggested. I think we should decide what folder structure/naming is acceptable and then I will start prototyping with some low-hanging stuff. |
It's acceptable to me. I don't have a strong opinion. One opinion I do have is to keep a source file and its header in the same folder. |
Great! This can be merged anyways and I will prepare a PR with the first refactoring soon. |
Will be made ready to merge after #4652 goes in. |
`valueflow.cpp` is very monolithic which makes it hard to manage. This is splitting several parts into separate files as discussed in #4642.
No description provided.