1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc// RUN: cp %s %t 3*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -fsyntax-only -fixit -x objective-c %t 4*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x objective-c %t 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuctypedef unsigned char BOOL; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@interface NSObject 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@interface NSNumber : NSObject 12*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithChar:(char)value; 13*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithUnsignedChar:(unsigned char)value; 14*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithShort:(short)value; 15*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithUnsignedShort:(unsigned short)value; 16*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithInt:(int)value; 17*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithUnsignedInt:(unsigned int)value; 18*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithLong:(long)value; 19*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithUnsignedLong:(unsigned long)value; 20*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithLongLong:(long long)value; 21*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value; 22*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithFloat:(float)value; 23*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithDouble:(double)value; 24*f4a2713aSLionel Sambuc+ (NSNumber *)numberWithBool:(BOOL)value; 25*f4a2713aSLionel Sambuc@end 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc@interface NSArray : NSObject 28*f4a2713aSLionel Sambuc+ (id)arrayWithObjects:(const id [])objects count:(unsigned long)cnt; 29*f4a2713aSLionel Sambuc@end 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc@interface NSDictionary : NSObject 32*f4a2713aSLionel Sambuc+ (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt; 33*f4a2713aSLionel Sambuc@end 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc@interface NSString : NSObject 36*f4a2713aSLionel Sambuc@end 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambucvoid fixes() { 39*f4a2713aSLionel Sambuc id arr = @[ 40*f4a2713aSLionel Sambuc 17, // expected-error{{numeric literal must be prefixed by '@' in a collection}} 41*f4a2713aSLionel Sambuc 'a', // expected-error{{character literal must be prefixed by '@'}} 42*f4a2713aSLionel Sambuc "blah" // expected-error{{string literal must be prefixed by '@'}} 43*f4a2713aSLionel Sambuc ]; 44*f4a2713aSLionel Sambuc} 45