repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
Sema
/
block-storageclass.c
blob
eb7c985dbf5bb269f1e3ac725ddfa3a5bb23396c
1
// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
2
// expected-no-diagnostics
3
4
int
printf
(
const char
*, ...);
5
void
_Block_byref_release
(
void
*
src
){}
6
7
int
main
(
void
) {
8
__block
int
X
=
1234
;
9
__block
const char
*
message
=
"HELLO"
;
10
11
X
=
X
-
1234
;
12
13
X
+=
1
;
14
15
printf
(
"%s(%d)
\n
"
,
message
,
X
);
16
X
-=
1
;
17
18
return
X
;
19
}