File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ class TextNodeDumper
352
352
void VisitEnumConstantDecl (const EnumConstantDecl *D);
353
353
void VisitIndirectFieldDecl (const IndirectFieldDecl *D);
354
354
void VisitFunctionDecl (const FunctionDecl *D);
355
+ void VisitCXXDeductionGuideDecl (const CXXDeductionGuideDecl *D);
355
356
void VisitFieldDecl (const FieldDecl *D);
356
357
void VisitVarDecl (const VarDecl *D);
357
358
void VisitBindingDecl (const BindingDecl *D);
Original file line number Diff line number Diff line change @@ -1990,6 +1990,19 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) {
1990
1990
}
1991
1991
}
1992
1992
1993
+ void TextNodeDumper::VisitCXXDeductionGuideDecl (
1994
+ const CXXDeductionGuideDecl *D) {
1995
+ VisitFunctionDecl (D);
1996
+ switch (D->getDeductionCandidateKind ()) {
1997
+ case DeductionCandidate::Normal:
1998
+ case DeductionCandidate::Copy:
1999
+ return ;
2000
+ case DeductionCandidate::Aggregate:
2001
+ OS << " aggregate " ;
2002
+ break ;
2003
+ }
2004
+ }
2005
+
1993
2006
void TextNodeDumper::VisitLifetimeExtendedTemporaryDecl (
1994
2007
const LifetimeExtendedTemporaryDecl *D) {
1995
2008
OS << " extended by " ;
Original file line number Diff line number Diff line change @@ -239,3 +239,12 @@ F s(0);
239
239
// CHECK: |-InjectedClassNameType {{.*}} 'F<>' dependent
240
240
// CHECK: | `-CXXRecord {{.*}} 'F'
241
241
// CHECK: `-TemplateTypeParmType {{.*}} 'type-parameter-0-1' dependent depth 0 index 1
242
+
243
+ template <typename T>
244
+ struct G { T t; };
245
+
246
+ G g = {1 };
247
+ // CHECK-LABEL: Dumping <deduction guide for G>:
248
+ // CHECK: FunctionTemplateDecl
249
+ // CHECK: |-CXXDeductionGuideDecl {{.*}} implicit <deduction guide for G> 'auto (T) -> G<T>' aggregate
250
+ // CHECK: `-CXXDeductionGuideDecl {{.*}} implicit used <deduction guide for G> 'auto (int) -> G<int>' implicit_instantiation aggregate
You can’t perform that action at this time.
0 commit comments