r351350 - Added a test case for dumping blocks that capture 'this'; NFC.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 16 07:40:23 PST 2019
Author: aaronballman
Date: Wed Jan 16 07:40:23 2019
New Revision: 351350
URL: http://llvm.org/viewvc/llvm-project?rev=351350&view=rev
Log:
Added a test case for dumping blocks that capture 'this'; NFC.
Modified:
cfe/trunk/test/AST/ast-dump-decl.mm
Modified: cfe/trunk/test/AST/ast-dump-decl.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/AST/ast-dump-decl.mm?rev=351350&r1=351349&r2=351350&view=diff
==============================================================================
--- cfe/trunk/test/AST/ast-dump-decl.mm (original)
+++ cfe/trunk/test/AST/ast-dump-decl.mm Wed Jan 16 07:40:23 2019
@@ -31,3 +31,20 @@ struct BoxingTest {
};
// CHECK: ObjCBoxedExpr{{.*}} '<dependent type>'{{$}}
+
+struct Test {
+ void f() {
+ ^{ this->yada(); }();
+ // CHECK: ExprWithCleanups {{.*}} <line:[[@LINE-1]]:5, col:24> 'void'
+ // 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: 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
+ // CHECK-NEXT: CXXThisExpr {{.*}} <col:8> 'Test *' this
+ }
+ void yada();
+};
More information about the cfe-commits
mailing list