Fix rdar://6257721 by tightening up the block "snapshot" check, and
move it to its own predicate to make it more clear.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57796 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c
index 77de4a6..62b774e 100644
--- a/test/Sema/block-misc.c
+++ b/test/Sema/block-misc.c
@@ -62,3 +62,11 @@
}();
return 0;
}
+
+
+// rdar://6257721 - reference to static/global is byref by default.
+static int test5g;
+void test5() {
+ bar(^{ test5g = 1; });
+}
+