Sign in
cobalt
/
cobalt
/
9acf5125db5988fba13d7ec2ee71f8dec679c7bf
/
.
/
src
/
third_party
/
llvm-project
/
clang
/
test
/
SemaCXX
/
null-cast.cpp
blob: c80ab8fced1e09603d0304dc8932d6646544203b [
file
] [
log
] [
blame
]
// RUN: %clang_cc1 -fsyntax-only -verify %s
struct
A
{};
struct
B
:
virtual
A
{};
void
foo
()
{
(
void
)
static_cast
<
A
&>(*(
B
*)
0
);
// expected-warning {{binding dereferenced null pointer to reference has undefined behavior}}
}