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 @interface NSAutoreleasePool
      6 - drain;
      7 +new;
      8 +alloc;
      9 -init;
     10 -autorelease;
     11 - release;
     12 @end
     13 
     14 void NSLog(id, ...);
     15 
     16 void test1(int x) {
     17   // All this stuff get removed since nothing is happening inside.
     18 }
     19 
     20 void test2(int x) {
     21   @autoreleasepool {
     22     @autoreleasepool {
     23       while (x) {
     24         @autoreleasepool {
     25           ++x;
     26         }
     27       }
     28 
     29     }
     30   }
     31 }
     32