1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -E %s -o %t.m 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %t.m -o %t-rw.cpp 3*f4a2713aSLionel Sambuc// RUN: FileCheck --input-file=%t-rw.cpp %s 4*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc@interface NSURLResponse { 7*f4a2713aSLionel Sambuc@public 8*f4a2713aSLionel Sambuc NSURLResponse *InnerResponse; 9*f4a2713aSLionel Sambuc} 10*f4a2713aSLionel Sambuc@end 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc@interface NSCachedURLResponseInternal 13*f4a2713aSLionel Sambuc{ 14*f4a2713aSLionel Sambuc @public 15*f4a2713aSLionel Sambuc NSURLResponse *response; 16*f4a2713aSLionel Sambuc} 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc@interface NSCachedURLResponse 20*f4a2713aSLionel Sambuc{ 21*f4a2713aSLionel Sambuc @private 22*f4a2713aSLionel Sambuc NSCachedURLResponseInternal *_internal; 23*f4a2713aSLionel Sambuc} 24*f4a2713aSLionel Sambuc- (void) Meth; 25*f4a2713aSLionel Sambuc@end 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc@implementation NSCachedURLResponse 28*f4a2713aSLionel Sambuc- (void) Meth { 29*f4a2713aSLionel Sambuc _internal->response->InnerResponse = 0; 30*f4a2713aSLionel Sambuc } 31*f4a2713aSLionel Sambuc@end 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc// CHECK: (*(NSURLResponse **)((char *)(*(NSURLResponse **)((char *)(*(NSCachedURLResponseInternal **)((char *)self + OBJC_IVAR_$_NSCachedURLResponse$_internal)) + OBJC_IVAR_$_NSCachedURLResponseInternal$response)) + OBJC_IVAR_$_NSURLResponse$InnerResponse)) = 0; 34