commit | b85e77af052ea495aa47edcce3b1ec8887e53873 | [log] [tgz] |
---|---|---|
author | Steve Naroff <snaroff@apple.com> | Sat Dec 05 21:43:12 2009 +0000 |
committer | Steve Naroff <snaroff@apple.com> | Sat Dec 05 21:43:12 2009 +0000 |
tree | 8a5c6632373338aaffbd1a378638072e7aeecf2c | |
parent | bb27d868ac3ca429bfe0f52c5f091f849368fff8 [diff] [blame] |
Integrate the following from the 'objective-rewrite' branch: http://llvm.org/viewvc/llvm-project?view=rev&revision=71225 http://llvm.org/viewvc/llvm-project?view=rev&revision=73207 http://llvm.org/viewvc/llvm-project?view=rev&revision=73414 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90677 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Rewriter/finally.m b/test/Rewriter/finally.m index bdc5a34..05cfc26 100644 --- a/test/Rewriter/finally.m +++ b/test/Rewriter/finally.m
@@ -11,7 +11,7 @@ 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)}} + break; } @finally { printf("executing finally"); } @@ -25,3 +25,18 @@ return 0; } +void test_sync_with_implicit_finally() { + id foo; + @synchronized (foo) { + return; // The rewriter knows how to generate code for implicit finally + } +} + +void test2_try_with_implicit_finally() { + @try { + return; // The rewriter knows how to generate code for implicit finally + } @catch (id e) { + + } +} +