1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
2 // RUN: FileCheck -check-prefix CHECK-LP --input-file=%t-rw.cpp %s
16 - (void)foo:(F *)arg {
17 int q = arg->supervar;
18 int v = ((G *)arg)->ivar;
22 void objc_assign_strongCast(id);
23 void __CFAssignWithWriteBarrier(void **location, void *value) {
24 objc_assign_strongCast((id)value);
27 @interface RealClass {
33 @implementation RealClass
43 ((RealClass*)reserved)->f = 99;
47 // CHECK-LP: ((struct G_IMPL *)arg)->ivar
49 // CHECK-LP: objc_assign_strongCast((id)value)
51 // CHECK-LP: ((struct RealClass_IMPL *)((RealClass *)((struct Foo_IMPL *)self)->reserved))->f