Steve Naroff | 8c56515 | 2008-12-05 17:03:39 +0000 | [diff] [blame] | 1 | // RUN: clang -rewrite-objc -verify %s -o - |
| 2 | |
| 3 | int main() { |
| 4 | @try { |
| 5 | printf("executing try"); |
| 6 | return(0); // expected-warning{{rewriter doesn't support user-specified control flow semantics for @try/@finally (code may not execute properly)}} |
| 7 | } @finally { |
| 8 | printf("executing finally"); |
| 9 | } |
| 10 | while (1) { |
| 11 | @try { |
| 12 | printf("executing try"); |
| 13 | break; // expected-warning{{rewriter doesn't support user-specified control flow semantics for @try/@finally (code may not execute properly)}} |
| 14 | } @finally { |
| 15 | printf("executing finally"); |
| 16 | } |
| 17 | printf("executing after finally block"); |
| 18 | } |
| 19 | @try { |
| 20 | printf("executing try"); |
| 21 | } @finally { |
| 22 | printf("executing finally"); |
| 23 | } |
| 24 | return 0; |
| 25 | } |
| 26 | |