brintos

brintos / llvm-project-archived public Read only

0
0
Text · 227 B · c80ab8f Raw
9 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3struct A {};4struct B : virtual A {};5 6void foo() {7  (void)static_cast<A&>(*(B *)0); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}}8}9