Skip to content

[DNM][AST] Keep track of an "isDerivableFromSwiftType" bit for Clang types. #29349

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

Closed
wants to merge 1 commit into from
Closed

[DNM][AST] Keep track of an "isDerivableFromSwiftType" bit for Clang types. #29349

wants to merge 1 commit into from

Conversation

varungandhi-apple
Copy link
Contributor

I wasn't sure what to name the type, so I've named it ClangTypeWrapper for now.

Probably clean up the PR a little bit tomorrow but I figured I should put it up sooner rather than later for feedback and testing.

@varungandhi-apple
Copy link
Contributor Author

@swift-ci please test

@varungandhi-apple
Copy link
Contributor Author

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - f413f36

@varungandhi-apple
Copy link
Contributor Author

@swift-ci please clean test

@varungandhi-apple
Copy link
Contributor Author

There's some other breakage because of the SIL stuff, marking this as DNM right now.

@varungandhi-apple varungandhi-apple changed the title [AST] Keep track of an "isDerivableFromSwiftType" bit for Clang types. [DNM][AST] Keep track of an "isDerivableFromSwiftType" bit for Clang types. Jan 22, 2020
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - f413f36

@varungandhi-apple
Copy link
Contributor Author

The behavior for marking something "isDerivable" in this PR is not correct. Arguably, "isDerivable" is the wrong name altogether. We do not want the mangling for existing code to change. However, since multiple C types are mapped to the same Swift type, some function types like void (unsigned long) will get marked as "not derivable" because unsigned long -> Int -> long. We should instead check for something like "does this function type have additional attributes".

@varungandhi-apple
Copy link
Contributor Author

I've opened #34057 with a more recent version of these changes, so I'm closing this PR.

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