Description
The NilLiteralExpr_create
-style methods look a little foreign in Swift and ideally, they would be constructor calls. This issue talks about the NilLiteralExpr_create
function, but it really applies to all the _create
functions.
Depending on what we decide to do in #68346, we have three options:
- Use C++ interop and make the
create
method static members onNilLiteralExpr
- Use C++ interop to introduce the
NilLiteralExpr
type in Swift and import thecreate
method as a constructor onNilLiteralExpr
using theSWIFT_NAME
attribute (at least I think this should be possible) - If we choose to introduce
BridgedNilLiteralExpr
, we should importNilLiteralExpr_create
as an initializer onBridgedNilLiteralExpr
using theSWIFT_NAME
attribute
Similarly, the AbstractFunctionBody_setBody
-style functions should be imported as member functions on the underlying type.