[cfe-commits] r151376 - /cfe/trunk/test/Rewriter/rewrite-modern-nested-ivar.mm
Fariborz Jahanian
fjahanian at apple.com
Fri Feb 24 10:03:43 PST 2012
Author: fjahanian
Date: Fri Feb 24 12:03:42 2012
New Revision: 151376
URL: http://llvm.org/viewvc/llvm-project?rev=151376&view=rev
Log:
more objective-c modern translator ivar tests.
Added:
cfe/trunk/test/Rewriter/rewrite-modern-nested-ivar.mm
Added: cfe/trunk/test/Rewriter/rewrite-modern-nested-ivar.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/rewrite-modern-nested-ivar.mm?rev=151376&view=auto
==============================================================================
--- cfe/trunk/test/Rewriter/rewrite-modern-nested-ivar.mm (added)
+++ cfe/trunk/test/Rewriter/rewrite-modern-nested-ivar.mm Fri Feb 24 12:03:42 2012
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -E %s -o %t.m
+// RUN: %clang_cc1 -fblocks -rewrite-objc -fms-extensions %t.m -o %t-rw.cpp
+// RUN: FileCheck --input-file=%t-rw.cpp %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
+
+ at interface NSURLResponse {
+ at public
+ NSURLResponse *InnerResponse;
+}
+ at end
+
+ at interface NSCachedURLResponseInternal
+{
+ @public
+ NSURLResponse *response;
+}
+ at end
+
+ at interface NSCachedURLResponse
+{
+ @private
+ NSCachedURLResponseInternal *_internal;
+}
+- (void) Meth;
+ at end
+
+ at implementation NSCachedURLResponse
+- (void) Meth {
+ _internal->response->InnerResponse = 0;
+ }
+ at end
+
+// CHECK: (*(NSURLResponse **)((char *)(*(NSURLResponse **)((char *)(*(NSCachedURLResponseInternal **)((char *)self + OBJC_IVAR_$_NSCachedURLResponse__internal)) + OBJC_IVAR_$_NSCachedURLResponseInternal_response)) + OBJC_IVAR_$_NSURLResponse_InnerResponse)) = 0;
More information about the cfe-commits
mailing list