@@ -3792,8 +3792,6 @@ TypeRepr *ValueDecl::getResultTypeRepr() const {
37923792 returnRepr = SD->getElementTypeRepr ();
37933793 } else if (auto *MD = dyn_cast<MacroDecl>(this )) {
37943794 returnRepr = MD->resultType .getTypeRepr ();
3795- } else if (auto *CD = dyn_cast<ConstructorDecl>(this )) {
3796- returnRepr = CD->getResultTypeRepr ();
37973795 }
37983796
37993797 return returnRepr;
@@ -10551,23 +10549,18 @@ bool FuncDecl::isMainTypeMainMethod() const {
1055110549
1055210550ConstructorDecl::ConstructorDecl (DeclName Name, SourceLoc ConstructorLoc,
1055310551 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,
1055710554 ParameterList *BodyParams,
1055810555 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 ) {
1056710561 if (BodyParams)
1056810562 setParameters (BodyParams);
1056910563
10570- InitRetType = TypeLoc (ResultTyR);
1057110564 Bits.ConstructorDecl .HasStubImplementation = 0 ;
1057210565 Bits.ConstructorDecl .Failable = Failable;
1057310566
@@ -10583,21 +10576,14 @@ ConstructorDecl *ConstructorDecl::createImported(
1058310576 GenericParamList *genericParams, DeclContext *parent) {
1058410577 void *declPtr = allocateMemoryForDecl<ConstructorDecl>(
1058510578 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);
1059310583 ctor->setClangNode (clangNode);
1059410584 return ctor;
1059510585}
1059610586
10597- void ConstructorDecl::setDeserializedResultTypeLoc (TypeLoc ResultTyR) {
10598- InitRetType = ResultTyR;
10599- }
10600-
1060110587bool ConstructorDecl::isObjCZeroParameterWithLongSelector () const {
1060210588 // The initializer must have a single, non-empty argument name.
1060310589 if (getName ().getArgumentNames ().size () != 1 ||
0 commit comments