[cxx-interop] Make __convertToBool() available but deprecated#89258
[cxx-interop] Make __convertToBool() available but deprecated#89258j-hui wants to merge 2 commits into
Conversation
|
@swift-ci please smoke test |
hnrklssn
left a comment
There was a problem hiding this comment.
Do we need the changes to .pointee and .successor?
Xazax-hun
left a comment
There was a problem hiding this comment.
Overall, looks good. I had one idea but I am not too attached to it, also fine as is.
| CXXOverload overload, | ||
| NominalTypeDecl *Struct, | ||
| StringRef unavailabilityMsg) { | ||
| static FuncDecl *importUnderlyingFunction(ClangImporter::Implementation &Impl, |
There was a problem hiding this comment.
Alternatively, we could have an enum parameter whether it needs to be unavailable or deprecated.
There was a problem hiding this comment.
I considered doing that but just felt that this was simpler, since adding the unavailability attr was a one-liner, and we were doing other modifications at the call sites of this helper anyway.
That said, I'm happy to do the enum if you feel strongly about this!
Yeah, those + I ripped out the unavailability attr part so I had to push that into all call sites of in Also, while doing this, I spotted a typo for the |
|
Collided with #89253, rebasing |
88c0e20 to
d00d88e
Compare
|
@swift-ci please smoke test |
These flags don't make any difference so this is completely unnecessary.
In 9c35230 I made __convertToBool() an unavailable function following the pattern of other synthesized underlying functions. This was actually not good because others were relying on this as a workaround for when CxxBool conformance doesn't kick in. In this patch, I bring back __convertToBool() and mark it as deprecated rather than as unavailable. This allows the user to call it but warns them against doing so while we iron out the kinks with CxxBool. rdar://177377260
d00d88e to
648427b
Compare
|
@swift-ci Please smoke test |
In 9c35230 I made __convertToBool()
an unavailable function following the pattern of other synthesized
underlying functions. This was actually not good because others were
relying on this as a workaround for when CxxBool conformance doesn't
kick in.
In this patch, I bring back __convertToBool() and mark it as deprecated
rather than as unavailable. This allows the user to call it but warns
them against doing so while we iron out the kinks with CxxBool.
rdar://177377260