Skip to content

Lint Suboptimal Expression Order #1193

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

Open
llogiq opened this issue Aug 26, 2016 · 0 comments
Open

Lint Suboptimal Expression Order #1193

llogiq opened this issue Aug 26, 2016 · 0 comments

Comments

@llogiq
Copy link
Contributor

llogiq commented Aug 26, 2016

(This one is nicked from fb-contrib). Lint expressions of the kind

(method)call &&/|| (no method call) {==, !=} (no method call)

e.g. potentially_expensive_check() && a == b

And suggest to reorder the subexpressions to possibly improve performance. Note that this may change behavior if potentially_expensive_check() has side effects.

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

No branches or pull requests

1 participant