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 // DISABLE: mingw32 5 6 @interface NSAutoreleasePool 7 - drain; 8 +new; 9 +alloc; 10 -init; 11 -autorelease; 12 -release; 13 @end 14 15 void NSLog(id, ...); 16 17 int main (int argc, const char * argv[]) { 18 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 19 NSAutoreleasePool *chunkPool = [[NSAutoreleasePool alloc] init]; 20 21 while (argc) { 22 [chunkPool release]; 23 return 0; 24 } 25 26 [chunkPool drain]; 27 [pool drain]; 28 29 return 0; 30 } 31