blob: b648cc3d6e334921c25e92132cb07660554e7fcb [file] [log] [blame]
Zachary Turnera51403f2018-07-30 23:22:39 +00001; These tests are based on clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
2
Zachary Turner931e8792018-07-30 23:02:10 +00003; RUN: llvm-undname < %s | FileCheck %s
4
5; CHECK-NOT: Invalid mangled name
6
7?a@FTypeWithQuals@@3U?$S@$$A8@@BAHXZ@1@A
8; CHECK: struct FTypeWithQuals::S<int __cdecl(void) const> FTypeWithQuals::a
9
10?b@FTypeWithQuals@@3U?$S@$$A8@@CAHXZ@1@A
11; CHECK: struct FTypeWithQuals::S<int __cdecl(void) volatile> FTypeWithQuals::b
12
13?c@FTypeWithQuals@@3U?$S@$$A8@@IAAHXZ@1@A
14; CHECK: struct FTypeWithQuals::S<int __cdecl(void) __restrict> FTypeWithQuals::c
15
16?d@FTypeWithQuals@@3U?$S@$$A8@@GBAHXZ@1@A
17; CHECK: struct FTypeWithQuals::S<int __cdecl(void) const &> FTypeWithQuals::d
18
19?e@FTypeWithQuals@@3U?$S@$$A8@@GCAHXZ@1@A
20; CHECK: struct FTypeWithQuals::S<int __cdecl(void) volatile &> FTypeWithQuals::e
21
22?f@FTypeWithQuals@@3U?$S@$$A8@@IGAAHXZ@1@A
23; CHECK: struct FTypeWithQuals::S<int __cdecl(void) __restrict &> FTypeWithQuals::f
24
25?g@FTypeWithQuals@@3U?$S@$$A8@@HBAHXZ@1@A
26; CHECK: struct FTypeWithQuals::S<int __cdecl(void) const &&> FTypeWithQuals::g
27
28?h@FTypeWithQuals@@3U?$S@$$A8@@HCAHXZ@1@A
29; CHECK: struct FTypeWithQuals::S<int __cdecl(void) volatile &&> FTypeWithQuals::h
30
31?i@FTypeWithQuals@@3U?$S@$$A8@@IHAAHXZ@1@A
32; CHECK: struct FTypeWithQuals::S<int __cdecl(void) __restrict &&> FTypeWithQuals::i
33
34?j@FTypeWithQuals@@3U?$S@$$A6AHXZ@1@A
35; CHECK: struct FTypeWithQuals::S<int __cdecl(void)> FTypeWithQuals::j
36
37?k@FTypeWithQuals@@3U?$S@$$A8@@GAAHXZ@1@A
38; CHECK: struct FTypeWithQuals::S<int __cdecl(void) &> FTypeWithQuals::k
39
40?l@FTypeWithQuals@@3U?$S@$$A8@@HAAHXZ@1@A
41; CHECK: struct FTypeWithQuals::S<int __cdecl(void) &&> FTypeWithQuals::l
42
43?Char16Var@@3_SA
44; CHECK: char16_t Char16Var
45
46?Char32Var@@3_UA
47; CHECK: char32_t Char32Var
48
49?LRef@@YAXAAH@Z
50; CHECK: void __cdecl LRef(int &)
51
52?RRef@@YAH$$QAH@Z
53; CHECK: int __cdecl RRef(int &&)
54
55?Null@@YAX$$T@Z
56; CHECK: void __cdecl Null(std::nullptr_t)
57
58?fun@PR18022@@YA?AU<unnamed-type-a>@1@U21@0@Z
59; CHECK: struct PR18022::<unnamed-type-a> __cdecl PR18022::fun(struct PR18022::<unnamed-type-a>, struct PR18022::<unnamed-type-a>)
60
61; First, we have the static local variable of type "<lambda_1>" inside of "define_lambda".
62; decltype(lambda), where lambda = [] { static int local=42; return 42; };
63?lambda@?1??define_lambda@@YAHXZ@4V<lambda_1>@?0??1@YAHXZ@A
64; CHECK: class `int __cdecl define_lambda(void)'::`1'::<lambda_1> `int __cdecl define_lambda(void)'::`2'::lambda
65
66; Next, we have the "operator()" for "<lambda_1>" which is inside of "define_lambda".
67??R<lambda_1>@?0??define_lambda@@YAHXZ@QBE@XZ
68; CHECK: __thiscall `int __cdecl define_lambda(void)'::`1'::<lambda_1>::operator()(void) const
69
70; Finally, we have the local which is inside of "<lambda_1>" which is inside of "define_lambda".
71?local@?2???R<lambda_1>@?0??define_lambda@@YAHXZ@QBE@XZ@4HA
72; CHECK: __thiscall `int __cdecl define_lambda(void)'::`1'::<lambda_1>::operator()(void) const
73
74??$use_lambda_arg@V<lambda_1>@?0??call_with_lambda_arg1@@YAXXZ@@@YAXV<lambda_1>@?0??call_with_lambda_arg1@@YAXXZ@@Z
75; CHECK: void __cdecl use_lambda_arg<class `void __cdecl call_with_lambda_arg1(void)'::`1'::<lambda_1>>(class `void __cdecl call_with_lambda_arg1(void)'::`1'::<lambda_1>)
76
77?foo@A@PR19361@@QIGAEXXZ
78; CHECK: void __thiscall PR19361::A::foo(void) __restrict &
79
80?foo@A@PR19361@@QIHAEXXZ
81; CHECK: void __thiscall PR19361::A::foo(void) __restrict &&
82
83??__K_deg@@YAHO@Z
84; CHECK: int __cdecl operator ""_deg(long double)
85
86??$templ_fun_with_pack@$S@@YAXXZ
87; CHECK: void __cdecl templ_fun_with_pack<>(void)
88
89??$templ_fun_with_ty_pack@$$$V@@YAXXZ
90; CHECK: void __cdecl templ_fun_with_ty_pack<>(void)
91??$templ_fun_with_ty_pack@$$V@@YAXXZ
92; CHECK: void __cdecl templ_fun_with_ty_pack<>(void)
93
94??$f@$$YAliasA@PR20047@@@PR20047@@YAXXZ
95; CHECK: void __cdecl PR20047::f<PR20047::AliasA>(void)
96
97?f@UnnamedType@@YAXAAU<unnamed-type-TD>@A@1@@Z
98; CHECK: void __cdecl UnnamedType::f(struct UnnamedType::A::<unnamed-type-TD> &)
99
100?f@UnnamedType@@YAXPAW4<unnamed-type-e>@?$B@H@1@@Z
101; CHECK: void __cdecl UnnamedType::f(enum UnnamedType::B<int>::<unnamed-type-e> *)
102
103??$f@W4<unnamed-type-E>@?1??g@PR24651@@YAXXZ@@PR24651@@YAXW4<unnamed-type-E>@?1??g@0@YAXXZ@@Z
104; We have a back-referencing problem here, we print `void __cdecl <unnamed-type-E>::g(void)`
105; for the second occurrence of g.
106; FIXME: void __cdecl PR24651::f<enum `void __cdecl PR24651::g(void)'::`2'::<unnamed-type-E>>(enum `void __cdecl PR24651::g(void)'::`2'::<unnamed-type-E>)
107
108??$f@T<unnamed-type-$S1>@PR18204@@@PR18204@@YAHPAT<unnamed-type-$S1>@0@@Z
109; FIXME: int __cdecl PR18204::f<union PR18204::<unnamed-type-$S1>>(union PR18204::<unnamed-type-$S1> *)
110
111??R<lambda_0>@?0??PR26105@@YAHXZ@QBE@H@Z
112; CHECK: __thiscall `int __cdecl PR26105(void)'::`1'::<lambda_0>::operator()(int) const
113
114??R<lambda_1>@?0???R<lambda_0>@?0??PR26105@@YAHXZ@QBE@H@Z@QBE@H@Z
115; CHECK: __thiscall `__thiscall `int __cdecl PR26105(void)'::`1'::<lambda_0>::operator()(int) const'::`1'::<lambda_1>::operator()(int) const
116
117?unaligned_foo1@@YAPFAHXZ
118; CHECK: int __unaligned * __cdecl unaligned_foo1(void)
119
120?unaligned_foo2@@YAPFAPFAHXZ
121; CHECK: int __unaligned *__unaligned * __cdecl unaligned_foo2(void)
122
123?unaligned_foo3@@YAHXZ
124; CHECK: int __cdecl unaligned_foo3(void)
125
126?unaligned_foo4@@YAXPFAH@Z
127; CHECK: void __cdecl unaligned_foo4(int __unaligned *)
128
129?unaligned_foo5@@YAXPIFAH@Z
130; CHECK: void __cdecl unaligned_foo5(int __unaligned *__restrict)
131
132??$unaligned_foo6@PAH@@YAPAHPAH@Z
133; CHECK: int * __cdecl unaligned_foo6<int *>(int *)
134
135??$unaligned_foo6@PFAH@@YAPFAHPFAH@Z
136; CHECK: int __unaligned * __cdecl unaligned_foo6<int __unaligned *>(int __unaligned *)
137
138?unaligned_foo8@unaligned_foo8_S@@QFCEXXZ
139; CHECK: void __thiscall unaligned_foo8_S::unaligned_foo8(void) volatile __unaligned
140
141??R<lambda_1>@x@A@PR31197@@QBE@XZ
142; CHECK: __thiscall PR31197::A::x::<lambda_1>::operator()(void) const
143
144?white@?1???R<lambda_1>@x@A@PR31197@@QBE@XZ@4HA
145; CHECK: int `__thiscall PR31197::A::x::<lambda_1>::operator()(void) const'::`2'::white
146
147?f@@YAXW4<unnamed-enum-enumerator>@@@Z
148; CHECK: void __cdecl f(enum <unnamed-enum-enumerator>)