[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 11:20:52 PDT 2024
================
@@ -261,6 +261,13 @@ AG ag = {1};
// CHECK: | `-BuiltinType {{.*}} 'int'
// CHECK: `-ParmVarDecl {{.*}} 'int'
+template <typename X = int>
+using BG = G<int>;
+BG bg(1.0);
+// CHECK-LABEL: Dumping <deduction guide for BG>
+// CHECK: FunctionTemplateDecl {{.*}} implicit <deduction guide for BG>
+// CHECK: |-CXXDeductionGuideDecl {{.*}} 'auto (int) -> G<int>' aggregate
----------------
mizvekov wrote:
Nit: Since this isn't matching the structure of the AST anyway, it would probably be a good idea to avoid the possibility of unrelated test churn.
```suggestion
// CHECK: CXXDeductionGuideDecl {{.*}} 'auto (int) -> G<int>' aggregate
```
https://github.com/llvm/llvm-project/pull/90894
More information about the cfe-commits
mailing list