Skip to content

Fix signed warnings compiling lib/Sema/ConstraintSystem.h #6811

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

Merged
merged 1 commit into from
Jan 16, 2017
Merged

Fix signed warnings compiling lib/Sema/ConstraintSystem.h #6811

merged 1 commit into from
Jan 16, 2017

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Jan 14, 2017

Int/unsigned int comparison

@@ -2482,7 +2482,8 @@ class ConstraintSystem {
return false;

// Clearly exponential
if (TypeCounter < 32 && CountScopes > (1 << TypeCounter))
if (TypeCounter < 32 &&
CountScopes >(static_cast<unsigned>(1) << TypeCounter))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: space after >

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

One more: align this with the other conjunct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what clang format produced, odd. Anyways, I've used 1U now so this is simpler

@slavapestov
Copy link
Contributor

Actually isn't 1U a more concise way of writing this?

@CodaFi
Copy link
Contributor

CodaFi commented Jan 15, 2017

@swift-ci please smoke test and merge.

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

@slavapestov slavapestov self-assigned this Jan 15, 2017
@slavapestov slavapestov merged commit 4e14823 into swiftlang:master Jan 16, 2017
@hughbe hughbe deleted the constraint-warnings branch January 16, 2017 08:16
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.

3 participants