Skip to content
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

Rust: Implement UnusedValue.ql (2) #17773

Merged
merged 6 commits into from
Oct 17, 2024
Merged

Rust: Implement UnusedValue.ql (2) #17773

merged 6 commits into from
Oct 17, 2024

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Oct 15, 2024

This PR implements an initial version of UnusedValue.ql, based on SSA, originally written by @hvitved in #17726 . I've already stated I'm happy with the QL changes, but that PR can't be merged while Tom is away due to merge conflicts.

I have added some merge fixup (for extra test cases that have been added in main) and will start a DCA run on this PR as well. Results are generally very good but there are a few spurious ones in the new tests around asserts, which I'm worried will translate to a lot of noise on DCA...

@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Oct 15, 2024
@geoffw0
Copy link
Contributor Author

geoffw0 commented Oct 16, 2024

The query is indeed quite noisy with spurious results in real world code. I've just added some more test cases that show some of them.

However with the current metadata the query isn't part of a suite and so isn't run at all on DCA. So it won't cause any problems to merge what we have now and follow up with improvements (and increase the @precision then).

Copy link
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Perhaps @paldepind would like to have a look as well?

@geoffw0
Copy link
Contributor Author

geoffw0 commented Oct 17, 2024

Yep, and maybe hit merge if you're happy (I'll be away for a week).

@aibaars aibaars merged commit 6e197b5 into github:main Oct 17, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants