-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Apply typedef -> enum patch to method param types as well. #42452
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
[cxx-interop] Apply typedef -> enum patch to method param types as well. #42452
Conversation
Basically just applying swiftlang#42431 to ObjC method param tyeps.
@swift-ci please test. |
@swift-ci Please Test Source Compatibility |
@@ -2847,7 +2865,21 @@ ImportedType ClangImporter::Implementation::importMethodParamsAndReturnType( | |||
ImportTypeKind importKind = ImportTypeKind::Parameter; | |||
ImportDiagnosticAdder paramAddDiag(*this, clangDecl, param->getLocation()); | |||
Type swiftParamTy; | |||
bool paramIsIUO; | |||
bool paramIsIUO = false; | |||
if (auto typedefType = dyn_cast<clang::TypedefType>(paramTy.getTypePtr())) { |
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 this and the previous addition be merged into one function or lambda?
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.
Good idea. I will do it in a follow-up nfc.
|
||
// CHECK: class ColorMaker { | ||
// CHECK: class func makeColor(withOptions opts: SOColorMask) | ||
// CHECK: func makeColor(withOptions opts: SOColorMask) |
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.
I suspect you will have to update these now that #42412 is merged.
Windows test failures are unrelated. Merging. |
Basically just applying #42431 to ObjC method param types.