================
@@ -1173,25 +1276,52 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
         NewParam->setScopeInfo(0, I);
         FPTL.setParam(I, NewParam);
       }
-      auto *Transformed = cast<FunctionDecl>(buildDeductionGuide(
-          SemaRef, AliasTemplate, /*TemplateParams=*/nullptr,
+
+      QualType ReturnType =
+          cast<FunctionProtoType>(FunctionType->getType())->getReturnType();
+      if (FromInheritedCtor) {
+        FunctionType = buildInheritedConstructorDeductionGuideType(
+            SemaRef, *FromInheritedCtor, FunctionType);
+        if (!FunctionType)
+          continue;
+        ReturnType = FunctionType->getType()
+                         .getTypePtr()
+                         ->getAs<FunctionProtoType>()
+                         ->getReturnType();
+      }
----------------
antangelo wrote:

I have moved the `ReturnType` logic into 
`buildInheritedConstructorDeductionGuideType` and now return a pair from that 
function.

https://github.com/llvm/llvm-project/pull/98788
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to