1 ; RUN: llvm-undname < %s | FileCheck %s
3 ; CHECK-NOT: Invalid mangled name
15 ; CHECK: unsigned long foo[3][4]
21 ; CHECK: int (*x)[3][5]
24 ; CHECK: int const (*x)[3]
27 ; CHECK: unsigned char *x
30 ; CHECK: unsigned short *y
33 ; CHECK: unsigned long *z
36 ; CHECK: int (*x)[3500][6]
39 ; CHECK: void __cdecl x(float, int)
42 ; CHECK: void __cdecl x(float, int, ...)
45 ; CHECK: void __cdecl x(...)
48 ; CHECK: int (__cdecl *x)(float, double, int)
51 ; CHECK: int (__cdecl *x)(int (__cdecl *)(float), double)
54 ; CHECK: int (__cdecl *x)(int (__cdecl *)(float), int (__cdecl *)(float))
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.
71 ; CHECK: int const *const x
90 ; CHECK: class tmpl<int> *x
93 ; CHECK: struct tmpl<int> *x
96 ; CHECK: union tmpl<int> *x
99 ; CHECK: class klass instance
101 ?instance$initializer$@@3P6AXXZEA
102 ; CHECK: void (__cdecl *instance$initializer$)(void)
105 ; CHECK: __cdecl klass::klass(void)
108 ; CHECK: __cdecl klass::~klass(void)
110 ?x@@YAHPEAVklass@@AEAV1@@Z
111 ; CHECK: int __cdecl x(class klass *, class klass &)
113 ?x@ns@@3PEAV?$klass@HH@1@EA
114 ; CHECK: class ns::klass<int, int> *ns::x
116 ?fn@?$klass@H@ns@@QEBAIXZ
117 ; CHECK: unsigned int __cdecl ns::klass<int>::fn(void) const
120 ??4klass@@QEAAAEBV0@AEBV0@@Z
121 ; CHECK: class klass const & __cdecl klass::operator=(class klass const &)
124 ; CHECK: bool __cdecl klass::operator!(void)
126 ??8klass@@QEAA_NAEBV0@@Z
127 ; CHECK: bool __cdecl klass::operator==(class klass const &)
129 ??9klass@@QEAA_NAEBV0@@Z
130 ; CHECK: bool __cdecl klass::operator!=(class klass const &)
133 ; CHECK: int __cdecl klass::operator[](unsigned __int64)
136 ; CHECK: int __cdecl klass::operator->(void)
139 ; CHECK: int __cdecl klass::operator*(void)
142 ; CHECK: int __cdecl klass::operator++(void)
145 ; CHECK: int __cdecl klass::operator++(int)
148 ; CHECK: int __cdecl klass::operator--(void)
151 ; CHECK: int __cdecl klass::operator--(int)
154 ; CHECK: int __cdecl klass::operator+(int)
157 ; CHECK: int __cdecl klass::operator-(int)
160 ; CHECK: int __cdecl klass::operator&(int)
163 ; CHECK: int __cdecl klass::operator->*(int)
166 ; CHECK: int __cdecl klass::operator/(int)
169 ; CHECK: int __cdecl klass::operator<(int)
172 ; CHECK: int __cdecl klass::operator<=(int)
175 ; CHECK: int __cdecl klass::operator>(int)
178 ; CHECK: int __cdecl klass::operator>=(int)
181 ; CHECK: int __cdecl klass::operator,(int)
184 ; CHECK: int __cdecl klass::operator()(int)
187 ; CHECK: int __cdecl klass::operator~(void)
190 ; CHECK: int __cdecl klass::operator^(int)
193 ; CHECK: int __cdecl klass::operator|(int)
196 ; CHECK: int __cdecl klass::operator&&(int)
199 ; CHECK: int __cdecl klass::operator||(int)
202 ; CHECK: int __cdecl klass::operator*=(int)
205 ; CHECK: int __cdecl klass::operator+=(int)
208 ; CHECK: int __cdecl klass::operator-=(int)
211 ; CHECK: int __cdecl klass::operator/=(int)
214 ; CHECK: int __cdecl klass::operator%=(int)
217 ; CHECK: int __cdecl klass::operator>>=(int)
220 ; CHECK: int __cdecl klass::operator<<=(int)
223 ; CHECK: int __cdecl klass::operator^=(int)
225 ??6@YAAEBVklass@@AEBV0@H@Z
226 ; CHECK: class klass const & __cdecl operator<<(class klass const &, int)
228 ??5@YAAEBVklass@@AEBV0@_K@Z
229 ; CHECK: class klass const & __cdecl operator>>(class klass const &, unsigned __int64)
231 ??2@YAPEAX_KAEAVklass@@@Z
232 ; CHECK: void * __cdecl operator new(unsigned __int64, class klass &)
234 ??_U@YAPEAX_KAEAVklass@@@Z
235 ; CHECK: void * __cdecl operator new[](unsigned __int64, class klass &)
237 ??3@YAXPEAXAEAVklass@@@Z
238 ; CHECK: void __cdecl operator delete(void *, class klass &)
240 ??_V@YAXPEAXAEAVklass@@@Z
241 ; CHECK: void __cdecl operator delete[](void *, class klass &)
243 ?A@?A0x43583946@@3VB@@B
244 ; CHECK: class B const `anonymous namespace'::A