aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/virtual-base-cast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/virtual-base-cast.cpp')
-rw-r--r--test/CodeGenCXX/virtual-base-cast.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/virtual-base-cast.cpp b/test/CodeGenCXX/virtual-base-cast.cpp
new file mode 100644
index 000000000000..a825120ad229
--- /dev/null
+++ b/test/CodeGenCXX/virtual-base-cast.cpp
@@ -0,0 +1,9 @@
+// RUN: clang-cc -emit-llvm-only %s
+
+struct A { virtual ~A(); };
+struct B : A { virtual ~B(); };
+struct C : virtual B { virtual ~C(); };
+
+void f(C *c) {
+ A* a = c;
+}