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
/
anonymous-union-cxx11.cpp
blob
b0dd1a874deb1faee4dbf1cfc3a441d7a5311d71
1
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -pedantic %s
2
// expected-no-diagnostics
3
4
namespace
PR12866
{
5
struct
bar
{
6
union
{
7
int
member
;
8
};
9
};
10
11
void
foo
(
void
) {
12
(
void
)
sizeof
(
bar
::
member
);
13
}
14
}
15
16
namespace
PR20021
{
17
class
C
{
18
union
{
19
static_assert
(
true
,
""
);
20
int
i
;
21
};
22
};
23
}