xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/cast-conversion.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
2*0a6a1f1dSLionel Sambuc // RUN: FileCheck %s
3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - |   \
4*0a6a1f1dSLionel Sambuc // RUN: FileCheck %s
5f4a2713aSLionel Sambuc 
6f4a2713aSLionel Sambuc struct A {
7f4a2713aSLionel Sambuc   A(int);
8f4a2713aSLionel Sambuc };
9f4a2713aSLionel Sambuc 
10f4a2713aSLionel Sambuc struct B {
11f4a2713aSLionel Sambuc   B(A);
12f4a2713aSLionel Sambuc };
13f4a2713aSLionel Sambuc 
main()14f4a2713aSLionel Sambuc int main () {
15f4a2713aSLionel Sambuc   (B)10;
16f4a2713aSLionel Sambuc   B(10);
17f4a2713aSLionel Sambuc   static_cast<B>(10);
18f4a2713aSLionel Sambuc }
19f4a2713aSLionel Sambuc 
20*0a6a1f1dSLionel Sambuc // CHECK: call void @_ZN1AC1Ei
21*0a6a1f1dSLionel Sambuc // CHECK: call void @_ZN1BC1E1A
22*0a6a1f1dSLionel Sambuc // CHECK: call void @_ZN1AC1Ei
23*0a6a1f1dSLionel Sambuc // CHECK: call void @_ZN1BC1E1A
24*0a6a1f1dSLionel Sambuc // CHECK: call void @_ZN1AC1Ei
25*0a6a1f1dSLionel Sambuc // CHECK: call void @_ZN1BC1E1A
26