aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/blocks.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Analysis/blocks.m b/test/Analysis/blocks.m
index e8e96a22cf..b05b198c54 100644
--- a/test/Analysis/blocks.m
+++ b/test/Analysis/blocks.m
@@ -83,3 +83,8 @@ void test2_b() {
// 'x' is bound at block creation.
^{ y = x + 1; }(); // no-warning
}
+
+void test2_c() {
+ typedef void (^myblock)(void);
+ myblock f = ^() { f(); }; // expected-warning{{Variable 'f' is captured by block with a garbage value}}
+} \ No newline at end of file