xref: /llvm-project/clang/test/SemaObjC/arc-readonly-property-ivar-1.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1   -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
2// RUN: %clang_cc1  -x objective-c++  -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
3// expected-no-diagnostics
4
5@interface PP
6@property (readonly) id ReadOnlyPropertyNoBackingIvar;
7@property (readonly) id ReadOnlyProperty;
8@property (readonly) id ReadOnlyPropertyX;
9@end
10
11@implementation PP {
12__weak id _ReadOnlyProperty;
13}
14@synthesize ReadOnlyPropertyNoBackingIvar;
15@synthesize ReadOnlyProperty = _ReadOnlyProperty;
16@synthesize ReadOnlyPropertyX = _ReadOnlyPropertyX;
17@end
18
19@interface DD
20@property (readonly) id ReadOnlyProperty;
21@property (readonly) id ReadOnlyPropertyStrong;
22@property (readonly) id ReadOnlyPropertyNoBackingIvar;
23@end
24
25@implementation DD {
26__weak id _ReadOnlyProperty;
27__strong id _ReadOnlyPropertyStrong;
28}
29@end
30