1 ; RUN: llvm-undname < %s | FileCheck %s
3 ; CHECK-NOT: Invalid mangled name
18 ; CHECK: int (*x)[3][5]
21 ; CHECK: int const (*x)[3]
24 ; CHECK: unsigned char *x
27 ; CHECK: int (*x)[3500][6]
30 ; CHECK: void __cdecl x(float, int)
33 ; CHECK: int (__cdecl *x)(float, double, int)
36 ; CHECK: int (__cdecl *x)(int (__cdecl *)(float), double)
39 ; CHECK: int (__cdecl *x)(int (__cdecl *)(float), int (__cdecl *)(float))
44 ; Microsoft's undname doesn't handle Q correctly or the multiple occurrences
45 ; of the const modifier. So the results here differ, but ours are correct.
56 ; CHECK: int const *const x
75 ; CHECK: class tmpl<int> *x
78 ; CHECK: struct tmpl<int> *x
81 ; CHECK: union tmpl<int> *x
84 ; CHECK: class klass instance
86 ?instance$initializer$@@3P6AXXZEA
87 ; CHECK: void (__cdecl *instance$initializer$)(void)
90 ; CHECK: __cdecl klass::klass(void)
93 ; CHECK: __cdecl klass::~klass(void)
95 ?x@@YAHPEAVklass@@AEAV1@@Z
96 ; CHECK: int __cdecl x(class klass *, class klass &)
98 ?x@ns@@3PEAV?$klass@HH@1@EA
99 ; CHECK: class ns::klass<int, int> *ns::x
101 ?fn@?$klass@H@ns@@QEBAIXZ
102 ; CHECK: unsigned int __cdecl ns::klass<int>::fn(void) const
105 ??4klass@@QEAAAEBV0@AEBV0@@Z
106 ; CHECK: class klass const & __cdecl klass::operator=(class klass const &)
109 ; CHECK: bool __cdecl klass::operator!(void)
111 ??8klass@@QEAA_NAEBV0@@Z
112 ; CHECK: bool __cdecl klass::operator==(class klass const &)
114 ??9klass@@QEAA_NAEBV0@@Z
115 ; CHECK: bool __cdecl klass::operator!=(class klass const &)
118 ; CHECK: int __cdecl klass::operator[](unsigned __int64)
121 ; CHECK: int __cdecl klass::operator->(void)
124 ; CHECK: int __cdecl klass::operator*(void)
127 ; CHECK: int __cdecl klass::operator++(void)
130 ; CHECK: int __cdecl klass::operator++(int)
133 ; CHECK: int __cdecl klass::operator--(void)
136 ; CHECK: int __cdecl klass::operator--(int)
139 ; CHECK: int __cdecl klass::operator+(int)
142 ; CHECK: int __cdecl klass::operator-(int)
145 ; CHECK: int __cdecl klass::operator&(int)
148 ; CHECK: int __cdecl klass::operator->*(int)
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~(void)
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*=(int)
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)
210 ??6@YAAEBVklass@@AEBV0@H@Z
211 ; CHECK: class klass const & __cdecl operator<<(class klass const &, int)
213 ??5@YAAEBVklass@@AEBV0@_K@Z
214 ; CHECK: class klass const & __cdecl operator>>(class klass const &, unsigned __int64)
216 ??2@YAPEAX_KAEAVklass@@@Z
217 ; CHECK: void * __cdecl operator new(unsigned __int64, class klass &)
219 ??_U@YAPEAX_KAEAVklass@@@Z
220 ; CHECK: void * __cdecl operator new[](unsigned __int64, class klass &)
222 ??3@YAXPEAXAEAVklass@@@Z
223 ; CHECK: void __cdecl operator delete(void *, class klass &)
225 ??_V@YAXPEAXAEAVklass@@@Z
226 ; CHECK: void __cdecl operator delete[](void *, class klass &)
228 ; ?A@?A0x43583946@@3VB@@B
229 class B const `anonymous namespace'::A