aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/derived-to-base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/derived-to-base.cpp')
-rw-r--r--test/CodeGenCXX/derived-to-base.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/derived-to-base.cpp b/test/CodeGenCXX/derived-to-base.cpp
new file mode 100644
index 000000000000..63492d604d17
--- /dev/null
+++ b/test/CodeGenCXX/derived-to-base.cpp
@@ -0,0 +1,16 @@
+// RUN: clang-cc -emit-llvm %s -o -
+struct A {
+ void f();
+
+ int a;
+};
+
+struct B : A {
+ double b;
+};
+
+void f() {
+ B b;
+
+ b.f();
+}