================
@@ -11757,6 +11791,42 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl 
*Found, Decl *Templated,
       return;
     }
 
+    // Errors in deduction guides from inherited constructors
+    // will manifest as substitution failures in the return type
+    // partial specialization, so we show a generic diagnostic
+    // in this case.
+    if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(Templated);
----------------
AaronBallman wrote:

```suggestion
    if (const auto *DG = dyn_cast<CXXDeductionGuideDecl>(Templated);
```
and handle const correctness further down as well.

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