Lines Matching refs:NSString
18 @interface NSString : NSObject <NSCopying> interface
21 @interface NSMutableString : NSString
42 @interface NSStringArray : NSArray<NSString *>
147 NSSet<NSString *> *stringSet,
148 NSMutableSet<NSString *> *mutStringSet,
151 MutableSetOfArrays<NSString *> *mutStringArraySet,
155 NSArray<NSString *> *stringArray,
156 NSArray<__kindof NSString *> *kindofStringArray,
159 ip = [stringSet firstObject]; // expected-warning{{from 'NSString *'}}
160 ip = [mutStringSet firstObject]; // expected-warning{{from 'NSString *'}}
163 ip = [mutStringArraySet firstObject]; // expected-warning{{from 'NSArray<NSString *> *'}}
169 ip = [stringSet findObject:@"blah"]; // expected-warning{{from 'NSString *'}}
172 ip = [NSSet<NSString *> alloc]; // expected-warning{{from 'NSSet<NSString *> *'}}
174 …ip = [MutableSetOfArrays<NSString *> alloc]; // expected-warning{{from 'MutableSetOfArrays<NSStrin…
176 ip = [NSArray<NSString *> array]; // expected-warning{{from 'NSArray<NSString *> *'}}
177 ip = [NSArray<NSString *><NSCopying> array]; // expected-warning{{from 'NSArray<NSString *> *'}}
179 …ip = [[NSMutableArray<NSString *> alloc] init]; // expected-warning{{from 'NSMutableArray<NSStrin…
182 [[NSMutableArray<NSString *> alloc] initWithArray: stringArray]; // okay
183 …loc] initWithArray: stringArray]; // expected-warning{{sending 'NSArray<NSString *> *' to paramete…
189 NSNumber *number = kindofStringArray[0]; // expected-warning{{of type '__kindof NSString *'}}
193 NSMutableSet<NSString *> *mutStringSet,
196 MutableSetOfArrays<NSString *> *mutStringArraySet,
199 TypedefTypeParam<NSString *> *typedefTypeParam,
203 [mutStringSet addObject: window]; // expected-warning{{parameter of type 'NSString *'}}
206 …[mutStringArraySet addObject: window]; // expected-warning{{parameter of type 'NSArray<NSString *>…
209 [typedefTypeParam test: window]; // expected-warning{{parameter of type 'NSString *'}}
217 NSSet<NSString *> *stringSet,
218 NSMutableSet<NSString *> *mutStringSet,
221 MutableSetOfArrays<NSString *> *mutStringArraySet,
227 ip = stringSet.allObjects; // expected-warning{{from 'NSArray<NSString *> *'}}
228 ip = mutStringSet.allObjects; // expected-warning{{from 'NSArray<NSString *> *'}}
231 ip = mutStringArraySet.allObjects; // expected-warning{{from 'NSArray<NSArray<NSString *> *> *'}}
242 NSMutableSet<NSString *> *mutStringSet,
245 MutableSetOfArrays<NSString *> *mutStringArraySet,
251 mutStringSet.allObjects = ip; // expected-warning{{to 'NSArray<NSString *> *'}}
254 mutStringArraySet.allObjects = ip; // expected-warning{{to 'NSArray<NSArray<NSString *> *> *'}}
265 NSArray<NSString *> *stringArray,
266 NSMutableArray<NSString *> *mutStringArray,
269 NSDictionary<NSString *, Widget *> *stringWidgetDict,
270 NSMutableDictionary<NSString *, Widget *> *mutStringWidgetDict,
274 NSString *string;
278 ip = stringArray[0]; // expected-warning{{from 'NSString *'}}
280 ip = mutStringArray[0]; // expected-warning{{from 'NSString *'}}
281 mutStringArray[0] = ip; // expected-warning{{parameter of type 'NSString *'}}
289 widget = stringWidgetDict[widget]; // expected-warning{{to parameter of type 'NSString *'}}
292 widget = mutStringWidgetDict[widget]; // expected-warning{{to parameter of type 'NSString *'}}
294 mutStringWidgetDict[widget] = widget; // expected-warning{{to parameter of type 'NSString *'}}
308 void test_instance_variable(NSArray<NSString *> *stringArray,
312 ip = stringArray->data; // expected-warning{{from 'NSString **'}}
327 void test_implicit_conversions(NSArray<NSString *> *stringArray,
329 NSMutableArray<NSString *> *mutStringArray,
339 …; // expected-warning{{incompatible pointer types assigning to 'NSArray<NSString *> *' from 'NSArr…
345 …compatible pointer types assigning to 'NSArray<NSNumber *> *' from 'NSMutableArray<NSString *> *'}}
360 void test_variance(NSCovariant1<NSString *> *covariant1,
362 NSCovariant1<NSString *(^)(void)> *covariant3,
366 NSContravariant1<NSString *> *contravariant1,
369 … pointer types assigning to 'NSCovariant1<NSMutableString *> *' from 'NSCovariant1<NSString *> *'}}
372 …igning to 'NSCovariant1<NSMutableString *(^)(void)> *' from 'NSCovariant1<NSString *(^)(void)> *'}}
380 …cted-warning{{incompatible pointer types assigning to 'NSContravariant1<NSString *> *' from 'NSCon…
387 void test_ternary_operator(NSArray<NSString *> *stringArray,
389 NSMutableArray<NSString *> *mutStringArray,
397 ip = cond ? stringArray : mutStringArray; // expected-warning{{from 'NSArray<NSString *> *'}}
398 ip = cond ? mutStringArray : stringArray; // expected-warning{{from 'NSArray<NSString *> *'}}
400 ip = cond ? stringArray2 : mutStringArray; // expected-warning{{from 'NSArray<NSString *> *'}}
401 ip = cond ? mutStringArray : stringArray2; // expected-warning{{from 'NSArray<NSString *> *'}}
411 … numberArray; // expected-warning{{incompatible operand types ('NSArray<NSString *> *' and 'NSArra…
420 ip = super.lastObject; // expected-warning{{from 'NSString *'}}
421 super.lastObject = ip; // expected-warning{{to 'NSString *'}}
422 ip = [super objectAtIndexedSubscript:0]; // expected-warning{{from 'NSString *'}}
427 ip = super.array; // expected-warning{{from 'NSArray<NSString *> *'}}
428 super.array = ip; // expected-warning{{to 'NSArray<NSString *> *'}}
429 ip = [super array]; // expected-warning{{from 'NSArray<NSString *> *'}}
444 void bar(MyMutableDictionary<NSString *, NSString *> *stringsByString,
447 …cted-warning{{incompatible pointer types sending 'NSNumber *' to parameter of type 'NSString *'}} \
448 …ing{{incompatible pointer types sending 'NSNumber *' to parameter of type 'NSString<NSCopying> *'}}