Skip to content

[PrintAsObjC] Do not output invalid decls when allowing errors #38923

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
Aug 19, 2021

Conversation

bnbarham
Copy link
Contributor

We still want the ObjectiveC header when allowing errors, but make sure
to skip printing out any invalid declarations that may be caused because
of those errors.

In particular, duplicate declarations were causing a crash when sorting
declarations where various assumptions would end up casting a
non-ExtensionDecl to an ExtensionDecl.

Resolves rdar://78023656

@bnbarham bnbarham requested review from xymus and beccadax August 18, 2021 06:56
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e38910f9c140289eeac229736f7ed9d003748157

@bnbarham bnbarham force-pushed the fix-objc-header-crash branch from e38910f to 6db9e3e Compare August 18, 2021 08:55
@bnbarham
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

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

One minor suggestion, but functionally this LGTM.

We still want the ObjectiveC header when allowing errors, but make sure
to skip printing out any invalid declarations that may be caused because
of those errors.

In particular, duplicate declarations were causing a crash when sorting
declarations where various assumptions would end up casting a
non-ExtensionDecl to an ExtensionDecl.

Resolves rdar://78023656
@bnbarham bnbarham force-pushed the fix-objc-header-crash branch from 6db9e3e to 7b807d5 Compare August 18, 2021 22:46
@bnbarham
Copy link
Contributor Author

@swift-ci please smoke test

@bnbarham bnbarham merged commit f3d5491 into main Aug 19, 2021
@bnbarham bnbarham deleted the fix-objc-header-crash branch August 19, 2021 03:55
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.

4 participants