Skip to content

Commit 9e17a8c

Browse files
committed
[ClangImporter] Extract common import parameter code. Fix Obj-C++ params.
Extract the code of import parameter list into an independent method. Also merge the differences in code from import method parameters into it. Both importing function parameters and import method parameters use the same code to transform parameters, so the improvements done for functions to support C++ parameters will apply to Obj-C++ methods. Also extract the creation of parameter info, which is also shared, but cannot live together in the previous extracted function because methods perform some checks in between the two parts that functions cannot do. Add a test that checks the corrected of importing C++ types from Obj-C++ methods. Before these changes the parameters would have been imported as `UnsafePointer`, but they are now imported as its C++ type (the same as when they are imported in a C++ function). There are several FIXME in the test because the parameters are not imported as `@in` in the initializer, and there are discussions about those `@in` needing to be `@in_guaranteed` instead.
1 parent 8d03c68 commit 9e17a8c

File tree

5 files changed

+348
-191
lines changed

5 files changed

+348
-191
lines changed

0 commit comments

Comments
 (0)