Fixup codegen for nested blocks that use copy/dispose in the inner
blocks, so that the outer blocks use it as well. Radar 6762279
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68811 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/blocks-1.c b/test/CodeGen/blocks-1.c
index f2677f3..10498cb 100644
--- a/test/CodeGen/blocks-1.c
+++ b/test/CodeGen/blocks-1.c
@@ -1,11 +1,11 @@
// RUN: clang-cc %s -emit-llvm -o %t -fblocks &&
-// RUN: grep "_Block_object_dispose" %t | count 15 &&
-// RUN: grep "__copy_helper_block_" %t | count 12 &&
-// RUN: grep "__destroy_helper_block_" %t | count 12 &&
+// RUN: grep "_Block_object_dispose" %t | count 17 &&
+// RUN: grep "__copy_helper_block_" %t | count 16 &&
+// RUN: grep "__destroy_helper_block_" %t | count 16 &&
// RUN: grep "__Block_byref_id_object_copy_" %t | count 2 &&
// RUN: grep "__Block_byref_id_object_dispose_" %t | count 2 &&
// RUN: grep "i32 135)" %t | count 2 &&
-// RUN: grep "_Block_object_assign" %t | count 9
+// RUN: grep "_Block_object_assign" %t | count 10
#include <stdio.h>
@@ -57,7 +57,14 @@
void test6() {
__block int i;
^{ i=1; }();
- ^{};
+ ^{}();
+}
+
+void test7() {
+ ^{
+ __block int i;
+ ^{ i = 1; }();
+ }();
}
int main() {