This revision was automatically updated to reflect the committed changes. Closed by commit rL351600: [ASTDump] Mark BlockDecls which capture this with a tag (authored by steveire, committed by ). Herald added a subscriber: llvm-commits.
Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56752/new/ https://reviews.llvm.org/D56752 Files: cfe/trunk/lib/AST/ASTDumper.cpp cfe/trunk/test/AST/ast-dump-decl.mm Index: cfe/trunk/test/AST/ast-dump-decl.mm =================================================================== --- cfe/trunk/test/AST/ast-dump-decl.mm +++ cfe/trunk/test/AST/ast-dump-decl.mm @@ -39,8 +39,7 @@ // 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 Index: cfe/trunk/lib/AST/ASTDumper.cpp =================================================================== --- cfe/trunk/lib/AST/ASTDumper.cpp +++ cfe/trunk/lib/AST/ASTDumper.cpp @@ -1379,12 +1379,12 @@ 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());
Index: cfe/trunk/test/AST/ast-dump-decl.mm =================================================================== --- cfe/trunk/test/AST/ast-dump-decl.mm +++ cfe/trunk/test/AST/ast-dump-decl.mm @@ -39,8 +39,7 @@ // 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 Index: cfe/trunk/lib/AST/ASTDumper.cpp =================================================================== --- cfe/trunk/lib/AST/ASTDumper.cpp +++ cfe/trunk/lib/AST/ASTDumper.cpp @@ -1379,12 +1379,12 @@ 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());
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits