1 // RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
3 typedef unsigned int size_t;
5 @protocol NSCopying @end
7 @interface NSMutableArray
8 - (id)objectAtIndexedSubscript:(size_t)index;
9 - (void)setObject:(id)object atIndexedSubscript:(size_t)index;
13 operator unsigned int ();
17 @interface NSMutableDictionary
18 - (id)objectForKeyedSubscript:(id<NSCopying>)key;
19 - (void)setObject:(id)object forKeyedSubscript:(id<NSCopying>)key;
23 NSMutableArray<P> * array;
25 id oldObject = array[(int)s];
27 NSMutableDictionary<P> *dict;
28 dict[(id)s] = oldObject;
29 oldObject = dict[(id)s];
33 template <class T> void test2(NSMutableArray *a) {
36 template void test2<int>(NSMutableArray*);
37 // CHECK-LABEL: define weak_odr void @_Z5test2IiEvP14NSMutableArray
38 // CHECK: @objc_msgSend
42 template <class T> void test3(NSMutableArray *a) {
46 template void test3<int>(NSMutableArray*);
47 // CHECK-LABEL: define weak_odr void @_Z5test3IiEvP14NSMutableArray
48 // CHECK: @objc_msgSend