-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ClangImporter] Look through bounds attributes for template matching #82076
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
@swift-ci please smoke test |
These functions all contain this type of pattern:
My hunch is that they actually ought to use something like this (or equivalent with
But I don't want to introduce unnecessary risk this late in the release cycle, so I elected to only strip the type sugar we know we need to strip, in case it affects other things. Especially since it seems like this template logic is all a bit of a hack anyways that eventually needs to be replaced; e.g. this doesn't seem to get imported:
CC @egorzhdan in case you have more context |
I have a similar hunch, we probably want to ignore all type sugar as these do not change how template instantiation work. Could you open a rdar to make sure we clean this up? |
Created rdar://152835871 ([ClangImporter] Ignore all type sugar for template instantiation) and rdar://152835941 ([ClangImporter] Generalize type matching for function template instantiation) |
d192deb
to
b209224
Compare
@swift-ci please smoke test |
When instantiating templated functions with pointers to the templated type, the ClangImporter does not strip type sugar. This strips type sugar for bounds attributes, to make sure that they import the same regardless of whether they are parsed or not. rdar://151041990
b209224
to
bd714f5
Compare
@swift-ci please smoke test |
…ypes2 When instantiating templated functions with pointers to the templated type, the ClangImporter does not strip type sugar. This strips type sugar for bounds attributes, to make sure that they import the same regardless of whether they are parsed or not. rdar://151041990 (cherry picked from commit 00afb8b)
When instantiating templated functions with pointers to the templated type, the ClangImporter does not strip type sugar. This strips type sugar for bounds attributes, to make sure that they import the same regardless of whether they are parsed or not.
rdar://151041990