Home | History | Annotate | Download | only in ARCMT
      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
      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   [[x retain] release];
     17   return [[x retain] autorelease];
     18 }
     19 
     20 -(void)dealloc
     21 {
     22   id array, array_already_empty;
     23   for (id element in array_already_empty) {
     24   }
     25 
     26   [array release];
     27   ;
     28 
     29   int b, b_array_already_empty;
     30   if (b)
     31     [array release];
     32   if (b_array_already_empty) ;
     33 
     34   if (b) {
     35     [array release];
     36   }
     37   if (b_array_already_empty) {
     38   }
     39 
     40   if (b)
     41     MY_MACRO1(array);
     42   if (b)
     43     MY_MACRO2(array);
     44 }
     45 @end
     46