1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s 2*f4a2713aSLionel Sambuc// RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6 3*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s 4*f4a2713aSLionel Sambuc// RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc__weak id* x; 7*f4a2713aSLionel Sambucid* __weak y; 8*f4a2713aSLionel Sambucid* __weak* z; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc__weak id* a1[20]; 11*f4a2713aSLionel Sambucid* __weak a2[30]; 12*f4a2713aSLionel Sambucid** __weak a3[40]; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambucvoid foo (__weak id *param) { 15*f4a2713aSLionel Sambuc *param = 0; 16*f4a2713aSLionel Sambuc} 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambucint main() 19*f4a2713aSLionel Sambuc{ 20*f4a2713aSLionel Sambuc *x = 0; 21*f4a2713aSLionel Sambuc *y = 0; 22*f4a2713aSLionel Sambuc **z = 0; 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc a1[3] = 0; 25*f4a2713aSLionel Sambuc a2[3] = 0; 26*f4a2713aSLionel Sambuc a3[3][4] = 0; 27*f4a2713aSLionel Sambuc} 28*f4a2713aSLionel Sambuc 29