1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp 3*f4a2713aSLionel Sambuc// radar 7946975 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambucvoid *sel_registerName(const char *); 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface foo 8*f4a2713aSLionel Sambuc@end 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc@interface foo2 : foo 11*f4a2713aSLionel Sambuc+ (id)x; 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuctypedef void (^b_t)(void); 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambucvoid bar(b_t block); 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambucvoid f() { 19*f4a2713aSLionel Sambuc static id foo = 0; 20*f4a2713aSLionel Sambuc bar(^{ 21*f4a2713aSLionel Sambuc foo = [foo2 x]; 22*f4a2713aSLionel Sambuc }); 23*f4a2713aSLionel Sambuc} 24*f4a2713aSLionel Sambuc 25