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-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git]
/
clang
/
test
/
Analysis
/
uninit-vals-union.c
blob
bccc77a4a4feecf8f6abf9eb970fcdb5e45d4905
1
// RUN: %clang_analyze_cc1 -analyzer-checker=core.builtin -analyzer-store=region -verify -Wno-unused %s
2
3
typedef
union
{
4
int
y
;
5
}
U
;
6
7
typedef
struct
{
int
x
; }
A
;
8
9
void
foo
(
void
) {
10
U u
= {};
11
A
*
a
= &
u
;
// expected-warning{{incompatible pointer types}}
12
a
->
x
;
// no-crash
13
}