xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc struct A {
AA4f4a2713aSLionel Sambuc   constexpr A(int x) : x(x) {}
5f4a2713aSLionel Sambuc   virtual void f();
6f4a2713aSLionel Sambuc   int x;
7f4a2713aSLionel Sambuc };
8f4a2713aSLionel Sambuc 
9f4a2713aSLionel Sambuc A a(42);
10f4a2713aSLionel Sambuc // CHECK: @"\01?a@@3UA@@A" = global { [1 x i8*]*, i32 } { [1 x i8*]* @"\01??_7A@@6B@", i32 42 }, align 4
11f4a2713aSLionel Sambuc 
12f4a2713aSLionel Sambuc struct B {
BB13f4a2713aSLionel Sambuc   constexpr B(int y) : y(y) {}
14f4a2713aSLionel Sambuc   virtual void g();
15f4a2713aSLionel Sambuc   int y;
16f4a2713aSLionel Sambuc };
17f4a2713aSLionel Sambuc 
18f4a2713aSLionel Sambuc struct C : A, B {
CC19f4a2713aSLionel Sambuc   constexpr C() : A(777), B(13) {}
20f4a2713aSLionel Sambuc };
21f4a2713aSLionel Sambuc 
22f4a2713aSLionel Sambuc C c;
23f4a2713aSLionel Sambuc // 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 }
24