[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / error-outof-scope-property-use.m
blob413161c2ef2d4991b5927ecced3f4d076651d1b3
1 // RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
4 @class NSMutableDictionary; // expected-note {{receiver is instance of class declared here}}
6 @interface LaunchdJobs 
8 @property (nonatomic,retain) NSMutableDictionary *uuids_jobs; // expected-note {{'_uuids_jobs' declared here}}
10 @end
12 @implementation LaunchdJobs
14 -(void)job
17  [uuids_jobs objectForKey]; // expected-error {{use of undeclared identifier 'uuids_jobs'}} \
18                             // expected-warning {{instance method '-objectForKey' not found}}
22 @end
24 void
25 doLaunchdJobCPU(void)
27  [uuids_jobs enumerateKeysAndObjectsUsingBlock]; // expected-error {{use of undeclared identifier 'uuids_jobs'}}