aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/warn-retain-cycle.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/warn-retain-cycle.m')
-rw-r--r--test/SemaObjC/warn-retain-cycle.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaObjC/warn-retain-cycle.m b/test/SemaObjC/warn-retain-cycle.m
index 00fd234a0c..44d450a310 100644
--- a/test/SemaObjC/warn-retain-cycle.m
+++ b/test/SemaObjC/warn-retain-cycle.m
@@ -24,6 +24,10 @@ void test0(Test0 *x) {
[weakx addBlock: ^{ [x actNow]; }];
[weakx setBlock: ^{ [x actNow]; }];
weakx.block = ^{ [x actNow]; };
+
+ // rdar://11702054
+ x.block = ^{ (void)x.actNow; }; // expected-warning {{capturing 'x' strongly in this block is likely to lead to a retain cycle}} \
+ // expected-note {{block will be retained by the captured object}}
}
@interface BlockOwner