Out << "virtual ";
AccessSpecifier AS = Base->getAccessSpecifierAsWritten();
- if (AS != AS_none)
+ if (AS != AS_none) {
Print(AS);
- Out << " " << Base->getType().getAsString(Policy);
+ Out << " ";
+ }
+ Out << Base->getType().getAsString(Policy);
if (Base->isPackExpansion())
Out << "...";
"class Z { int a; };"
"class A : Z { int b; };",
"A",
- "class A : Z {\n}"));
- // Should be: with semicolon, with { ... }, without two spaces
+ "class A : Z {\n}"));
+ // Should be: with semicolon, with { ... }
}
TEST(DeclPrinter, TestCXXRecordDecl5) {
"struct Z { int a; };"
"struct A : Z { int b; };",
"A",
- "struct A : Z {\n}"));
- // Should be: with semicolon, with { ... }, without two spaces
+ "struct A : Z {\n}"));
+ // Should be: with semicolon, with { ... }
}
TEST(DeclPrinter, TestCXXRecordDecl6) {
"class Z { int a; };"
"class A : virtual Z { int b; };",
"A",
- "class A : virtual Z {\n}"));
- // Should be: with semicolon, with { ... }, without two spaces
+ "class A : virtual Z {\n}"));
+ // Should be: with semicolon, with { ... }
}
TEST(DeclPrinter, TestCXXRecordDecl10) {