Debian Codegraph @

clang/test/SemaObjC/self-in-function.m

raw
1 // RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
2 // expected-no-diagnostics
3
4 typedef struct objc_class *Class;
5
6 typedef struct objc_object {
7 Class isa;
8 } *id;
9
10 @interface NSObject
11 + (id) alloc;
12 @end
13
14
15 void foo(Class self) {
16 [self alloc];
17 (^() {
18 [self alloc];
19 })();
20 }
21
22 void bar(Class self) {
23 Class y = self;
24 [y alloc];
25 }
26