1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
2 // RUN: grep -F '@objc_assign_global' %t | count 7
3 // RUN: grep -F '@objc_assign_ivar' %t | count 5
4 // RUN: grep -F '@objc_assign_strongCast' %t | count 8
5 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
6 // RUN: grep -F '@objc_assign_global' %t | count 7
7 // RUN: grep -F '@objc_assign_ivar' %t | count 5
8 // RUN: grep -F '@objc_assign_strongCast' %t | count 8
10 extern id **somefunc(void);
11 extern id *somefunc2(void);
18 void func(id a, id *b, id **c) {
30 @interface something {
35 @implementation something
37 id badIdea = *somefunc2();
49 void funct2(AStruct *aptr) {
50 id **ppptr = somefunc();
52 **ppptr = aptr->alfred;
56 typedef const struct __CFString * CFStringRef;
57 @interface DSATextSearch {
58 __strong CFStringRef *_documentNames;
62 id *nestedDeeperNames;
73 @implementation DSATextSearch
76 _documentNames[filteredPos] = 0; // storing into an element of array ivar. objc_assign_strongCast is needed.
77 inner.innerNames[filteredPos] = 0;
78 inner.inner_most.nestedDeeperNames[filteredPos] = 0;
79 inner.inner_most.arrI[3].is1[5] = 0;
80 inner.inner_most.arrI[3].is2[5] = 0;