John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result |
| 2 | // RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t |
John McCall | 8f0e8d2 | 2011-06-15 23:25:17 +0000 | [diff] [blame] | 3 | // RUN: diff %t %s.result |
| 4 | |
| 5 | #include "Common.h" |
| 6 | |
| 7 | @interface myController : NSObject |
| 8 | -(id)test:(id)x; |
| 9 | @end |
| 10 | |
| 11 | #define MY_MACRO1(x) |
| 12 | #define MY_MACRO2(x) (void)x |
| 13 | |
| 14 | @implementation myController |
| 15 | -(id) test:(id) x { |
| 16 | return x; |
| 17 | } |
| 18 | |
| 19 | -(void)dealloc |
| 20 | { |
| 21 | id array, array_already_empty; |
| 22 | for (id element in array_already_empty) { |
| 23 | } |
| 24 | |
| 25 | ; |
| 26 | |
| 27 | int b, b_array_already_empty; |
| 28 | if (b_array_already_empty) ; |
| 29 | |
| 30 | if (b_array_already_empty) { |
| 31 | } |
| 32 | |
| 33 | if (b) |
| 34 | MY_MACRO1(array); |
| 35 | if (b) |
| 36 | MY_MACRO2(array); |
| 37 | } |
| 38 | @end |