[OpenACC] Enable 'attach' clause for combined constructs
[llvm-project.git] / clang / test / Rewriter / rewrite-cast-ivar-modern-access.mm
blob69c7eecefd7549649b83969ff9577e63a45ced60
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.cpp
4 @interface F {
5   int supervar;
7 @end
9 @interface G : F {
10 @public
11   int ivar;
13 @end
15 @implementation G
16 - (void)foo:(F *)arg {
17         int q = arg->supervar;
18         int v = ((G *)arg)->ivar;
20 @end
22 void objc_assign_strongCast(id);
23 void __CFAssignWithWriteBarrier(void **location, void *value) {
24         objc_assign_strongCast((id)value);
27 @interface RealClass {
28         @public
29         int f;
31 @end
33 @implementation RealClass
34 @end
36 @interface Foo {
37         id reserved;
39 @end
41 @implementation Foo
42 - (void)bar {
43         ((RealClass*)reserved)->f = 99;
45 @end