Skip to content

[ClangImporter] Update umbrella header diagnostic handling #34108

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

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Sep 28, 2020

In swiftlang/llvm-project#1860, the diagnostic for a missing import in an umbrella header was improved by moving it to the end of the file and including a fix-it suggesting the import that would be needed. This breaks two things on the Swift side:

  • One Swift test assumes the old source location will be used.
  • The ClangSourceBufferImporter doesn’t work correctly when a diagnostic is emitted at EOF. It tries to create a virtual file covering EOF..<EOF, but it’s not actually valid to start a virtual file at EOF—it would always be empty.

This PR corrects these issues, which should unblock the automerger.

Fixes rdar://69707827.

In swiftlang/llvm-project#1860, the diagnostic for a missing import in an umbrella header was improved by moving it to the end of the file and including a fix-it suggesting the import that would be needed. This breaks two things on the Swift side:

• One Swift test assumes the old source location will be used.
• The `ClangSourceBufferImporter` doesn’t work correctly when a diagnostic is emitted at EOF. It tries to create a virtual file covering EOF..<EOF, but it’s not actually valid to start a virtual file at EOF—it would always be empty.

This commit corrects these issues, which should unblock the automerger.

Fixes rdar://69707827.
@beccadax
Copy link
Contributor Author

@swift-ci please smoke test

@beccadax beccadax requested a review from CodaFi September 28, 2020 23:31
@beccadax
Copy link
Contributor Author

The failing test will pass once the automerger is cleared.

@beccadax
Copy link
Contributor Author

With swiftlang/llvm-project#1878

@swift-ci smoke test

@shahmishal shahmishal merged commit 99b16d0 into swiftlang:main Sep 30, 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