ast-dump: Add missing identation of class template specializations

This commit is contained in:
David Blaikie 2021-11-14 18:59:41 -08:00
parent 400eb59adf
commit 604446aa6b
2 changed files with 3 additions and 2 deletions

View File

@ -1185,6 +1185,7 @@ void DeclPrinter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
if (D->isThisDeclarationADefinition())
Out << ";";
Out << "\n";
Indent();
Visit(I);
}
}

View File

@ -78,7 +78,7 @@ struct foo {
// includes the type for the auto argument and omits it for the fixed
// type/unsigned argument (see
// TemplateParameterList::shouldIncludeTypeForArgument)
// CHECK1: template<> struct foo<0, 0L> {
// CHECK1: {{^ }}template<> struct foo<0, 0L> {
void test() {
foo<0, 0 + 0L>::fn();
}
@ -88,6 +88,6 @@ void test() {
// powered by the shouldIncludeTypeForArgument functionality.
// Not sure if this it's intentional that these two specializations are rendered
// differently in this way.
// CHECK1: template<> struct foo<1, 0 + 0L> {
// CHECK1: {{^ }}template<> struct foo<1, 0 + 0L> {
template struct foo<1, 0 + 0L>;
}