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

Lints for ambiguous ! on the left hand side of a bitwise operation #265

Merged
merged 5 commits into from
May 18, 2021

Conversation

ZeWaka
Copy link
Contributor

@ZeWaka ZeWaka commented Apr 29, 2021

title, essentially
Puts some helpful hints in order of likelihood. Could be intended to be: !(x & y) or !x && y or ~x & y

Fulfils https://github.com/SpaceManiac/SpacemanDMM/projects/1#card-37357276

@@ -1642,6 +1642,12 @@ impl<'o, 's> AnalyzeProc<'o, 's> {
Expression::BinaryOp { op, lhs, rhs } => {
let lty = self.visit_expression(location, lhs, None, local_vars);
let rty = self.visit_expression(location, rhs, None, local_vars);
match op {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could put this before the visitation above as well.

@SpaceManiac SpaceManiac merged commit f81223b into SpaceManiac:master May 18, 2021
@SpaceManiac SpaceManiac added this to the suite v1.7 milestone May 19, 2021
@ZeWaka ZeWaka deleted the faulty-bitmath branch January 17, 2022 09:10
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