2009-12-16 04:14:24 +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
|
2010-05-21 02:22:28 +08:00
|
|
|
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|