Skip to content

[Modules] Soft reset diagnostics when clang module import failed #77925

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
Dec 4, 2024

Conversation

cachemeifyoucan
Copy link
Contributor

Swift compiler can try to import clang modules which might fail to load. In this case, the clang diagnostic engine is reset to ignore the errors, but the hard reset also clears out the states, including the diagnostics options and current states. This will affect the future clang module imports and diagnostics. Use a soft reset that only clears the errors but not the other states.

rdar://139723218

Swift compiler can try to import clang modules which might fail to load.
In this case, the clang diagnostic engine is reset to ignore the errors,
but the hard reset also clears out the states, including the diagnostics
options and current states. This will affect the future clang module
imports and diagnostics. Use a soft reset that only clears the errors
but not the other states.

rdar://139723218
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan merged commit 95e93ba into swiftlang:main Dec 4, 2024
5 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