Home | History | Annotate | Download | only in Rewriter
      1 // RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc %s -o %t-rw.cpp
      2 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
      3 // rdar://10803676
      4 
      5 extern "C" void *sel_registerName(const char *);
      6 @class NSString;
      7 
      8 @interface NSNumber
      9 + (NSNumber *)numberWithChar:(char)value;
     10 + (NSNumber *)numberWithInt:(int)value;
     11 @end
     12 
     13 typedef unsigned long NSUInteger;
     14 
     15 @interface NSArray 
     16 + (id)arrayWithObjects:(const id [])objects count:(NSUInteger)cnt;
     17 @end
     18 
     19 int i;
     20 int main() {
     21   NSArray *array = @[ @"Hello", @1234 ];
     22   if (i) {
     23     NSArray *array = @[ @"Hello", @1234 ];
     24   }
     25   NSArray *array1 = @[ @"Hello", @1234, @[ @"Hello", @1234 ] ];
     26 }
     27 
     28