diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 8a86f2a57484..621c7a5e7eb9 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1373,24 +1373,24 @@ void StmtPrinter::VisitInitListExpr(InitListExpr* Node) { return; } - OS << "{ "; + OS << "{"; for (unsigned i = 0, e = Node->getNumInits(); i != e; ++i) { if (i) OS << ", "; if (Node->getInit(i)) PrintExpr(Node->getInit(i)); else - OS << "0"; + OS << "{}"; } - OS << " }"; + OS << "}"; } void StmtPrinter::VisitParenListExpr(ParenListExpr* Node) { - OS << "( "; + OS << "("; for (unsigned i = 0, e = Node->getNumExprs(); i != e; ++i) { if (i) OS << ", "; PrintExpr(Node->getExpr(i)); } - OS << " )"; + OS << ")"; } void StmtPrinter::VisitDesignatedInitExpr(DesignatedInitExpr *Node) { @@ -1877,7 +1877,7 @@ void StmtPrinter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) { void StmtPrinter::VisitCXXConstructExpr(CXXConstructExpr *E) { if (E->isListInitialization()) - OS << "{ "; + OS << "{"; for (unsigned i = 0, e = E->getNumArgs(); i != e; ++i) { if (isa(E->getArg(i))) { @@ -1890,7 +1890,7 @@ void StmtPrinter::VisitCXXConstructExpr(CXXConstructExpr *E) { } if (E->isListInitialization()) - OS << " }"; + OS << "}"; } void StmtPrinter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) { diff --git a/clang/test/PCH/cxx11-lambdas.mm b/clang/test/PCH/cxx11-lambdas.mm index c4550517bb1e..5d3323a02cff 100644 --- a/clang/test/PCH/cxx11-lambdas.mm +++ b/clang/test/PCH/cxx11-lambdas.mm @@ -52,6 +52,6 @@ int add(int x, int y) { // CHECK-PRINT: lambda = [&] (int z) // CHECK-PRINT: init_capture -// CHECK-PRINT: [&, x( t )] +// CHECK-PRINT: [&, x(t)] #endif diff --git a/clang/test/PCH/cxx1y-lambdas.mm b/clang/test/PCH/cxx1y-lambdas.mm index becf6cb64222..1cd270661ad5 100644 --- a/clang/test/PCH/cxx1y-lambdas.mm +++ b/clang/test/PCH/cxx1y-lambdas.mm @@ -53,6 +53,6 @@ int add(int x, int y) { // CHECK-PRINT: lambda = [] (type-parameter-0-0 z // CHECK-PRINT: init_capture -// CHECK-PRINT: [&, x( t )] +// CHECK-PRINT: [&, x(t)] #endif diff --git a/clang/test/SemaCXX/ast-print.cpp b/clang/test/SemaCXX/ast-print.cpp index b0bf245e5cb0..1b57406a64f1 100644 --- a/clang/test/SemaCXX/ast-print.cpp +++ b/clang/test/SemaCXX/ast-print.cpp @@ -53,7 +53,7 @@ void test6() { test6fn((int&)y); } -// CHECK: S s( 1, 2 ); +// CHECK: S s(1, 2); template void test7() { @@ -214,7 +214,7 @@ namespace { struct [[gnu::visibility("hidden")]] S; } -// CHECK: struct CXXFunctionalCastExprPrint fce = CXXFunctionalCastExprPrint{ }; +// CHECK: struct CXXFunctionalCastExprPrint fce = CXXFunctionalCastExprPrint{}; struct CXXFunctionalCastExprPrint {} fce = CXXFunctionalCastExprPrint{}; // CHECK: struct CXXTemporaryObjectExprPrint toe = CXXTemporaryObjectExprPrint{};