-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[cxx-interop] Check template argument safety in ClangDeclExplicitSafety #85095
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
base: main
Are you sure you want to change the base?
Conversation
Checking this upon import was overlooking annotations that explicitly mark a type as safe (or unsafe). Instead, we consolidate this logic in the ClangDeclExplicitSafety request. rdar://163196609
|
@swift-ci please test |
| break; | ||
| case clang::TemplateArgument::Pack: | ||
| for (auto pkArg : arg.getPackAsArray()) { | ||
| if (pkArg.getKind() == clang::TemplateArgument::Type && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can packs be nested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not as far as I'm aware.
|
@swift-ci please test |
|
Note: tests failed because I forgor to account for cycles, e.g., this fun one from libcxx: template <class _Tp>
class allocator : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp> > { ... } |
9520c14 to
929d0d8
Compare
|
@swift-ci please test |
|
@swift-ci please test macos platform |
|
@swift-ci please test macos platform |
Checking this upon import was overlooking annotations that explicitly mark a type as safe (or unsafe). Instead, we consolidate this logic in the ClangDeclExplicitSafety request.
rdar://163196609