mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Add some 'create' factory methods
This provides consistency with other AST nodes, and will be useful for implementing ArgumentList construction in the future.
This commit is contained in:
@@ -70,8 +70,8 @@ static Expr *constructUnownedSerialExecutor(ASTContext &ctx,
|
||||
// (Builtin.Executor) -> UnownedSerialExecutor
|
||||
auto metatypeRef = TypeExpr::createImplicit(executorType, ctx);
|
||||
Type ctorAppliedType = ctorType->getAs<FunctionType>()->getResult();
|
||||
auto selfApply = new (ctx) ConstructorRefCallExpr(initRef, metatypeRef,
|
||||
ctorAppliedType);
|
||||
auto selfApply = ConstructorRefCallExpr::create(ctx, initRef, metatypeRef,
|
||||
ctorAppliedType);
|
||||
selfApply->setImplicit(true);
|
||||
selfApply->setThrows(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user