Home | History | Annotate | Download | only in ARCMT
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
      2 // RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
      3 // RUN: diff %t %s.result
      4 
      5 @interface NSAutoreleasePool
      6 - drain;
      7 +new;
      8 +alloc;
      9 -init;
     10 -autorelease;
     11 -release;
     12 @end
     13 
     14 void NSLog(id, ...);
     15 
     16 int main (int argc, const char * argv[]) {
     17     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
     18     NSAutoreleasePool *chunkPool = [[NSAutoreleasePool alloc] init];
     19 
     20     while (argc) {
     21       [chunkPool release];
     22       return 0;
     23     }
     24 
     25     [chunkPool drain];
     26     [pool drain];
     27 
     28     return 0;
     29 }
     30