27 lines · plain
1// RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc %s -o %t-rw.cpp2// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3 4extern "C" void *sel_registerName(const char *);5@class NSString;6 7@interface NSNumber8+ (NSNumber *)numberWithChar:(char)value;9+ (NSNumber *)numberWithInt:(int)value;10@end11 12typedef unsigned long NSUInteger;13 14@interface NSArray 15+ (id)arrayWithObjects:(const id [])objects count:(NSUInteger)cnt;16@end17 18int i;19int main() {20 NSArray *array = @[ @"Hello", @1234 ];21 if (i) {22 NSArray *array = @[ @"Hello", @1234 ];23 }24 NSArray *array1 = @[ @"Hello", @1234, @[ @"Hello", @1234 ] ];25}26 27