diff options
-rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 6 | ||||
-rw-r--r-- | clang/test/AST/ast-dump-decl.mm | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index b99ed3b286b..e2390baa7a4 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -1379,12 +1379,12 @@ void ASTDumper::VisitBlockDecl(const BlockDecl *D) { if (D->isVariadic()) OS << " variadic"; + if (D->capturesCXXThis()) + OS << " captures_this"; + for (auto I : D->parameters()) dumpDecl(I); - if (D->capturesCXXThis()) - dumpChild([=]{ OS << "capture this"; }); - for (const auto &I : D->captures()) Visit(I); dumpStmt(D->getBody()); diff --git a/clang/test/AST/ast-dump-decl.mm b/clang/test/AST/ast-dump-decl.mm index d18e56c939d..efe356886a9 100644 --- a/clang/test/AST/ast-dump-decl.mm +++ b/clang/test/AST/ast-dump-decl.mm @@ -39,8 +39,7 @@ struct Test { // CHECK-NEXT: cleanup Block // CHECK-NEXT: CallExpr {{.*}} <col:5, col:24> 'void' // CHECK-NEXT: BlockExpr {{.*}} <col:5, col:22> 'void (^)()' - // CHECK-NEXT: BlockDecl {{.*}} <col:5, col:22> col:5 - // CHECK-NEXT: capture this + // CHECK-NEXT: BlockDecl {{.*}} <col:5, col:22> col:5 captures_this // CHECK-NEXT: CompoundStmt {{.*}} <col:6, col:22> // CHECK-NEXT: CXXMemberCallExpr {{.*}} <col:8, col:19> 'void' // CHECK-NEXT: MemberExpr {{.*}} <col:8, col:14> '<bound member function type>' ->yada |