Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Rewriter / rewrite-modern-container-literal.mm
blob4c1c90cb19e7e64550096d9358bd544b13a50f46
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
4 void *sel_registerName(const char *);
5 typedef unsigned long NSUInteger;
6 typedef long NSInteger;
7 typedef bool BOOL;
9 @interface NSNumber
10 + (NSNumber *)numberWithChar:(char)value;
11 + (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
12 + (NSNumber *)numberWithShort:(short)value;
13 + (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
14 + (NSNumber *)numberWithInt:(int)value;
15 + (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
16 + (NSNumber *)numberWithLong:(long)value;
17 + (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
18 + (NSNumber *)numberWithLongLong:(long long)value;
19 + (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
20 + (NSNumber *)numberWithFloat:(float)value;
21 + (NSNumber *)numberWithDouble:(double)value;
22 + (NSNumber *)numberWithBool:(BOOL)value;
23 + (NSNumber *)numberWithInteger:(NSInteger)value ;
24 + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value ;
25 @end
27 @protocol NSCopying @end
29 @interface NSDictionary
30 + (id)dictionaryWithObjects:(const id [])objects forKeys:(const id <NSCopying> [])keys count:(NSUInteger)cnt;
31 @end
33 @interface NSArray 
34 + (id)arrayWithObjects:(const id [])objects count:(NSUInteger)cnt;
35 @end
37 @interface NSString<NSCopying>
38 @end
40 id NSUserName();
42 @interface NSDate
43 + (id)date;
44 @end
46 int main() {
47 NSArray *array = @[ @"Hello", NSUserName(), [NSDate date], [NSNumber numberWithInt:42]];
49 NSDictionary *dictionary = @{ @"name" : NSUserName(), @"date" : [NSDate date], @"process" : @"processInfo"};
51 NSDictionary *dict = @{ @"name":@666, @"man":@__objc_yes, @"date":@1.3 };