Debian Codegraph @

clang/test/SemaObjC/property-lookup-in-id.m

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2
3 typedef struct objc_class *Class;
4
5 typedef struct objc_object {
6 Class isa;
7 } *id;
8
9
10 typedef struct __FSEventStream* FSEventStreamRef;
11
12 extern id NSApp;
13
14 @interface FileSystemMonitor {
15
16 FSEventStreamRef fsEventStream;
17 }
18 @property(assign) FSEventStreamRef fsEventStream;
19
20 @end
21
22 @implementation FileSystemMonitor
23 @synthesize fsEventStream;
24
25 - (void)startFSEventGathering:(id)sender
26 {
27 fsEventStream = [NSApp delegate].fsEventStream; // expected-warning {{instance method '-delegate' not found (return type defaults to 'id')}} \
28 // expected-error {{property 'fsEventStream' not found on object of type 'id'}}
29
30 }
31 @end
32