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
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
clang
/
test
/
SemaCXX
/
decomposition-blocks.cpp
blob
0676463d12c78cd30ca4b40aed3bafe6a1b4f389
1
// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s -fblocks
2
3
struct
S
{
4
int
i
:
1
;
5
int
j
;
6
};
7
8
void
run
(
void
(^)());
9
void
test
() {
10
auto
[
i
,
j
] =
S
{-
1
,
42
};
// expected-note {{'i' declared here}}
11
run
(^{
12
(
void
)
i
;
// expected-error {{reference to local binding 'i' declared in enclosing function 'test'}}
13
});
14
}