diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
| commit | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (patch) | |
| tree | 2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/Rewriter/finally.m | |
| parent | 1569ce68681d909594d64f9b056d71f5dd7563bf (diff) | |
Notes
Diffstat (limited to 'test/Rewriter/finally.m')
| -rw-r--r-- | test/Rewriter/finally.m | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test/Rewriter/finally.m b/test/Rewriter/finally.m index bdc5a34fdf2d..ae650568abf1 100644 --- a/test/Rewriter/finally.m +++ b/test/Rewriter/finally.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -rewrite-objc -verify %s -o - +// RUN: clang -cc1 -rewrite-objc -verify %s -o - int main() { @try { @@ -11,7 +11,7 @@ int main() { 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 @@ int main() { 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) { + + } +} + |
