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 void test1(int x) { 18 // All this stuff get removed since nothing is happening inside. 19 } 20 21 void test2(int x) { 22 @autoreleasepool { 23 @autoreleasepool { 24 while (x) { 25 @autoreleasepool { 26 ++x; 27 } 28 } 29 30 } 31 } 32 } 33