Skip to content

Commit 8137aed

Browse files
committed
Rename LifetimeDependentReturnTypeRepr -> LifetimeDependentTypeRepr
1 parent 4993f4b commit 8137aed

19 files changed

+85
-89
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
namespace swift {
3131

3232
class AbstractFunctionDecl;
33-
class LifetimeDependentReturnTypeRepr;
33+
class LifetimeDependentTypeRepr;
3434
class SILParameterInfo;
3535

3636
enum class ParsedLifetimeDependenceKind : uint8_t {
@@ -216,7 +216,7 @@ class LifetimeDependenceInfo {
216216

217217
/// Builds LifetimeDependenceInfo from SIL
218218
static std::optional<LifetimeDependenceInfo>
219-
fromTypeRepr(LifetimeDependentReturnTypeRepr *lifetimeDependentRepr,
219+
fromTypeRepr(LifetimeDependentTypeRepr *lifetimeDependentRepr,
220220
SmallVectorImpl<SILParameterInfo> &params, DeclContext *dc);
221221
};
222222

include/swift/AST/TypeRepr.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class alignas(1 << TypeReprAlignInBits) TypeRepr
112112
NumElements : 32
113113
);
114114

115-
SWIFT_INLINE_BITFIELD_FULL(LifetimeDependentReturnTypeRepr, TypeRepr, 32,
115+
SWIFT_INLINE_BITFIELD_FULL(LifetimeDependentTypeRepr, TypeRepr, 32,
116116
: NumPadBits,
117117
NumDependencies : 32
118118
);
@@ -1118,7 +1118,8 @@ class SpecifierTypeRepr : public TypeRepr {
11181118
return T->getKind() == TypeReprKind::Ownership ||
11191119
T->getKind() == TypeReprKind::Isolated ||
11201120
T->getKind() == TypeReprKind::CompileTimeConst ||
1121-
T->getKind() == TypeReprKind::LifetimeDependentReturn ||
1121+
T->getKind() == TypeReprKind::LifetimeDependent ||
1122+
T->getKind() == TypeReprKind::Transferring ||
11221123
T->getKind() == TypeReprKind::Sending;
11231124
}
11241125
static bool classof(const SpecifierTypeRepr *T) { return true; }
@@ -1531,41 +1532,40 @@ class SILBoxTypeRepr final : public TypeRepr,
15311532
friend TypeRepr;
15321533
};
15331534

1534-
class LifetimeDependentReturnTypeRepr final
1535+
class LifetimeDependentTypeRepr final
15351536
: public SpecifierTypeRepr,
1536-
private llvm::TrailingObjects<LifetimeDependentReturnTypeRepr,
1537+
private llvm::TrailingObjects<LifetimeDependentTypeRepr,
15371538
LifetimeDependenceSpecifier> {
15381539
friend TrailingObjects;
15391540

1540-
size_t
1541-
numTrailingObjects(OverloadToken<LifetimeDependentReturnTypeRepr>) const {
1542-
return Bits.LifetimeDependentReturnTypeRepr.NumDependencies;
1541+
size_t numTrailingObjects(OverloadToken<LifetimeDependentTypeRepr>) const {
1542+
return Bits.LifetimeDependentTypeRepr.NumDependencies;
15431543
}
15441544

15451545
public:
1546-
LifetimeDependentReturnTypeRepr(
1547-
TypeRepr *base, ArrayRef<LifetimeDependenceSpecifier> specifiers)
1548-
: SpecifierTypeRepr(TypeReprKind::LifetimeDependentReturn, base,
1546+
LifetimeDependentTypeRepr(TypeRepr *base,
1547+
ArrayRef<LifetimeDependenceSpecifier> specifiers)
1548+
: SpecifierTypeRepr(TypeReprKind::LifetimeDependent, base,
15491549
specifiers.front().getLoc()) {
15501550
assert(base);
1551-
Bits.LifetimeDependentReturnTypeRepr.NumDependencies = specifiers.size();
1551+
Bits.LifetimeDependentTypeRepr.NumDependencies = specifiers.size();
15521552
std::uninitialized_copy(specifiers.begin(), specifiers.end(),
15531553
getTrailingObjects<LifetimeDependenceSpecifier>());
15541554
}
15551555

1556-
static LifetimeDependentReturnTypeRepr *
1556+
static LifetimeDependentTypeRepr *
15571557
create(ASTContext &C, TypeRepr *base,
15581558
ArrayRef<LifetimeDependenceSpecifier> specifiers);
15591559

15601560
ArrayRef<LifetimeDependenceSpecifier> getLifetimeDependencies() const {
15611561
return {getTrailingObjects<LifetimeDependenceSpecifier>(),
1562-
Bits.LifetimeDependentReturnTypeRepr.NumDependencies};
1562+
Bits.LifetimeDependentTypeRepr.NumDependencies};
15631563
}
15641564

15651565
static bool classof(const TypeRepr *T) {
1566-
return T->getKind() == TypeReprKind::LifetimeDependentReturn;
1566+
return T->getKind() == TypeReprKind::LifetimeDependent;
15671567
}
1568-
static bool classof(const LifetimeDependentReturnTypeRepr *T) { return true; }
1568+
static bool classof(const LifetimeDependentTypeRepr *T) { return true; }
15691569

15701570
private:
15711571
SourceLoc getStartLocImpl() const;
@@ -1608,7 +1608,7 @@ inline bool TypeRepr::isSimple() const {
16081608
case TypeReprKind::Sending:
16091609
case TypeReprKind::Placeholder:
16101610
case TypeReprKind::CompileTimeConst:
1611-
case TypeReprKind::LifetimeDependentReturn:
1611+
case TypeReprKind::LifetimeDependent:
16121612
return true;
16131613
}
16141614
llvm_unreachable("bad TypeRepr kind");

include/swift/AST/TypeReprNodes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ABSTRACT_TYPEREPR(Specifier, TypeRepr)
7474
TYPEREPR(Fixed, TypeRepr)
7575
TYPEREPR(SILBox, TypeRepr)
7676
TYPEREPR(Self, TypeRepr)
77-
TYPEREPR(LifetimeDependentReturn, TypeRepr)
77+
TYPEREPR(LifetimeDependent, TypeRepr)
7878
LAST_TYPEREPR(Self)
7979

8080
#undef SPECIFIER_TYPEREPR

lib/AST/ASTDumper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,8 +3541,8 @@ class PrintTypeRepr : public TypeReprVisitor<PrintTypeRepr, void, StringRef>,
35413541
printFoot();
35423542
}
35433543

3544-
void visitLifetimeDependentReturnTypeRepr(LifetimeDependentReturnTypeRepr *T,
3545-
StringRef label) {
3544+
void visitLifetimeDependentTypeRepr(LifetimeDependentTypeRepr *T,
3545+
StringRef label) {
35463546
printCommon("type_lifetime_dependent_return", label);
35473547
for (auto &dep : T->getLifetimeDependencies()) {
35483548
printFieldRaw(

lib/AST/ASTPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4083,7 +4083,7 @@ void PrintAST::visitFuncDecl(FuncDecl *decl) {
40834083
Printer.printDeclResultTypePre(decl, ResultTyLoc);
40844084
Printer.callPrintStructurePre(PrintStructureKind::FunctionReturnType);
40854085
{
4086-
if (auto *typeRepr = dyn_cast_or_null<LifetimeDependentReturnTypeRepr>(
4086+
if (auto *typeRepr = dyn_cast_or_null<LifetimeDependentTypeRepr>(
40874087
decl->getResultTypeRepr())) {
40884088
for (auto &dep : typeRepr->getLifetimeDependencies()) {
40894089
Printer << " " << dep.getLifetimeDependenceSpecifierString() << " ";
@@ -4321,7 +4321,7 @@ void PrintAST::visitConstructorDecl(ConstructorDecl *decl) {
43214321
if (decl->hasLifetimeDependentReturn()) {
43224322
Printer << " -> ";
43234323
auto *typeRepr =
4324-
cast<LifetimeDependentReturnTypeRepr>(decl->getResultTypeRepr());
4324+
cast<LifetimeDependentTypeRepr>(decl->getResultTypeRepr());
43254325
for (auto &dep : typeRepr->getLifetimeDependencies()) {
43264326
Printer << dep.getLifetimeDependenceSpecifierString() << " ";
43274327
}

lib/AST/ASTWalker.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,8 +2385,7 @@ bool Traversal::visitSILBoxTypeRepr(SILBoxTypeRepr *T) {
23852385
return false;
23862386
}
23872387

2388-
bool Traversal::visitLifetimeDependentReturnTypeRepr(
2389-
LifetimeDependentReturnTypeRepr *T) {
2388+
bool Traversal::visitLifetimeDependentTypeRepr(LifetimeDependentTypeRepr *T) {
23902389
return doIt(T->getBase());
23912390
}
23922391

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10794,7 +10794,7 @@ bool ConstructorDecl::isObjCZeroParameterWithLongSelector() const {
1079410794
}
1079510795

1079610796
bool ConstructorDecl::hasLifetimeDependentReturn() const {
10797-
return isa_and_nonnull<LifetimeDependentReturnTypeRepr>(getResultTypeRepr());
10797+
return isa_and_nonnull<LifetimeDependentTypeRepr>(getResultTypeRepr());
1079810798
}
1079910799

1080010800
DestructorDecl::DestructorDecl(SourceLoc DestructorLoc, DeclContext *Parent)

lib/AST/LifetimeDependence.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ LifetimeDependenceInfo::fromTypeRepr(AbstractFunctionDecl *afd) {
193193
? (afd->getParameters()->size() + 1)
194194
: afd->getParameters()->size();
195195
auto lifetimeDependentRepr =
196-
cast<LifetimeDependentReturnTypeRepr>(afd->getResultTypeRepr());
196+
cast<LifetimeDependentTypeRepr>(afd->getResultTypeRepr());
197197

198198
if (hasEscapableResultOrYield(afd)) {
199199
diags.diagnose(lifetimeDependentRepr->getLoc(),
@@ -337,7 +337,7 @@ LifetimeDependenceInfo::fromTypeRepr(AbstractFunctionDecl *afd) {
337337
// LifetimeDependenceInfo from the swift decl. Reason for duplicated code is the
338338
// apis on type and ownership is different in SIL compared to Sema.
339339
std::optional<LifetimeDependenceInfo> LifetimeDependenceInfo::fromTypeRepr(
340-
LifetimeDependentReturnTypeRepr *lifetimeDependentRepr,
340+
LifetimeDependentTypeRepr *lifetimeDependentRepr,
341341
SmallVectorImpl<SILParameterInfo> &params, DeclContext *dc) {
342342
auto &ctx = dc->getASTContext();
343343
auto &diags = ctx.Diags;
@@ -530,7 +530,7 @@ std::optional<LifetimeDependenceInfo>
530530
LifetimeDependenceInfo::get(AbstractFunctionDecl *afd) {
531531
assert(isa<FuncDecl>(afd) || isa<ConstructorDecl>(afd));
532532
auto *returnTypeRepr = afd->getResultTypeRepr();
533-
if (isa_and_nonnull<LifetimeDependentReturnTypeRepr>(returnTypeRepr)) {
533+
if (isa_and_nonnull<LifetimeDependentTypeRepr>(returnTypeRepr)) {
534534
return LifetimeDependenceInfo::fromTypeRepr(afd);
535535
}
536536
return LifetimeDependenceInfo::infer(afd);

lib/AST/NameLookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3179,7 +3179,7 @@ directReferencesForTypeRepr(Evaluator &evaluator,
31793179
case TypeReprKind::OpaqueReturn:
31803180
case TypeReprKind::NamedOpaqueReturn:
31813181
case TypeReprKind::Existential:
3182-
case TypeReprKind::LifetimeDependentReturn:
3182+
case TypeReprKind::LifetimeDependent:
31833183
case TypeReprKind::Sending:
31843184
return result;
31853185

lib/AST/TypeRepr.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -675,28 +675,28 @@ SourceLoc SILBoxTypeRepr::getLocImpl() const {
675675
return LBraceLoc;
676676
}
677677

678-
LifetimeDependentReturnTypeRepr *LifetimeDependentReturnTypeRepr::create(
678+
LifetimeDependentTypeRepr *LifetimeDependentTypeRepr::create(
679679
ASTContext &C, TypeRepr *base,
680680
ArrayRef<LifetimeDependenceSpecifier> specifiers) {
681681
auto size = totalSizeToAlloc<LifetimeDependenceSpecifier>(specifiers.size());
682682
auto mem = C.Allocate(size, alignof(LifetimeDependenceSpecifier));
683-
return new (mem) LifetimeDependentReturnTypeRepr(base, specifiers);
683+
return new (mem) LifetimeDependentTypeRepr(base, specifiers);
684684
}
685685

686-
SourceLoc LifetimeDependentReturnTypeRepr::getStartLocImpl() const {
686+
SourceLoc LifetimeDependentTypeRepr::getStartLocImpl() const {
687687
return getLifetimeDependencies().front().getLoc();
688688
}
689689

690-
SourceLoc LifetimeDependentReturnTypeRepr::getEndLocImpl() const {
690+
SourceLoc LifetimeDependentTypeRepr::getEndLocImpl() const {
691691
return getLifetimeDependencies().back().getLoc();
692692
}
693693

694-
SourceLoc LifetimeDependentReturnTypeRepr::getLocImpl() const {
694+
SourceLoc LifetimeDependentTypeRepr::getLocImpl() const {
695695
return getBase()->getLoc();
696696
}
697697

698-
void LifetimeDependentReturnTypeRepr::printImpl(
699-
ASTPrinter &Printer, const PrintOptions &Opts) const {
698+
void LifetimeDependentTypeRepr::printImpl(ASTPrinter &Printer,
699+
const PrintOptions &Opts) const {
700700
Printer << " ";
701701
for (auto &dep : getLifetimeDependencies()) {
702702
Printer << dep.getLifetimeDependenceSpecifierString() << " ";

lib/ClangImporter/ImportDecl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3657,7 +3657,7 @@ namespace {
36573657
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
36583658
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
36593659
/*ThrownType=*/TypeLoc(), bodyParams, genericParams, dc,
3660-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
3660+
/*LifetimeDependentTypeRepr*/ nullptr);
36613661
} else {
36623662
auto resultTy = importedType.getType();
36633663

@@ -6247,12 +6247,12 @@ Decl *SwiftDeclConverter::importGlobalAsInitializer(
62476247
}
62486248

62496249
auto result = Impl.createDeclWithClangNode<ConstructorDecl>(
6250-
decl, AccessLevel::Public, name, /*NameLoc=*/SourceLoc(),
6251-
failable, /*FailabilityLoc=*/SourceLoc(),
6250+
decl, AccessLevel::Public, name, /*NameLoc=*/SourceLoc(), failable,
6251+
/*FailabilityLoc=*/SourceLoc(),
62526252
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
62536253
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(), /*ThrownType=*/TypeLoc(),
62546254
parameterList, /*GenericParams=*/nullptr, dc,
6255-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
6255+
/*LifetimeDependentTypeRepr*/ nullptr);
62566256
result->setImplicitlyUnwrappedOptional(isIUO);
62576257
result->getASTContext().evaluator.cacheOutput(InitKindRequest{result},
62586258
std::move(initKind));
@@ -6767,7 +6767,7 @@ ConstructorDecl *SwiftDeclConverter::importConstructor(
67676767
/*Throws=*/importedName.getErrorInfo().has_value(),
67686768
/*ThrowsLoc=*/SourceLoc(), /*ThrownType=*/TypeLoc(), bodyParams,
67696769
/*GenericParams=*/nullptr, const_cast<DeclContext *>(dc),
6770-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
6770+
/*LifetimeDependentTypeRepr*/ nullptr);
67716771

67726772
addObjCAttribute(result, selector);
67736773
recordMemberInContext(dc, result);

lib/ClangImporter/SwiftDeclSynthesizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ SwiftDeclSynthesizer::createDefaultConstructor(NominalTypeDecl *structDecl) {
495495
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
496496
/*ThrownType=*/TypeLoc(), emptyPL,
497497
/*GenericParams=*/nullptr, structDecl,
498-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
498+
/*LifetimeDependentTypeRepr*/ nullptr);
499499

500500
constructor->setAccess(AccessLevel::Public);
501501

@@ -626,7 +626,7 @@ ConstructorDecl *SwiftDeclSynthesizer::createValueConstructor(
626626
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
627627
/*ThrownType=*/TypeLoc(), paramList,
628628
/*GenericParams=*/nullptr, structDecl,
629-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
629+
/*LifetimeDependentTypeRepr*/ nullptr);
630630

631631
constructor->setAccess(AccessLevel::Public);
632632

@@ -1274,7 +1274,7 @@ SwiftDeclSynthesizer::makeEnumRawValueConstructor(EnumDecl *enumDecl) {
12741274
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
12751275
/*ThrownType=*/TypeLoc(), paramPL,
12761276
/*GenericParams=*/nullptr, enumDecl,
1277-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
1277+
/*LifetimeDependentTypeRepr*/ nullptr);
12781278
ctorDecl->setImplicit();
12791279
ctorDecl->setAccess(AccessLevel::Public);
12801280
ctorDecl->setBodySynthesizer(synthesizeEnumRawValueConstructorBody, enumDecl);

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9941,7 +9941,7 @@ Parser::parseDeclInit(ParseDeclOptions Flags, DeclAttributes &Attributes) {
99419941
}
99429942

99439943
if (auto *lifetimeTyR =
9944-
dyn_cast_or_null<LifetimeDependentReturnTypeRepr>(FuncRetTy)) {
9944+
dyn_cast_or_null<LifetimeDependentTypeRepr>(FuncRetTy)) {
99459945
auto *base = lifetimeTyR->getBase();
99469946

99479947
auto isOptionalSimpleUnqualifiedIdentifier = [](TypeRepr *typeRepr,

lib/Parse/ParseType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ Parser::ParsedTypeAttributeList::applyAttributesToType(Parser &p,
5959
}
6060

6161
if (!lifetimeDependenceSpecifiers.empty()) {
62-
ty = LifetimeDependentReturnTypeRepr::create(p.Context, ty,
63-
lifetimeDependenceSpecifiers);
62+
ty = LifetimeDependentTypeRepr::create(p.Context, ty,
63+
lifetimeDependenceSpecifiers);
6464
}
6565
return ty;
6666
}

lib/Sema/CodeSynthesis.cpp

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,13 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
325325

326326
// Create the constructor.
327327
DeclName name(ctx, DeclBaseName::createConstructor(), paramList);
328-
auto *ctor =
329-
new (ctx) ConstructorDecl(name, Loc,
330-
/*Failable=*/false, /*FailabilityLoc=*/SourceLoc(),
331-
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
332-
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
333-
/*ThrownType=*/TypeLoc(),
334-
paramList, /*GenericParams=*/nullptr, decl,
335-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
328+
auto *ctor = new (ctx) ConstructorDecl(
329+
name, Loc,
330+
/*Failable=*/false, /*FailabilityLoc=*/SourceLoc(),
331+
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
332+
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
333+
/*ThrownType=*/TypeLoc(), paramList, /*GenericParams=*/nullptr, decl,
334+
/*LifetimeDependentTypeRepr*/ nullptr);
336335

337336
// Mark implicit.
338337
ctor->setImplicit();
@@ -819,18 +818,16 @@ createDesignatedInitOverride(ClassDecl *classDecl,
819818
// Create the initializer declaration, inheriting the name,
820819
// failability, and throws from the superclass initializer.
821820
auto implCtx = classDecl->getImplementationContext()->getAsGenericContext();
822-
auto ctor =
823-
new (ctx) ConstructorDecl(superclassCtor->getName(),
824-
classDecl->getBraces().Start,
825-
superclassCtor->isFailable(),
826-
/*FailabilityLoc=*/SourceLoc(),
827-
/*Async=*/superclassCtor->hasAsync(),
828-
/*AsyncLoc=*/SourceLoc(),
829-
/*Throws=*/superclassCtor->hasThrows(),
830-
/*ThrowsLoc=*/SourceLoc(),
831-
TypeLoc::withoutLoc(thrownType),
832-
bodyParams, genericParams, implCtx,
833-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
821+
auto ctor = new (ctx) ConstructorDecl(
822+
superclassCtor->getName(), classDecl->getBraces().Start,
823+
superclassCtor->isFailable(),
824+
/*FailabilityLoc=*/SourceLoc(),
825+
/*Async=*/superclassCtor->hasAsync(),
826+
/*AsyncLoc=*/SourceLoc(),
827+
/*Throws=*/superclassCtor->hasThrows(),
828+
/*ThrowsLoc=*/SourceLoc(), TypeLoc::withoutLoc(thrownType), bodyParams,
829+
genericParams, implCtx,
830+
/*LifetimeDependentTypeRepr*/ nullptr);
834831

835832
ctor->setImplicit();
836833

lib/Sema/DerivedConformanceCodable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ static ValueDecl *deriveDecodable_init(DerivedConformance &derived) {
18901890
/*Throws=*/true, SourceLoc(),
18911891
/*ThrownType=*/TypeLoc(), paramList,
18921892
/*GenericParams=*/nullptr, conformanceDC,
1893-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
1893+
/*LifetimeDependentTypeRepr*/ nullptr);
18941894
initDecl->setImplicit();
18951895
initDecl->setSynthesized();
18961896

lib/Sema/DerivedConformanceCodingKey.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ static ValueDecl *deriveInitDecl(DerivedConformance &derived, Type paramType,
127127

128128
// init(rawValue:) decl
129129
auto *initDecl =
130-
new (C) ConstructorDecl(name, SourceLoc(),
131-
/*Failable=*/true, /*FailabilityLoc=*/SourceLoc(),
132-
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
133-
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
134-
/*ThrownType=*/TypeLoc(),
135-
paramList,
136-
/*GenericParams=*/nullptr, parentDC,
137-
/*LifetimeDependentReturnTypeRepr*/ nullptr);
130+
new (C) ConstructorDecl(name, SourceLoc(),
131+
/*Failable=*/true, /*FailabilityLoc=*/SourceLoc(),
132+
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
133+
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
134+
/*ThrownType=*/TypeLoc(), paramList,
135+
/*GenericParams=*/nullptr, parentDC,
136+
/*LifetimeDependentTypeRepr*/ nullptr);
138137

139138
initDecl->setImplicit();
140139

0 commit comments

Comments
 (0)