Home | History | Annotate | Download | only in Rewriter
      1 // RUN: %clang_cc1 -E %s -o %t.mm
      2 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp
      3 // RUN: FileCheck --input-file=%t-rw.cpp %s
      4 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
      5 // radar 11474836
      6 
      7 extern "C"
      8 void *sel_registerName(const char *);
      9 
     10 @interface I
     11 {
     12   id ivar;
     13 }
     14 - (id) Meth;
     15 + (id) MyAlloc;;
     16 @end
     17 
     18 @implementation I
     19 - (id) Meth {
     20    @autoreleasepool {
     21       id p = [I MyAlloc];
     22       if (!p)
     23         return ivar;
     24    }
     25   return 0;
     26 }
     27 + (id) MyAlloc {
     28     return 0;
     29 }
     30 @end
     31 
     32 // CHECK: /* @autoreleasepool */ { __AtAutoreleasePool __autoreleasepool;
     33