@@ -3792,8 +3792,6 @@ TypeRepr *ValueDecl::getResultTypeRepr() const {
3792
3792
returnRepr = SD->getElementTypeRepr ();
3793
3793
} else if (auto *MD = dyn_cast<MacroDecl>(this )) {
3794
3794
returnRepr = MD->resultType .getTypeRepr ();
3795
- } else if (auto *CD = dyn_cast<ConstructorDecl>(this )) {
3796
- returnRepr = CD->getResultTypeRepr ();
3797
3795
}
3798
3796
3799
3797
return returnRepr;
@@ -10551,23 +10549,18 @@ bool FuncDecl::isMainTypeMainMethod() const {
10551
10549
10552
10550
ConstructorDecl::ConstructorDecl (DeclName Name, SourceLoc ConstructorLoc,
10553
10551
bool Failable, SourceLoc FailabilityLoc,
10554
- bool Async, SourceLoc AsyncLoc,
10555
- bool Throws, SourceLoc ThrowsLoc,
10556
- TypeLoc ThrownType,
10552
+ bool Async, SourceLoc AsyncLoc, bool Throws,
10553
+ SourceLoc ThrowsLoc, TypeLoc ThrownType,
10557
10554
ParameterList *BodyParams,
10558
10555
GenericParamList *GenericParams,
10559
- DeclContext *Parent, TypeRepr *ResultTyR)
10560
- : AbstractFunctionDecl(DeclKind::Constructor, Parent, Name, ConstructorLoc,
10561
- Async, AsyncLoc, Throws, ThrowsLoc, ThrownType,
10562
- /* HasImplicitSelfDecl=*/ true ,
10563
- GenericParams),
10564
- FailabilityLoc(FailabilityLoc),
10565
- SelfDecl(nullptr )
10566
- {
10556
+ DeclContext *Parent)
10557
+ : AbstractFunctionDecl(DeclKind::Constructor, Parent, Name, ConstructorLoc,
10558
+ Async, AsyncLoc, Throws, ThrowsLoc, ThrownType,
10559
+ /* HasImplicitSelfDecl=*/ true , GenericParams),
10560
+ FailabilityLoc(FailabilityLoc), SelfDecl(nullptr ) {
10567
10561
if (BodyParams)
10568
10562
setParameters (BodyParams);
10569
10563
10570
- InitRetType = TypeLoc (ResultTyR);
10571
10564
Bits.ConstructorDecl .HasStubImplementation = 0 ;
10572
10565
Bits.ConstructorDecl .Failable = Failable;
10573
10566
@@ -10583,21 +10576,14 @@ ConstructorDecl *ConstructorDecl::createImported(
10583
10576
GenericParamList *genericParams, DeclContext *parent) {
10584
10577
void *declPtr = allocateMemoryForDecl<ConstructorDecl>(
10585
10578
ctx, sizeof (ConstructorDecl), true );
10586
- auto ctor = ::new (declPtr)
10587
- ConstructorDecl (name, constructorLoc,
10588
- failable, failabilityLoc,
10589
- async, asyncLoc,
10590
- throws, throwsLoc, TypeLoc::withoutLoc (thrownType),
10591
- bodyParams, genericParams, parent,
10592
- /* LifetimeDependenceTypeRepr*/ nullptr );
10579
+ auto ctor = ::new (declPtr) ConstructorDecl (
10580
+ name, constructorLoc, failable, failabilityLoc, async, asyncLoc, throws,
10581
+ throwsLoc, TypeLoc::withoutLoc (thrownType), bodyParams, genericParams,
10582
+ parent);
10593
10583
ctor->setClangNode (clangNode);
10594
10584
return ctor;
10595
10585
}
10596
10586
10597
- void ConstructorDecl::setDeserializedResultTypeLoc (TypeLoc ResultTyR) {
10598
- InitRetType = ResultTyR;
10599
- }
10600
-
10601
10587
bool ConstructorDecl::isObjCZeroParameterWithLongSelector () const {
10602
10588
// The initializer must have a single, non-empty argument name.
10603
10589
if (getName ().getArgumentNames ().size () != 1 ||
0 commit comments