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
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
clang
/
test
/
Rewriter
/
objc-synchronized-1.m
blob
9172a1316cb0f56868dd19083dc3f68029cf6104
1
// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
2
3
id SYNCH_EXPR(void);
4
void SYNCH_BODY(void);
5
void SYNCH_BEFORE(void);
6
void SYNC_AFTER(void);
7
8
void foo(id sem)
9
{
10
SYNCH_BEFORE();
11
@synchronized (SYNCH_EXPR()) {
12
SYNCH_BODY();
13
return;
14
}
15
SYNC_AFTER();
16
@synchronized ([sem self]) {
17
SYNCH_BODY();
18
return;
19
}
20
}