[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Rewriter / rewrite-modern-nested-ivar.mm
blob6e0cd3905a93802321ca17e5b99017e083d98f67
1 // RUN: %clang_cc1 -E %s -o %t.m
2 // RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %t.m -o %t-rw.cpp 
3 // RUN: FileCheck --input-file=%t-rw.cpp %s
4 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
6 @interface NSURLResponse {
7 @public
8   NSURLResponse *InnerResponse;
10 @end
12 @interface NSCachedURLResponseInternal 
14     @public
15     NSURLResponse *response;
17 @end
19 @interface NSCachedURLResponse
21     @private
22     NSCachedURLResponseInternal *_internal;
24 - (void) Meth;
25 @end
27 @implementation NSCachedURLResponse
28 - (void) Meth {
29     _internal->response->InnerResponse = 0;
30   }
31 @end
33 // CHECK: (*(NSURLResponse **)((char *)(*(NSURLResponse **)((char *)(*(NSCachedURLResponseInternal **)((char *)self + OBJC_IVAR_$_NSCachedURLResponse$_internal)) + OBJC_IVAR_$_NSCachedURLResponseInternal$response)) + OBJC_IVAR_$_NSURLResponse$InnerResponse)) = 0;