llvm-for-llvmta/tools/clang/test/Import/cxx-casts/Inputs/F.cpp

13 lines
259 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
struct A {
virtual ~A() {}
};
struct B : public A {};
void f() {
const A *b = new B();
const B *c1 = dynamic_cast<const B *>(b);
const B *c2 = static_cast<const B *>(b);
const B *c3 = reinterpret_cast<const B *>(b);
A *c4 = const_cast<A *>(b);
}