1; RUN: llvm-undname < %s | FileCheck %s
2
3; CHECK-NOT: Invalid mangled name
4
5?x@@3HA
6; CHECK: int x
7
8?x@@3PEAHEA
9; CHECK: int *x
10
11?x@@3PEAPEAHEA
12; CHECK: int **x
13
14?foo@@3Y123KA
15; CHECK: unsigned long foo[3][4]
16
17?x@@3PEAY02HEA
18; CHECK: int (*x)[3]
19
20?x@@3PEAY124HEA
21; CHECK: int (*x)[3][5]
22
23?x@@3PEAY02$$CBHEA
24; CHECK: int const (*x)[3]
25
26?x@@3PEAEEA
27; CHECK: unsigned char *x
28
29?y@@3PEAGEA
30; CHECK: unsigned short *y
31
32?z@@3PEAKEA
33; CHECK: unsigned long *z
34
35?x@@3PEAY1NKM@5HEA
36; CHECK: int (*x)[3500][6]
37
38?x@@YAXMH@Z
39; CHECK: void __cdecl x(float, int)
40
41?x@@YAXMHZZ
42; CHECK: void __cdecl x(float, int, ...)
43
44?x@@YAXZZ
45; CHECK: void __cdecl x(...)
46
47?x@@3P6AHMNH@ZEA
48; CHECK: int (__cdecl *x)(float, double, int)
49
50?x@@3P6AHP6AHM@ZN@ZEA
51; CHECK: int (__cdecl *x)(int (__cdecl *)(float), double)
52
53?x@@3P6AHP6AHM@Z0@ZEA
54; CHECK: int (__cdecl *x)(int (__cdecl *)(float), int (__cdecl *)(float))
55
56?x@ns@@3HA
57; CHECK: int ns::x
58
59; Microsoft's undname doesn't handle Q correctly or the multiple occurrences
60; of the const modifier.  So the results here differ, but ours are correct.
61?x@@3PEAHEA
62; CHECK: int *x
63
64?x@@3PEBHEB
65; CHECK: int const *x
66
67?x@@3QEAHEA
68; CHECK: int *const x
69
70?x@@3QEBHEB
71; CHECK: int const *const x
72
73
74?x@@3AEBHEB
75; CHECK: int const &x
76
77?x@@3PEAUty@@EA
78; CHECK: struct ty *x
79
80?x@@3PEATty@@EA
81; CHECK: union ty *x
82
83?x@@3PEAVty@@EA
84; CHECK: class ty *x
85
86?x@@3PEAW4ty@@EA
87; CHECK: enum ty *x
88
89?x@@3PEAV?$tmpl@H@@EA
90; CHECK: class tmpl<int> *x
91
92?x@@3PEAU?$tmpl@H@@EA
93; CHECK: struct tmpl<int> *x
94
95?x@@3PEAT?$tmpl@H@@EA
96; CHECK: union tmpl<int> *x
97
98?instance@@3Vklass@@A
99; CHECK: class klass instance
100
101?instance$initializer$@@3P6AXXZEA
102; CHECK: void (__cdecl *instance$initializer$)(void)
103
104??0klass@@QEAA@XZ
105; CHECK: __cdecl klass::klass(void)
106
107??1klass@@QEAA@XZ
108; CHECK: __cdecl klass::~klass(void)
109
110?x@@YAHPEAVklass@@AEAV1@@Z
111; CHECK: int __cdecl x(class klass *, class klass &)
112
113?x@ns@@3PEAV?$klass@HH@1@EA
114; CHECK: class ns::klass<int, int> *ns::x
115
116?fn@?$klass@H@ns@@QEBAIXZ
117; CHECK: unsigned int __cdecl ns::klass<int>::fn(void) const
118
119
120??4klass@@QEAAAEBV0@AEBV0@@Z
121; CHECK: class klass const & __cdecl klass::operator=(class klass const &)
122
123??7klass@@QEAA_NXZ
124; CHECK: bool __cdecl klass::operator!(void)
125
126??8klass@@QEAA_NAEBV0@@Z
127; CHECK: bool __cdecl klass::operator==(class klass const &)
128
129??9klass@@QEAA_NAEBV0@@Z
130; CHECK: bool __cdecl klass::operator!=(class klass const &)
131
132??Aklass@@QEAAH_K@Z
133; CHECK: int __cdecl klass::operator[](unsigned __int64)
134
135??Cklass@@QEAAHXZ
136; CHECK: int __cdecl klass::operator->(void)
137
138??Dklass@@QEAAHXZ
139; CHECK: int __cdecl klass::operator*(void)
140
141??Eklass@@QEAAHXZ
142; CHECK: int __cdecl klass::operator++(void)
143
144??Eklass@@QEAAHH@Z
145; CHECK: int __cdecl klass::operator++(int)
146
147??Fklass@@QEAAHXZ
148; CHECK: int __cdecl klass::operator--(void)
149
150??Fklass@@QEAAHH@Z
151; CHECK: int __cdecl klass::operator--(int)
152
153??Hklass@@QEAAHH@Z
154; CHECK: int __cdecl klass::operator+(int)
155
156??Gklass@@QEAAHH@Z
157; CHECK: int __cdecl klass::operator-(int)
158
159??Iklass@@QEAAHH@Z
160; CHECK: int __cdecl klass::operator&(int)
161
162??Jklass@@QEAAHH@Z
163; CHECK: int __cdecl klass::operator->*(int)
164
165??Kklass@@QEAAHH@Z
166; CHECK: int __cdecl klass::operator/(int)
167
168??Mklass@@QEAAHH@Z
169; CHECK: int __cdecl klass::operator<(int)
170
171??Nklass@@QEAAHH@Z
172; CHECK: int __cdecl klass::operator<=(int)
173
174??Oklass@@QEAAHH@Z
175; CHECK: int __cdecl klass::operator>(int)
176
177??Pklass@@QEAAHH@Z
178; CHECK: int __cdecl klass::operator>=(int)
179
180??Qklass@@QEAAHH@Z
181; CHECK: int __cdecl klass::operator,(int)
182
183??Rklass@@QEAAHH@Z
184; CHECK: int __cdecl klass::operator()(int)
185
186??Sklass@@QEAAHXZ
187; CHECK: int __cdecl klass::operator~(void)
188
189??Tklass@@QEAAHH@Z
190; CHECK: int __cdecl klass::operator^(int)
191
192??Uklass@@QEAAHH@Z
193; CHECK: int __cdecl klass::operator|(int)
194
195??Vklass@@QEAAHH@Z
196; CHECK: int __cdecl klass::operator&&(int)
197
198??Wklass@@QEAAHH@Z
199; CHECK: int __cdecl klass::operator||(int)
200
201??Xklass@@QEAAHH@Z
202; CHECK: int __cdecl klass::operator*=(int)
203
204??Yklass@@QEAAHH@Z
205; CHECK: int __cdecl klass::operator+=(int)
206
207??Zklass@@QEAAHH@Z
208; CHECK: int __cdecl klass::operator-=(int)
209
210??_0klass@@QEAAHH@Z
211; CHECK: int __cdecl klass::operator/=(int)
212
213??_1klass@@QEAAHH@Z
214; CHECK: int __cdecl klass::operator%=(int)
215
216??_2klass@@QEAAHH@Z
217; CHECK: int __cdecl klass::operator>>=(int)
218
219??_3klass@@QEAAHH@Z
220; CHECK: int __cdecl klass::operator<<=(int)
221
222??_6klass@@QEAAHH@Z
223; CHECK: int __cdecl klass::operator^=(int)
224
225??6@YAAEBVklass@@AEBV0@H@Z
226; CHECK: class klass const & __cdecl operator<<(class klass const &, int)
227
228??5@YAAEBVklass@@AEBV0@_K@Z
229; CHECK: class klass const & __cdecl operator>>(class klass const &, unsigned __int64)
230
231??2@YAPEAX_KAEAVklass@@@Z
232; CHECK: void * __cdecl operator new(unsigned __int64, class klass &)
233
234??_U@YAPEAX_KAEAVklass@@@Z
235; CHECK: void * __cdecl operator new[](unsigned __int64, class klass &)
236
237??3@YAXPEAXAEAVklass@@@Z
238; CHECK: void __cdecl operator delete(void *, class klass &)
239
240??_V@YAXPEAXAEAVklass@@@Z
241; CHECK: void __cdecl operator delete[](void *, class klass &)
242
243?A@?A0x43583946@@3VB@@B
244; CHECK: class B const `anonymous namespace'::A
245