[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue May 7 03:37:21 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
----------------
hokein wrote:
> The line is a CHECK, not a CHECK-NEXT, so it could appear any number of lines afterwards.
Yeah, ideally it should be `CHECK-NEXT`, but we can't use it because of the ambiguity in the content of the above line (there are two other deduction guides emitting the same content), so I end up using the `CHECK: |-...`, it at least demonstrates that it is a child of something.
https://github.com/llvm/llvm-project/pull/90894
More information about the cfe-commits
mailing list