brintos

brintos / llvm-project-archived public Read only

0
0
Text · 810 B · 69c7eec Raw
46 lines · plain
1// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 2// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3 4@interface F {5  int supervar;6}7@end8 9@interface G : F {10@public11  int ivar;12}13@end14 15@implementation G16- (void)foo:(F *)arg {17        int q = arg->supervar;18        int v = ((G *)arg)->ivar;19}20@end21 22void objc_assign_strongCast(id);23void __CFAssignWithWriteBarrier(void **location, void *value) {24        objc_assign_strongCast((id)value);25}26 27@interface RealClass {28        @public29        int f;30}31@end32 33@implementation RealClass34@end35 36@interface Foo {37        id reserved;38}39@end40 41@implementation Foo42- (void)bar {43        ((RealClass*)reserved)->f = 99;44}45@end46