-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Labels
ASTGenArea → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ ASTArea → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ ASTcompilerThe Swift compiler itselfThe Swift compiler itself
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
createmethod static members onNilLiteralExpr - Use C++ interop to introduce the
NilLiteralExprtype in Swift and import thecreatemethod as a constructor onNilLiteralExprusing theSWIFT_NAMEattribute (at least I think this should be possible) - If we choose to introduce
BridgedNilLiteralExpr, we should importNilLiteralExpr_createas an initializer onBridgedNilLiteralExprusing theSWIFT_NAMEattribute
Similarly, the AbstractFunctionBody_setBody-style functions should be imported as member functions on the underlying type.
Metadata
Metadata
Assignees
Labels
ASTGenArea → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ ASTArea → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ ASTcompilerThe Swift compiler itselfThe Swift compiler itself