[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 10:13:03 PDT 2024


================
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F,
 
   for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
     const auto &D = DeduceResults[Index];
-    if (D.isNull())
+    if (D.isNull()) { // non-deduced template parameters of f
+      auto TP = F->getTemplateParameters()->getParam(Index);
----------------
mizvekov wrote:

Small nit:
```suggestion
      NamedDecl *TP = F->getTemplateParameters()->getParam(Index);
```

https://github.com/llvm/llvm-project/pull/93533


More information about the cfe-commits mailing list