summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2019-01-16 15:40:23 +0000
committerAaron Ballman <aaron@aaronballman.com>2019-01-16 15:40:23 +0000
commitce0fd1db6446654d316f2878e2200f83bba7ee31 (patch)
tree2455612904c1775a036b3185ac4a2efbb3883f4c /clang/test
parent18809a6bbbc778c2ba2874192413bfb3518e937d (diff)
downloadbcm5719-llvm-ce0fd1db6446654d316f2878e2200f83bba7ee31.tar.gz
bcm5719-llvm-ce0fd1db6446654d316f2878e2200f83bba7ee31.zip
Added a test case for dumping blocks that capture 'this'; NFC.
llvm-svn: 351350
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/AST/ast-dump-decl.mm17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/AST/ast-dump-decl.mm b/clang/test/AST/ast-dump-decl.mm
index be245f7ef5c..d18e56c939d 100644
--- a/clang/test/AST/ast-dump-decl.mm
+++ b/clang/test/AST/ast-dump-decl.mm
@@ -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();
+};
OpenPOWER on IntegriCloud