Debian Codegraph @

gcc/testsuite/gdc.test/compilable/dtoh_ignored.d

raw
1 /++
2 REQUIRED_ARGS: -HC=verbose -c -o- -d
3 PERMUTE_ARGS:
4 TEST_OUTPUT:
5 ---
6 // Automatically generated by Digital Mars D Compiler v$n$
7
8 #pragma once
9
10 #include <assert.h>
11 #include <math.h>
12 #include <stddef.h>
13 #include <stdint.h>
14
15 #ifdef CUSTOM_D_ARRAY_TYPE
16 #define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
17 #else
18 /// Represents a D [] array
19 template<typename T>
20 struct _d_dynamicArray final
21 {
22 size_t length;
23 T *ptr;
24
25 _d_dynamicArray() : length(0), ptr(NULL) { }
26
27 _d_dynamicArray(size_t length_in, T *ptr_in)
28 : length(length_in), ptr(ptr_in) { }
29
30 T& operator[](const size_t idx) {
31 assert(idx < length);
32 return ptr[idx];
33 }
34
35 const T& operator[](const size_t idx) const {
36 assert(idx < length);
37 return ptr[idx];
38 }
39 };
40 #endif
41 #if !defined(_d_real)
42 #define _d_real long double
43 #endif
44
45 class WithImaginary
46 {
47 public:
48 float memberIf;
49 double memberId;
50 _d_real memberIr;
51 _Complex float memberCf;
52 _Complex double memberCd;
53 _Complex _d_real memberCr;
54 _d_dynamicArray< float > nested;
55 // Ignored function dtoh_ignored.WithImaginary.onReturn because its return type cannot be mapped to C++
56 private:
57 virtual void __vtable_slot_0();
58 // Ignored function dtoh_ignored.WithImaginary.onParam because one of its parameters has type `ifloat` which cannot be mapped to C++
59 virtual void __vtable_slot_1();
60 };
61
62 template <typename T>
63 struct WithImaginaryTemplate final
64 {
65 float member;
66 // Ignored function onReturn because its return type cannot be mapped to C++
67 // Ignored function onParam because one of its parameters has type `ifloat` which cannot be mapped to C++
68 // Ignored variable onVariable because its type cannot be mapped to C++
69 WithImaginaryTemplate()
70 {
71 }
72 };
73
74 extern WithImaginaryTemplate<int32_t > instance;
75
76 // Ignored variable dtoh_ignored.onVariable because its type cannot be mapped to C++
77 // Ignored variable dtoh_ignored.onVariablePointer because its type cannot be mapped to C++
78 // Ignored variable dtoh_ignored.onVariableSlice because its type cannot be mapped to C++
79 // Ignored variable dtoh_ignored.onVariableArray because its type cannot be mapped to C++
80 extern void* onVariableAssocArray;
81
82 // Ignored variable dtoh_ignored.onVariableFunction because its type cannot be mapped to C++
83 // Ignored variable dtoh_ignored.onVariableFunctionParam because its type cannot be mapped to C++
84 // Ignored variable dtoh_ignored.onVariableDelegate because its type cannot be mapped to C++
85 // Ignored function dtoh_ignored.myExit because its return type cannot be mapped to C++
86 ---
87 +/
88
89 extern (C++):
90
91 class WithImaginary
92 {
93 ifloat memberIf;
94 idouble memberId;
95 ireal memberIr;
96
97 cfloat memberCf;
98 cdouble memberCd;
99 creal memberCr;
100
101 ifloat[] nested;
102
103 ifloat onReturn()
104 {
105 return 0i;
106 }
107
108 void onParam(ifloat) {}
109 }
110
111 struct WithImaginaryTemplate(T)
112 {
113 ifloat member;
114
115 ifloat onReturn()
116 {
117 return 0i;
118 }
119
120 void onParam(ifloat)
121 {
122 }
123
124 __gshared ifloat onVariable;
125 }
126
127 __gshared WithImaginaryTemplate!int instance;
128
129 __gshared ifloat onVariable;
130
131 __gshared ifloat** onVariablePointer;
132
133 __gshared ifloat[] onVariableSlice;
134
135 __gshared ifloat[2] onVariableArray;
136
137 __gshared ifloat[int] onVariableAssocArray;
138
139 __gshared ifloat function() onVariableFunction;
140
141 __gshared void function(ifloat) onVariableFunctionParam;
142
143 __gshared ifloat delegate() onVariableDelegate;
144
145 noreturn myExit()
146 {
147 assert(false);
148 }