Skip to content

Fix comparisons between presumed and buffer line numbers #32020

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
May 26, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented May 26, 2020

Found these while auditing calls to the line-and-column source manager methods after they were renamed. In the first case, comparing presumed line numbers for equality is not desirable when deciding if we should emit parsing warnings. In the second case, a presumed line number was incorrectly compared to a buffer line number.

@owenv owenv requested a review from rintaro May 26, 2020 15:22
@owenv
Copy link
Contributor Author

owenv commented May 26, 2020

@swift-ci please smoke test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

Since the parser one is comparing columns (not line numbers), it shouldn't have been an issue. Nevertheless this is a good change. Thank you!

@owenv owenv merged commit 73c1005 into swiftlang:master May 26, 2020
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