xref: /llvm-project/clang/test/Rewriter/rewrite-user-defined-accessors.mm (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
2// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -fblocks -Wno-address-of-temporary -Did="void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3
4@interface Foo {
5	Foo *foo;
6}
7
8@property (retain, nonatomic) Foo *foo;
9
10@end
11
12@implementation Foo
13
14- (Foo *)foo {
15    if (!foo) {
16        foo = 0;
17    }
18    return foo;
19}
20
21
22- (void) setFoo : (Foo *) arg {
23  foo = arg;
24}
25
26@synthesize foo;
27
28@end
29
30