summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
new file mode 100644
index 0000000..92db9a7
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+
+struct A {
+ constexpr A(int x) : x(x) {}
+ virtual void f();
+ int x;
+};
+
+A a(42);
+// CHECK: @"\01?a@@3UA@@A" = global { [1 x i8*]*, i32 } { [1 x i8*]* @"\01??_7A@@6B@", i32 42 }, align 4
+
+struct B {
+ constexpr B(int y) : y(y) {}
+ virtual void g();
+ int y;
+};
+
+struct C : A, B {
+ constexpr C() : A(777), B(13) {}
+};
+
+C c;
+// CHECK: @"\01?c@@3UC@@A" = global { [1 x i8*]*, i32, [1 x i8*]*, i32 } { [1 x i8*]* @"\01??_7C@@6BA@@@", i32 777, [1 x i8*]* @"\01??_7C@@6BB@@@", i32 13 }
OpenPOWER on IntegriCloud