Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always executed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60593 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Rewriter/finally.m b/test/Rewriter/finally.m
new file mode 100644
index 0000000..903cdec
--- /dev/null
+++ b/test/Rewriter/finally.m
@@ -0,0 +1,26 @@
+// RUN: clang -rewrite-objc -verify %s -o -
+
+int main() {
+  @try {
+    printf("executing try");
+    return(0); // expected-warning{{rewriter doesn't support user-specified control flow semantics for @try/@finally (code may not execute properly)}}
+  } @finally {
+    printf("executing finally");
+  }
+  while (1) {
+    @try {
+      printf("executing try");
+      break; // expected-warning{{rewriter doesn't support user-specified control flow semantics for @try/@finally (code may not execute properly)}}
+    } @finally {
+      printf("executing finally");
+    }
+    printf("executing after finally block");
+  }
+  @try {
+    printf("executing try");
+  } @finally {
+    printf("executing finally");
+  }
+  return 0;
+}
+