Skip to content

Revert "ValueFlow: extracted ValueFlowAnalyzer into separate file"#6643

Merged
firewave merged 1 commit into
cppcheck-opensource:mainfrom
pfultz2:revert-6640-vf-inc-rew
Jul 26, 2024
Merged

Revert "ValueFlow: extracted ValueFlowAnalyzer into separate file"#6643
firewave merged 1 commit into
cppcheck-opensource:mainfrom
pfultz2:revert-6640-vf-inc-rew

Conversation

@pfultz2
Copy link
Copy Markdown
Contributor

@pfultz2 pfultz2 commented Jul 26, 2024

Reverts #6640

@firewave
Copy link
Copy Markdown
Collaborator

Any reason?

@pfultz2
Copy link
Copy Markdown
Contributor Author

pfultz2 commented Jul 26, 2024

All the analyzer classes should go into the same cpp file. And the header should just expose functions to construct the analyzer(like makeAnalyzer) or the high-level functions such as valueFlowForward.

This change requires duplicating the function declaration in both the header and cpp file and when adding an internal function the header needs to be updated, which doesnt make sense since this is not meant to be an interface, and adds more unnecessary work.

@firewave
Copy link
Copy Markdown
Collaborator

Makes sense.

I realized it myself even before your reply. The good thing is that I had the intermediate step of just moving all the involved code so the work could be mostly salvaged.

I considered moving more stuff into the added files but I wanted to start with something but did not think about this implementations basically just sitting behind interface (that's actually for I did for another in-progress refactoring so I should have realized). This stuff is just so tangled up that it takes several roundtrips until it get clear what could be extracted.

@firewave firewave merged commit 69ba503 into cppcheck-opensource:main Jul 26, 2024
@pfultz2 pfultz2 deleted the revert-6640-vf-inc-rew branch July 29, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants