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

[6.1][Diagnostics] Support "swift" style diagnostics at EOF #77781

Open
wants to merge 1 commit into
base: release/6.1
Choose a base branch
from

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Nov 21, 2024

Cherry-pick #77755 into release/6.1

Explanation: In the new diagnostic printing style, diagnostics at EOF were mistakenly ignored. This change fix that by adjusting the position checking logic, and also make sure it emits the diagnostics at the correct position.
Scope: Diagnostics
Risk: Low. The change is simple enough
Testing: Added a regression test case
Issues: rdar://129883075 rdar://138426038
Reviewers: Doug Gregor (@DougGregor), Hamish Knight (@hamishknight), and Alex Hoppen (@ahoppen)

Adjust the valid position checking and special handle EOF position.
If the requested location is at EOF, use the last token, but still
emit the diagnostics at the specificied location.

rdar://138426038
(cherry picked from commit 40c8d81)
@rintaro rintaro requested a review from a team as a code owner November 21, 2024 18:31
@rintaro
Copy link
Member Author

rintaro commented Nov 21, 2024

@swift-ci Please test

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