[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / llvm / test / Demangle / ms-cxx11.test
blobb9815da7f2aa4acba757692f5e06d2cde143d257
1 ; These tests are based on clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
3 ; RUN: llvm-undname < %s | FileCheck %s
5 ; CHECK-NOT: Invalid mangled name
7 ?a@FTypeWithQuals@@3U?$S@$$A8@@BAHXZ@1@A
8 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) const> FTypeWithQuals::a
10 ?b@FTypeWithQuals@@3U?$S@$$A8@@CAHXZ@1@A
11 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) volatile> FTypeWithQuals::b
13 ?c@FTypeWithQuals@@3U?$S@$$A8@@IAAHXZ@1@A
14 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) __restrict> FTypeWithQuals::c
16 ?d@FTypeWithQuals@@3U?$S@$$A8@@GBAHXZ@1@A
17 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) const &> FTypeWithQuals::d
19 ?e@FTypeWithQuals@@3U?$S@$$A8@@GCAHXZ@1@A
20 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) volatile &> FTypeWithQuals::e
22 ?f@FTypeWithQuals@@3U?$S@$$A8@@IGAAHXZ@1@A
23 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) __restrict &> FTypeWithQuals::f
25 ?g@FTypeWithQuals@@3U?$S@$$A8@@HBAHXZ@1@A
26 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) const &&> FTypeWithQuals::g
28 ?h@FTypeWithQuals@@3U?$S@$$A8@@HCAHXZ@1@A
29 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) volatile &&> FTypeWithQuals::h
31 ?i@FTypeWithQuals@@3U?$S@$$A8@@IHAAHXZ@1@A
32 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) __restrict &&> FTypeWithQuals::i
34 ?j@FTypeWithQuals@@3U?$S@$$A6AHXZ@1@A
35 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void)> FTypeWithQuals::j
37 ?k@FTypeWithQuals@@3U?$S@$$A8@@GAAHXZ@1@A
38 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) &> FTypeWithQuals::k
40 ?l@FTypeWithQuals@@3U?$S@$$A8@@HAAHXZ@1@A
41 ; CHECK: struct FTypeWithQuals::S<int __cdecl(void) &&> FTypeWithQuals::l
43 ?Char16Var@@3_SA
44 ; CHECK: char16_t Char16Var
46 ?Char32Var@@3_UA
47 ; CHECK: char32_t Char32Var
49 ?LRef@@YAXAAH@Z
50 ; CHECK: void __cdecl LRef(int &)
52 ?RRef@@YAH$$QAH@Z
53 ; CHECK: int __cdecl RRef(int &&)
55 ?Null@@YAX$$T@Z
56 ; CHECK: void __cdecl Null(std::nullptr_t)
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>)
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
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
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
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>)
77 ?foo@A@PR19361@@QIGAEXXZ
78 ; CHECK: void __thiscall PR19361::A::foo(void) __restrict &
80 ?foo@A@PR19361@@QIHAEXXZ
81 ; CHECK: void __thiscall PR19361::A::foo(void) __restrict &&
83 ??__K_deg@@YAHO@Z
84 ; CHECK: int __cdecl operator ""_deg(long double)
86 ??$templ_fun_with_pack@$S@@YAXXZ
87 ; CHECK: void __cdecl templ_fun_with_pack<>(void)
89 ; $$Z is a parameter pack separator.
90 ??$func@H$$ZH@@YAHAEBU?$Foo@H@@0@Z
91 ; CHECK: int __cdecl func<int, int>(struct Foo<int> const &, struct Foo<int> const &)
93 ??$templ_fun_with_ty_pack@$$$V@@YAXXZ
94 ; CHECK: void __cdecl templ_fun_with_ty_pack<>(void)
95 ??$templ_fun_with_ty_pack@$$V@@YAXXZ
96 ; CHECK: void __cdecl templ_fun_with_ty_pack<>(void)
98 ??$f@$$YAliasA@PR20047@@@PR20047@@YAXXZ
99 ; CHECK: void __cdecl PR20047::f<PR20047::AliasA>(void)
101 ?f@UnnamedType@@YAXAAU<unnamed-type-TD>@A@1@@Z
102 ; CHECK: void __cdecl UnnamedType::f(struct UnnamedType::A::<unnamed-type-TD> &)
104 ?f@UnnamedType@@YAXPAW4<unnamed-type-e>@?$B@H@1@@Z
105 ; CHECK: void __cdecl UnnamedType::f(enum UnnamedType::B<int>::<unnamed-type-e> *)
107 ??$f@W4<unnamed-type-E>@?1??g@PR24651@@YAXXZ@@PR24651@@YAXW4<unnamed-type-E>@?1??g@0@YAXXZ@@Z
108 ; CHECK: void __cdecl PR24651::f<enum `void __cdecl PR24651::g(void)'::`2'::<unnamed-type-E>>(enum `void __cdecl PR24651::g(void)'::`2'::<unnamed-type-E>)
110 ??$f@T<unnamed-type-$S1>@PR18204@@@PR18204@@YAHPAT<unnamed-type-$S1>@0@@Z
111 ; CHECK: int __cdecl PR18204::f<union PR18204::<unnamed-type-$S1>>(union PR18204::<unnamed-type-$S1> *)
113 ??R<lambda_0>@?0??PR26105@@YAHXZ@QBE@H@Z
114 ; CHECK: public: __thiscall `int __cdecl PR26105(void)'::`1'::<lambda_0>::operator()(int) const
116 ??R<lambda_1>@?0???R<lambda_0>@?0??PR26105@@YAHXZ@QBE@H@Z@QBE@H@Z
117 ; CHECK: public: __thiscall `public: __thiscall `int __cdecl PR26105(void)'::`1'::<lambda_0>::operator()(int) const'::`1'::<lambda_1>::operator()(int) const
119 ?unaligned_foo1@@YAPFAHXZ
120 ; CHECK: int __unaligned * __cdecl unaligned_foo1(void)
122 ?unaligned_foo2@@YAPFAPFAHXZ
123 ; CHECK: int __unaligned *__unaligned * __cdecl unaligned_foo2(void)
125 ?unaligned_foo3@@YAHXZ
126 ; CHECK: int __cdecl unaligned_foo3(void)
128 ?unaligned_foo4@@YAXPFAH@Z
129 ; CHECK: void __cdecl unaligned_foo4(int __unaligned *)
131 ?unaligned_foo5@@YAXPIFAH@Z
132 ; CHECK: void __cdecl unaligned_foo5(int __unaligned *__restrict)
134 ??$unaligned_foo6@PAH@@YAPAHPAH@Z
135 ; CHECK: int * __cdecl unaligned_foo6<int *>(int *)
137 ??$unaligned_foo6@PFAH@@YAPFAHPFAH@Z
138 ; CHECK: int __unaligned * __cdecl unaligned_foo6<int __unaligned *>(int __unaligned *)
140 ?unaligned_foo8@unaligned_foo8_S@@QFCEXXZ
141 ; CHECK: void __thiscall unaligned_foo8_S::unaligned_foo8(void) volatile __unaligned
143 ??R<lambda_1>@x@A@PR31197@@QBE@XZ
144 ; CHECK: __thiscall PR31197::A::x::<lambda_1>::operator()(void) const
146 ?white@?1???R<lambda_1>@x@A@PR31197@@QBE@XZ@4HA
147 ; CHECK: int `public: __thiscall PR31197::A::x::<lambda_1>::operator()(void) const'::`2'::white
149 ?f@@YAXW4<unnamed-enum-enumerator>@@@Z
150 ; CHECK: void __cdecl f(enum <unnamed-enum-enumerator>)