2009-12-15 01:13:18 +08:00
|
|
|
// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep objc_assign_global %t | count 3
|
|
|
|
// RUN: grep objc_assign_strongCast %t | count 2
|
2009-05-06 07:28:21 +08:00
|
|
|
|
|
|
|
@interface A
|
|
|
|
@end
|
|
|
|
|
|
|
|
typedef struct s0 {
|
|
|
|
A *a[4];
|
|
|
|
} T;
|
|
|
|
|
|
|
|
T g0;
|
|
|
|
|
|
|
|
void f0(id x) {
|
|
|
|
g0.a[0] = x;
|
|
|
|
}
|
|
|
|
|
|
|
|
void f1(id x) {
|
|
|
|
((T*) &g0)->a[0] = x;
|
|
|
|
}
|
|
|
|
|
2009-06-02 05:29:32 +08:00
|
|
|
void f2(unsigned idx)
|
|
|
|
{
|
|
|
|
id *keys;
|
|
|
|
keys[idx] = 0;
|
|
|
|
}
|
|
|
|
|