repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
SemaObjC
/
block-as-object.m
blob
945d6f68d6eac2c59759b4d051ccfe61ef04edc7
1
// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
2
// expected-no-diagnostics
3
4
@interface Whatever
5
- copy;
6
@end
7
8
typedef long (^MyBlock)(id obj1, id obj2);
9
10
void foo(MyBlock b) {
11
id bar = [b copy];
12
}
13
14
void foo2(id b) {
15
}
16
17
void foo3(void (^block)(void)) {
18
foo2(block);
19
id x;
20
foo(x);
21
}