-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Infer @PointerBounds macro from clang __counted_by parameters #77387
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
Conversation
With luck, #77580 should make the rebased version of this PR functional. I'm sure I missed something there, though. |
313bb2b
to
be1db64
Compare
Indeed, it works now! I'll start addressing the rest of the comments. |
11a5d13
to
ed1db71
Compare
There's a bunch of machinery around language features and their lifecycle that we don't get from a one-off flag. Plus, flags need to be manually handled in the driver, whereas language features are already available. |
8b67b03
to
77935a0
Compare
@swift-ci please smoke test |
77935a0
to
58c6cfc
Compare
@swift-ci please smoke test |
This results in an automatic wrapper function with safe pointer types when the imported function has bounds attributes. This exercises similar pathways as the recently added functionality for specifying macros from swift_attr. The new functionality is guarded by the experimental language feature SafeInteropWrappers. rdar://97942270
58c6cfc
to
f622a90
Compare
@swift-ci please smoke test |
After all the iterations of rebasing most of the intermediate commits didn't build anymore, and many contained a bunch of code that's removed in later commits, so I squashed them |
@swift-ci please smoke test Windows |
This results in an automatic wrapper function with safe pointer types
when the imported function has bounds attributes. This exercises similar
pathways as the recently added functionality for specifying macros from
swift_attr, and fixes some bugs related to macro source file management.
Includes some unmerged commits from #76969.