[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / arc-readonly-property-ivar.m
blob95fbb2b74c5c2df0a2764ae3b46db7bbbb5cb541
1 // RUN: %clang_cc1  -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
4 @interface PP
5 @property (readonly) id ReadOnlyPropertyNoBackingIvar;
6 @property (readonly) id ReadOnlyProperty;
7 @property (readonly) id ReadOnlyPropertyX;
8 @end
10 @implementation PP {
11 __weak id _ReadOnlyProperty;
13 @synthesize ReadOnlyPropertyNoBackingIvar;
14 @synthesize ReadOnlyProperty = _ReadOnlyProperty;
15 @synthesize ReadOnlyPropertyX = _ReadOnlyPropertyX;
16 @end