1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // RUN: not %clang_cc1 -fsyntax-only -fixit -x objective-c %t
4 // RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x objective-c %t
6 typedef unsigned char BOOL;
11 @interface NSNumber : NSObject
12 + (NSNumber *)numberWithChar:(char)value;
13 + (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
14 + (NSNumber *)numberWithShort:(short)value;
15 + (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
16 + (NSNumber *)numberWithInt:(int)value;
17 + (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
18 + (NSNumber *)numberWithLong:(long)value;
19 + (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
20 + (NSNumber *)numberWithLongLong:(long long)value;
21 + (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
22 + (NSNumber *)numberWithFloat:(float)value;
23 + (NSNumber *)numberWithDouble:(double)value;
24 + (NSNumber *)numberWithBool:(BOOL)value;
27 @interface NSArray : NSObject
28 + (id)arrayWithObjects:(const id [])objects count:(unsigned long)cnt;
31 @interface NSDictionary : NSObject
32 + (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt;
35 @interface NSString : NSObject
40 17, // expected-error{{numeric literal must be prefixed by '@' in a collection}}
41 'a', // expected-error{{character literal must be prefixed by '@'}}
42 "blah" // expected-error{{string literal must be prefixed by '@'}}