Skip to content

[Caching] Fix a bug when emitting diagnostics from nested macros #79371

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
Feb 14, 2025

Conversation

cachemeifyoucan
Copy link
Contributor

Fix a bug when emitting cached diagnostics from nested macros. When building a new source manager for cached diagnostics, there is a bug when creating mapping between FileIDs between two different source managers. If the newly created file in source manager requires another file to be mapped, e.g. when emitting a diagnostic from nested macros, the returning FileID can be updated by the second request before returning. Fix the bug by making sure two different FileIDs are returned in this case.

rdar://144810862

Fix a bug when emitting cached diagnostics from nested macros. When
building a new source manager for cached diagnostics, there is a bug
when creating mapping between FileIDs between two different source
managers. If the newly created file in source manager requires another
file to be mapped, e.g. when emitting a diagnostic from nested macros,
the returning FileID can be updated by the second request before
returning. Fix the bug by making sure two different FileIDs are returned
in this case.

rdar://144810862
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

ping

@cachemeifyoucan cachemeifyoucan merged commit 0e3bdf7 into swiftlang:main Feb 14, 2025
3 checks passed
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