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

Report CS0675 warning for compound assignment operator. #2416

Merged
merged 1 commit into from
May 1, 2015

Conversation

AlekseyTs
Copy link
Contributor

Fixes #909.

@AlekseyTs
Copy link
Contributor Author

@VSadov, @gafter, @agocke, @jaredpar Please review.

@VSadov
Copy link
Member

VSadov commented Apr 30, 2015

LGTM

@@ -388,7 +399,7 @@ private void CheckVacuousComparisons(BoundBinaryOperator tree, ConstantValue con
}
}

private void CheckOr(BoundBinaryOperator node)
Copy link
Member

Choose a reason for hiding this comment

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

IMHO the name of this method is a bit misleading. Can we rename it to CheckIfOr or add a comment specifying that it only performs checks in the case that it is an Or style operator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jaredpar How does "CheckForBitwiseOrSignExtend" sound?

Copy link
Member

Choose a reason for hiding this comment

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

SGTM

Overall change LGTM as well.

JaredPar from a phone
http://blog.paranoidcoding.com/


From: AlekseyTs notifications@github.com
Sent: Friday, May 1, 2015 10:48:31 AM
To: dotnet/roslyn
Cc: Jared Parsons
Subject: Re: [roslyn] Report CS0675 warning for compound assignment operator. (#2416)

In src/Compilers/CSharp/Portable/Lowering/DiagnosticsPass_Warnings.cshttps://github.com//pull/2416#discussion_r29518866:

@@ -388,7 +399,7 @@ private void CheckVacuousComparisons(BoundBinaryOperator tree, ConstantValue con
}
}

  •    private void CheckOr(BoundBinaryOperator node)
    

@jaredparhttps://github.com/jaredpar How does "CheckForBitwiseOrSignExtend" sound?

Reply to this email directly or view it on GitHubhttps://github.com//pull/2416/files#r29518866.

AlekseyTs added a commit that referenced this pull request May 1, 2015
Report CS0675 warning for compound assignment operator.
@AlekseyTs AlekseyTs merged commit af06b2f into dotnet:master May 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning CS0675 fired in Dev12 but not Dev14
4 participants