forked from OSchip/llvm-project
[ASTDump] Mark BlockDecls which capture this with a tag
Summary: Removal of the child node makes it easier to separate traversal from output generation. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56752 llvm-svn: 351600
This commit is contained in:
parent
96e4701401
commit
5110ebd9fe
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue