[PATCH] D56752: [ASTDump] Mark BlockDecls which capture this with a tag

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 18 13:59:18 PST 2019


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());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56752.182602.patch
Type: text/x-patch
Size: 1332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190118/6e3f935c/attachment.bin>


More information about the cfe-commits mailing list