1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck -check-prefix=X64 %s
3f4a2713aSLionel Sambuc
foo(const unsigned int)4f4a2713aSLionel Sambuc void foo(const unsigned int) {}
5f4a2713aSLionel Sambuc // CHECK: "\01?foo@@YAXI@Z"
6f4a2713aSLionel Sambuc // X64: "\01?foo@@YAXI@Z"
7f4a2713aSLionel Sambuc
foo(const double)8f4a2713aSLionel Sambuc void foo(const double) {}
9f4a2713aSLionel Sambuc // CHECK: "\01?foo@@YAXN@Z"
10f4a2713aSLionel Sambuc // X64: "\01?foo@@YAXN@Z"
11f4a2713aSLionel Sambuc
bar(const volatile double)12f4a2713aSLionel Sambuc void bar(const volatile double) {}
13f4a2713aSLionel Sambuc // CHECK: "\01?bar@@YAXN@Z"
14f4a2713aSLionel Sambuc // X64: "\01?bar@@YAXN@Z"
15f4a2713aSLionel Sambuc
foo_pad(char * x)16f4a2713aSLionel Sambuc void foo_pad(char * x) {}
17f4a2713aSLionel Sambuc // CHECK: "\01?foo_pad@@YAXPAD@Z"
18f4a2713aSLionel Sambuc // X64: "\01?foo_pad@@YAXPEAD@Z"
19f4a2713aSLionel Sambuc
foo_pbd(const char * x)20f4a2713aSLionel Sambuc void foo_pbd(const char * x) {}
21f4a2713aSLionel Sambuc // CHECK: "\01?foo_pbd@@YAXPBD@Z"
22f4a2713aSLionel Sambuc // X64: "\01?foo_pbd@@YAXPEBD@Z"
23f4a2713aSLionel Sambuc
foo_pcd(volatile char * x)24f4a2713aSLionel Sambuc void foo_pcd(volatile char * x) {}
25f4a2713aSLionel Sambuc // CHECK: "\01?foo_pcd@@YAXPCD@Z"
26f4a2713aSLionel Sambuc // X64: "\01?foo_pcd@@YAXPECD@Z"
27f4a2713aSLionel Sambuc
foo_qad(char * const x)28f4a2713aSLionel Sambuc void foo_qad(char * const x) {}
29f4a2713aSLionel Sambuc // CHECK: "\01?foo_qad@@YAXQAD@Z"
30f4a2713aSLionel Sambuc // X64: "\01?foo_qad@@YAXQEAD@Z"
31f4a2713aSLionel Sambuc
foo_rad(char * volatile x)32f4a2713aSLionel Sambuc void foo_rad(char * volatile x) {}
33f4a2713aSLionel Sambuc // CHECK: "\01?foo_rad@@YAXRAD@Z"
34f4a2713aSLionel Sambuc // X64: "\01?foo_rad@@YAXREAD@Z"
35f4a2713aSLionel Sambuc
foo_sad(char * const volatile x)36f4a2713aSLionel Sambuc void foo_sad(char * const volatile x) {}
37f4a2713aSLionel Sambuc // CHECK: "\01?foo_sad@@YAXSAD@Z"
38f4a2713aSLionel Sambuc // X64: "\01?foo_sad@@YAXSEAD@Z"
39f4a2713aSLionel Sambuc
foo_piad(char * __restrict x)40*0a6a1f1dSLionel Sambuc void foo_piad(char * __restrict x) {}
41*0a6a1f1dSLionel Sambuc // CHECK: "\01?foo_piad@@YAXPIAD@Z"
42*0a6a1f1dSLionel Sambuc // X64: "\01?foo_piad@@YAXPEIAD@Z"
43*0a6a1f1dSLionel Sambuc
foo_qiad(char * const __restrict x)44*0a6a1f1dSLionel Sambuc void foo_qiad(char * const __restrict x) {}
45*0a6a1f1dSLionel Sambuc // CHECK: "\01?foo_qiad@@YAXQIAD@Z"
46*0a6a1f1dSLionel Sambuc // X64: "\01?foo_qiad@@YAXQEIAD@Z"
47*0a6a1f1dSLionel Sambuc
foo_riad(char * volatile __restrict x)48*0a6a1f1dSLionel Sambuc void foo_riad(char * volatile __restrict x) {}
49*0a6a1f1dSLionel Sambuc // CHECK: "\01?foo_riad@@YAXRIAD@Z"
50*0a6a1f1dSLionel Sambuc // X64: "\01?foo_riad@@YAXREIAD@Z"
51*0a6a1f1dSLionel Sambuc
foo_siad(char * const volatile __restrict x)52*0a6a1f1dSLionel Sambuc void foo_siad(char * const volatile __restrict x) {}
53*0a6a1f1dSLionel Sambuc // CHECK: "\01?foo_siad@@YAXSIAD@Z"
54*0a6a1f1dSLionel Sambuc // X64: "\01?foo_siad@@YAXSEIAD@Z"
55*0a6a1f1dSLionel Sambuc
foo_papad(char ** x)56f4a2713aSLionel Sambuc void foo_papad(char ** x) {}
57f4a2713aSLionel Sambuc // CHECK: "\01?foo_papad@@YAXPAPAD@Z"
58f4a2713aSLionel Sambuc // X64: "\01?foo_papad@@YAXPEAPEAD@Z"
59f4a2713aSLionel Sambuc
foo_papbd(char const ** x)60f4a2713aSLionel Sambuc void foo_papbd(char const ** x) {}
61f4a2713aSLionel Sambuc // CHECK: "\01?foo_papbd@@YAXPAPBD@Z"
62f4a2713aSLionel Sambuc // X64: "\01?foo_papbd@@YAXPEAPEBD@Z"
63f4a2713aSLionel Sambuc
foo_papcd(char volatile ** x)64f4a2713aSLionel Sambuc void foo_papcd(char volatile ** x) {}
65f4a2713aSLionel Sambuc // CHECK: "\01?foo_papcd@@YAXPAPCD@Z"
66f4a2713aSLionel Sambuc // X64: "\01?foo_papcd@@YAXPEAPECD@Z"
67f4a2713aSLionel Sambuc
foo_pbqad(char * const * x)68f4a2713aSLionel Sambuc void foo_pbqad(char * const* x) {}
69f4a2713aSLionel Sambuc // CHECK: "\01?foo_pbqad@@YAXPBQAD@Z"
70f4a2713aSLionel Sambuc // X64: "\01?foo_pbqad@@YAXPEBQEAD@Z"
71f4a2713aSLionel Sambuc
foo_pcrad(char * volatile * x)72f4a2713aSLionel Sambuc void foo_pcrad(char * volatile* x) {}
73f4a2713aSLionel Sambuc // CHECK: "\01?foo_pcrad@@YAXPCRAD@Z"
74f4a2713aSLionel Sambuc // X64: "\01?foo_pcrad@@YAXPECREAD@Z"
75f4a2713aSLionel Sambuc
foo_qapad(char ** const x)76f4a2713aSLionel Sambuc void foo_qapad(char ** const x) {}
77f4a2713aSLionel Sambuc // CHECK: "\01?foo_qapad@@YAXQAPAD@Z"
78f4a2713aSLionel Sambuc // X64: "\01?foo_qapad@@YAXQEAPEAD@Z"
79f4a2713aSLionel Sambuc
foo_rapad(char ** volatile x)80f4a2713aSLionel Sambuc void foo_rapad(char ** volatile x) {}
81f4a2713aSLionel Sambuc // CHECK: "\01?foo_rapad@@YAXRAPAD@Z"
82f4a2713aSLionel Sambuc // X64: "\01?foo_rapad@@YAXREAPEAD@Z"
83f4a2713aSLionel Sambuc
foo_pbqbd(const char * const * x)84f4a2713aSLionel Sambuc void foo_pbqbd(const char * const* x) {}
85f4a2713aSLionel Sambuc // CHECK: "\01?foo_pbqbd@@YAXPBQBD@Z"
86f4a2713aSLionel Sambuc // X64: "\01?foo_pbqbd@@YAXPEBQEBD@Z"
87f4a2713aSLionel Sambuc
foo_pbqcd(volatile char * const * x)88f4a2713aSLionel Sambuc void foo_pbqcd(volatile char * const* x) {}
89f4a2713aSLionel Sambuc // CHECK: "\01?foo_pbqcd@@YAXPBQCD@Z"
90f4a2713aSLionel Sambuc // X64: "\01?foo_pbqcd@@YAXPEBQECD@Z"
91f4a2713aSLionel Sambuc
foo_pcrbd(const char * volatile * x)92f4a2713aSLionel Sambuc void foo_pcrbd(const char * volatile* x) {}
93f4a2713aSLionel Sambuc // CHECK: "\01?foo_pcrbd@@YAXPCRBD@Z"
94f4a2713aSLionel Sambuc // X64: "\01?foo_pcrbd@@YAXPECREBD@Z"
95f4a2713aSLionel Sambuc
foo_pcrcd(volatile char * volatile * x)96f4a2713aSLionel Sambuc void foo_pcrcd(volatile char * volatile* x) {}
97f4a2713aSLionel Sambuc // CHECK: "\01?foo_pcrcd@@YAXPCRCD@Z"
98f4a2713aSLionel Sambuc // X64: "\01?foo_pcrcd@@YAXPECRECD@Z"
99f4a2713aSLionel Sambuc
foo_aad(char & x)100f4a2713aSLionel Sambuc void foo_aad(char &x) {}
101f4a2713aSLionel Sambuc // CHECK: "\01?foo_aad@@YAXAAD@Z"
102f4a2713aSLionel Sambuc // X64: "\01?foo_aad@@YAXAEAD@Z"
103f4a2713aSLionel Sambuc
foo_abd(const char & x)104f4a2713aSLionel Sambuc void foo_abd(const char &x) {}
105f4a2713aSLionel Sambuc // CHECK: "\01?foo_abd@@YAXABD@Z"
106f4a2713aSLionel Sambuc // X64: "\01?foo_abd@@YAXAEBD@Z"
107f4a2713aSLionel Sambuc
foo_aapad(char * & x)108f4a2713aSLionel Sambuc void foo_aapad(char *&x) {}
109f4a2713aSLionel Sambuc // CHECK: "\01?foo_aapad@@YAXAAPAD@Z"
110f4a2713aSLionel Sambuc // X64: "\01?foo_aapad@@YAXAEAPEAD@Z"
111f4a2713aSLionel Sambuc
foo_aapbd(const char * & x)112f4a2713aSLionel Sambuc void foo_aapbd(const char *&x) {}
113f4a2713aSLionel Sambuc // CHECK: "\01?foo_aapbd@@YAXAAPBD@Z"
114f4a2713aSLionel Sambuc // X64: "\01?foo_aapbd@@YAXAEAPEBD@Z"
115f4a2713aSLionel Sambuc
foo_abqad(char * const & x)116f4a2713aSLionel Sambuc void foo_abqad(char * const &x) {}
117f4a2713aSLionel Sambuc // CHECK: "\01?foo_abqad@@YAXABQAD@Z"
118f4a2713aSLionel Sambuc // X64: "\01?foo_abqad@@YAXAEBQEAD@Z"
119f4a2713aSLionel Sambuc
foo_abqbd(const char * const & x)120f4a2713aSLionel Sambuc void foo_abqbd(const char * const &x) {}
121f4a2713aSLionel Sambuc // CHECK: "\01?foo_abqbd@@YAXABQBD@Z"
122f4a2713aSLionel Sambuc // X64: "\01?foo_abqbd@@YAXAEBQEBD@Z"
123f4a2713aSLionel Sambuc
foo_aay144h(int (& x)[5][5])124f4a2713aSLionel Sambuc void foo_aay144h(int (&x)[5][5]) {}
125f4a2713aSLionel Sambuc // CHECK: "\01?foo_aay144h@@YAXAAY144H@Z"
126f4a2713aSLionel Sambuc // X64: "\01?foo_aay144h@@YAXAEAY144H@Z"
127f4a2713aSLionel Sambuc
foo_aay144cbh(const int (& x)[5][5])128f4a2713aSLionel Sambuc void foo_aay144cbh(const int (&x)[5][5]) {}
129f4a2713aSLionel Sambuc // CHECK: "\01?foo_aay144cbh@@YAXAAY144$$CBH@Z"
130f4a2713aSLionel Sambuc // X64: "\01?foo_aay144cbh@@YAXAEAY144$$CBH@Z"
131f4a2713aSLionel Sambuc
132f4a2713aSLionel Sambuc void foo_qay144h(int (&&x)[5][5]) {}
133f4a2713aSLionel Sambuc // CHECK: "\01?foo_qay144h@@YAX$$QAY144H@Z"
134f4a2713aSLionel Sambuc // X64: "\01?foo_qay144h@@YAX$$QEAY144H@Z"
135f4a2713aSLionel Sambuc
136f4a2713aSLionel Sambuc void foo_qay144cbh(const int (&&x)[5][5]) {}
137f4a2713aSLionel Sambuc // CHECK: "\01?foo_qay144cbh@@YAX$$QAY144$$CBH@Z"
138f4a2713aSLionel Sambuc // X64: "\01?foo_qay144cbh@@YAX$$QEAY144$$CBH@Z"
139f4a2713aSLionel Sambuc
foo_p6ahxz(int x ())140f4a2713aSLionel Sambuc void foo_p6ahxz(int x()) {}
141f4a2713aSLionel Sambuc // CHECK: "\01?foo_p6ahxz@@YAXP6AHXZ@Z"
142f4a2713aSLionel Sambuc // X64: "\01?foo_p6ahxz@@YAXP6AHXZ@Z"
143f4a2713aSLionel Sambuc
foo_a6ahxz(int (& x)())144f4a2713aSLionel Sambuc void foo_a6ahxz(int (&x)()) {}
145f4a2713aSLionel Sambuc // CHECK: "\01?foo_a6ahxz@@YAXA6AHXZ@Z"
146f4a2713aSLionel Sambuc // X64: "\01?foo_a6ahxz@@YAXA6AHXZ@Z"
147f4a2713aSLionel Sambuc
148f4a2713aSLionel Sambuc void foo_q6ahxz(int (&&x)()) {}
149f4a2713aSLionel Sambuc // CHECK: "\01?foo_q6ahxz@@YAX$$Q6AHXZ@Z"
150f4a2713aSLionel Sambuc // X64: "\01?foo_q6ahxz@@YAX$$Q6AHXZ@Z"
151f4a2713aSLionel Sambuc
foo_qay04h(int x[5][5])152f4a2713aSLionel Sambuc void foo_qay04h(int x[5][5]) {}
153f4a2713aSLionel Sambuc // CHECK: "\01?foo_qay04h@@YAXQAY04H@Z"
154f4a2713aSLionel Sambuc // X64: "\01?foo_qay04h@@YAXQEAY04H@Z"
155f4a2713aSLionel Sambuc
foo_qay04cbh(const int x[5][5])156f4a2713aSLionel Sambuc void foo_qay04cbh(const int x[5][5]) {}
157f4a2713aSLionel Sambuc // CHECK: "\01?foo_qay04cbh@@YAXQAY04$$CBH@Z"
158f4a2713aSLionel Sambuc // X64: "\01?foo_qay04cbh@@YAXQEAY04$$CBH@Z"
159f4a2713aSLionel Sambuc
160f4a2713aSLionel Sambuc typedef double Vector[3];
161f4a2713aSLionel Sambuc
foo(Vector *)162f4a2713aSLionel Sambuc void foo(Vector*) {}
163f4a2713aSLionel Sambuc // CHECK: "\01?foo@@YAXPAY02N@Z"
164f4a2713aSLionel Sambuc // X64: "\01?foo@@YAXPEAY02N@Z"
165f4a2713aSLionel Sambuc
foo(Vector)166f4a2713aSLionel Sambuc void foo(Vector) {}
167f4a2713aSLionel Sambuc // CHECK: "\01?foo@@YAXQAN@Z"
168f4a2713aSLionel Sambuc // X64: "\01?foo@@YAXQEAN@Z"
169f4a2713aSLionel Sambuc
foo_const(const Vector)170f4a2713aSLionel Sambuc void foo_const(const Vector) {}
171f4a2713aSLionel Sambuc // CHECK: "\01?foo_const@@YAXQBN@Z"
172f4a2713aSLionel Sambuc // X64: "\01?foo_const@@YAXQEBN@Z"
173f4a2713aSLionel Sambuc
foo_volatile(volatile Vector)174f4a2713aSLionel Sambuc void foo_volatile(volatile Vector) {}
175f4a2713aSLionel Sambuc // CHECK: "\01?foo_volatile@@YAXQCN@Z"
176f4a2713aSLionel Sambuc // X64: "\01?foo_volatile@@YAXQECN@Z"
177f4a2713aSLionel Sambuc
foo(Vector *,const Vector,const double)178f4a2713aSLionel Sambuc void foo(Vector*, const Vector, const double) {}
179f4a2713aSLionel Sambuc // CHECK: "\01?foo@@YAXPAY02NQBNN@Z"
180f4a2713aSLionel Sambuc // X64: "\01?foo@@YAXPEAY02NQEBNN@Z"
181f4a2713aSLionel Sambuc
182f4a2713aSLionel Sambuc typedef void (*ConstFunPtr)(int *const d);
foo_fnptrconst(ConstFunPtr f)183f4a2713aSLionel Sambuc void foo_fnptrconst(ConstFunPtr f) { }
184f4a2713aSLionel Sambuc // CHECK: "\01?foo_fnptrconst@@YAXP6AXQAH@Z@Z"
185f4a2713aSLionel Sambuc // X64: "\01?foo_fnptrconst@@YAXP6AXQEAH@Z@Z"
186f4a2713aSLionel Sambuc
187f4a2713aSLionel Sambuc typedef void (*ArrayFunPtr)(int d[1]);
foo_fnptrarray(ArrayFunPtr f)188f4a2713aSLionel Sambuc void foo_fnptrarray(ArrayFunPtr f) { }
189f4a2713aSLionel Sambuc // CHECK: "\01?foo_fnptrarray@@YAXP6AXQAH@Z@Z"
190f4a2713aSLionel Sambuc // X64: "\01?foo_fnptrarray@@YAXP6AXQEAH@Z@Z"
191f4a2713aSLionel Sambuc
foo_fnptrbackref1(ArrayFunPtr f1,ArrayFunPtr f2)192f4a2713aSLionel Sambuc void foo_fnptrbackref1(ArrayFunPtr f1, ArrayFunPtr f2) { }
193f4a2713aSLionel Sambuc // CHECK: "\01?foo_fnptrbackref1@@YAXP6AXQAH@Z1@Z"
194f4a2713aSLionel Sambuc // X64: "\01?foo_fnptrbackref1@@YAXP6AXQEAH@Z1@Z"
195f4a2713aSLionel Sambuc
foo_fnptrbackref2(ArrayFunPtr f1,ConstFunPtr f2)196f4a2713aSLionel Sambuc void foo_fnptrbackref2(ArrayFunPtr f1, ConstFunPtr f2) { }
197f4a2713aSLionel Sambuc // CHECK: "\01?foo_fnptrbackref2@@YAXP6AXQAH@Z1@Z"
198f4a2713aSLionel Sambuc // X64: "\01?foo_fnptrbackref2@@YAXP6AXQEAH@Z1@Z"
199f4a2713aSLionel Sambuc
200f4a2713aSLionel Sambuc typedef void (*NormalFunPtr)(int *d);
foo_fnptrbackref3(ArrayFunPtr f1,NormalFunPtr f2)201f4a2713aSLionel Sambuc void foo_fnptrbackref3(ArrayFunPtr f1, NormalFunPtr f2) { }
202f4a2713aSLionel Sambuc // CHECK: "\01?foo_fnptrbackref3@@YAXP6AXQAH@Z1@Z"
203f4a2713aSLionel Sambuc // X64: "\01?foo_fnptrbackref3@@YAXP6AXQEAH@Z1@Z"
204f4a2713aSLionel Sambuc
foo_fnptrbackref4(NormalFunPtr f1,ArrayFunPtr f2)205f4a2713aSLionel Sambuc void foo_fnptrbackref4(NormalFunPtr f1, ArrayFunPtr f2) { }
206f4a2713aSLionel Sambuc // CHECK: "\01?foo_fnptrbackref4@@YAXP6AXPAH@Z1@Z"
207f4a2713aSLionel Sambuc // X64: "\01?foo_fnptrbackref4@@YAXP6AXPEAH@Z1@Z"
208f4a2713aSLionel Sambuc
ret_fnptrarray()209f4a2713aSLionel Sambuc ArrayFunPtr ret_fnptrarray() { return 0; }
210f4a2713aSLionel Sambuc // CHECK: "\01?ret_fnptrarray@@YAP6AXQAH@ZXZ"
211f4a2713aSLionel Sambuc // X64: "\01?ret_fnptrarray@@YAP6AXQEAH@ZXZ"
212f4a2713aSLionel Sambuc
213f4a2713aSLionel Sambuc // Test that we mangle the forward decl when we have a redeclaration with a
214f4a2713aSLionel Sambuc // slightly different type.
215f4a2713aSLionel Sambuc void mangle_fwd(char * const x);
mangle_fwd(char * x)216f4a2713aSLionel Sambuc void mangle_fwd(char * x) {}
217f4a2713aSLionel Sambuc // CHECK: "\01?mangle_fwd@@YAXQAD@Z"
218f4a2713aSLionel Sambuc // X64: "\01?mangle_fwd@@YAXQEAD@Z"
219f4a2713aSLionel Sambuc
mangle_no_fwd(char * x)220f4a2713aSLionel Sambuc void mangle_no_fwd(char * x) {}
221f4a2713aSLionel Sambuc // CHECK: "\01?mangle_no_fwd@@YAXPAD@Z"
222f4a2713aSLionel Sambuc // X64: "\01?mangle_no_fwd@@YAXPEAD@Z"
223f4a2713aSLionel Sambuc
224f4a2713aSLionel Sambuc // The first argument gets mangled as-if it were written "int *const"
225f4a2713aSLionel Sambuc // The second arg should not form a backref because it isn't qualified
mangle_no_backref0(int[],int *)226f4a2713aSLionel Sambuc void mangle_no_backref0(int[], int *) {}
227f4a2713aSLionel Sambuc // CHECK: "\01?mangle_no_backref0@@YAXQAHPAH@Z"
228f4a2713aSLionel Sambuc // X64: "\01?mangle_no_backref0@@YAXQEAHPEAH@Z"
229f4a2713aSLionel Sambuc
mangle_no_backref1(int[],int * const)230f4a2713aSLionel Sambuc void mangle_no_backref1(int[], int *const) {}
231f4a2713aSLionel Sambuc // CHECK: "\01?mangle_no_backref1@@YAXQAHQAH@Z"
232f4a2713aSLionel Sambuc // X64: "\01?mangle_no_backref1@@YAXQEAHQEAH@Z"
233f4a2713aSLionel Sambuc
234f4a2713aSLionel Sambuc typedef void fun_type(void);
235f4a2713aSLionel Sambuc typedef void (*ptr_to_fun_type)(void);
236f4a2713aSLionel Sambuc
237f4a2713aSLionel Sambuc // Pointer to function types don't backref with function types
mangle_no_backref2(fun_type,ptr_to_fun_type)238f4a2713aSLionel Sambuc void mangle_no_backref2(fun_type, ptr_to_fun_type) {}
239f4a2713aSLionel Sambuc // CHECK: "\01?mangle_no_backref2@@YAXP6AXXZP6AXXZ@Z"
240f4a2713aSLionel Sambuc // X64: "\01?mangle_no_backref2@@YAXP6AXXZP6AXXZ@Z"
241f4a2713aSLionel Sambuc
mangle_yes_backref0(int[],int[])242f4a2713aSLionel Sambuc void mangle_yes_backref0(int[], int []) {}
243f4a2713aSLionel Sambuc // CHECK: "\01?mangle_yes_backref0@@YAXQAH0@Z"
244f4a2713aSLionel Sambuc // X64: "\01?mangle_yes_backref0@@YAXQEAH0@Z"
245f4a2713aSLionel Sambuc
mangle_yes_backref1(int * const,int * const)246f4a2713aSLionel Sambuc void mangle_yes_backref1(int *const, int *const) {}
247f4a2713aSLionel Sambuc // CHECK: "\01?mangle_yes_backref1@@YAXQAH0@Z"
248f4a2713aSLionel Sambuc // X64: "\01?mangle_yes_backref1@@YAXQEAH0@Z"
249f4a2713aSLionel Sambuc
mangle_yes_backref2(fun_type * const[],ptr_to_fun_type const[])250f4a2713aSLionel Sambuc void mangle_yes_backref2(fun_type *const[], ptr_to_fun_type const[]) {}
251f4a2713aSLionel Sambuc // CHECK: "\01?mangle_yes_backref2@@YAXQBQ6AXXZ0@Z"
252f4a2713aSLionel Sambuc // X64: "\01?mangle_yes_backref2@@YAXQEBQ6AXXZ0@Z"
253f4a2713aSLionel Sambuc
mangle_yes_backref3(ptr_to_fun_type * const,void (** const)(void))254f4a2713aSLionel Sambuc void mangle_yes_backref3(ptr_to_fun_type *const, void (**const)(void)) {}
255f4a2713aSLionel Sambuc // CHECK: "\01?mangle_yes_backref3@@YAXQAP6AXXZ0@Z"
256f4a2713aSLionel Sambuc // X64: "\01?mangle_yes_backref3@@YAXQEAP6AXXZ0@Z"
257*0a6a1f1dSLionel Sambuc
mangle_yes_backref4(int * const __restrict,int * const __restrict)258*0a6a1f1dSLionel Sambuc void mangle_yes_backref4(int *const __restrict, int *const __restrict) {}
259*0a6a1f1dSLionel Sambuc // CHECK: "\01?mangle_yes_backref4@@YAXQIAH0@Z"
260*0a6a1f1dSLionel Sambuc // X64: "\01?mangle_yes_backref4@@YAXQEIAH0@Z"
261