1 ; These tests are based on clang/test/CodeGenCXX/mangle-ms-template-callback.cpp
3 ; RUN: llvm-undname < %s | FileCheck %s
5 ; CHECK-NOT: Invalid mangled name
7 ?callback_void@@3V?$C@$$A6AXXZ@@A
8 ; CHECK: class C<void __cdecl(void)> callback_void
10 ?callback_void_volatile@@3V?$C@$$A6AXXZ@@C
11 ; CHECK: class C<void __cdecl(void)> volatile callback_void_volatile
13 ?callback_int@@3V?$C@$$A6AHXZ@@A
14 ; CHECK: C<int __cdecl(void)> callback_int
16 ?callback_Type@@3V?$C@$$A6A?AVType@@XZ@@A
17 ; CHECK: C<class Type __cdecl(void)> callback_Type
19 ?callback_void_int@@3V?$C@$$A6AXH@Z@@A
20 ; CHECK: C<void __cdecl(int)> callback_void_int
22 ?callback_int_int@@3V?$C@$$A6AHH@Z@@A
23 ; CHECK: C<int __cdecl(int)> callback_int_int
25 ?callback_void_Type@@3V?$C@$$A6AXVType@@@Z@@A
26 ; CHECK: C<void __cdecl(class Type)> callback_void_Type
28 ?foo@@YAXV?$C@$$A6AXXZ@@@Z
29 ; CHECK: void __cdecl foo(class C<void __cdecl(void)>)
31 ?function@@YAXV?$C@$$A6AXXZ@@@Z
32 ; CHECK: void __cdecl function(class C<void __cdecl(void)>)
34 ?function_pointer@@YAXV?$C@P6AXXZ@@@Z
35 ; CHECK: void __cdecl function_pointer(class C<void (__cdecl *)(void)>)
37 ?member_pointer@@YAXV?$C@P8Z@@AEXXZ@@@Z
38 ; CHECK: void __cdecl member_pointer(class C<void (__thiscall Z::*)(void)>)
40 ??$bar@P6AHH@Z@@YAXP6AHH@Z@Z
41 ; CHECK: void __cdecl bar<int (__cdecl *)(int)>(int (__cdecl *)(int))
43 ??$WrapFnPtr@$1?VoidFn@@YAXXZ@@YAXXZ
44 ; CHECK: void __cdecl WrapFnPtr<&void __cdecl VoidFn(void)>(void)
46 ??$WrapFnRef@$1?VoidFn@@YAXXZ@@YAXXZ
47 ; CHECK: void __cdecl WrapFnRef<&void __cdecl VoidFn(void)>(void)
49 ??$WrapFnPtr@$1?VoidStaticMethod@Thing@@SAXXZ@@YAXXZ
50 ; CHECK: void __cdecl WrapFnPtr<&public: static void __cdecl Thing::VoidStaticMethod(void)>(void)
52 ??$WrapFnRef@$1?VoidStaticMethod@Thing@@SAXXZ@@YAXXZ
53 ; CHECK: void __cdecl WrapFnRef<&public: static void __cdecl Thing::VoidStaticMethod(void)>(void)