summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/virt-call-offsets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/virt-call-offsets.cpp')
-rw-r--r--clang/test/CodeGenCXX/virt-call-offsets.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/virt-call-offsets.cpp b/clang/test/CodeGenCXX/virt-call-offsets.cpp
new file mode 100644
index 0000000..5eef6fe
--- /dev/null
+++ b/clang/test/CodeGenCXX/virt-call-offsets.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+
+struct A { virtual void a(); };
+struct B : A {};
+struct C : B { virtual void a(); };
+void (C::*x)() = &C::a;
+
+// CHECK: @x = global { i{{[0-9]+}}, i{{[0-9]+}} } { i{{[0-9]+}} 1, i{{[0-9]+}} 0 }