1 ; These tests are based on clang/test/CodeGenCXX/mangle-ms-return-qualifiers.cpp
3 ; RUN: llvm-undname < %s | FileCheck %s
5 ; CHECK-NOT: Invalid mangled name
8 ; CHECK: void __cdecl a1(void)
11 ; CHECK: int __cdecl a2(void)
14 ; CHECK: int const __cdecl a3(void)
17 ; CHECK: int volatile __cdecl a4(void)
20 ; CHECK: int const volatile __cdecl a5(void)
23 ; CHECK: float __cdecl a6(void)
26 ; CHECK: int * __cdecl b1(void)
29 ; CHECK: char const * __cdecl b2(void)
32 ; CHECK: float * __cdecl b3(void)
35 ; CHECK: float const * __cdecl b4(void)
38 ; CHECK: float volatile * __cdecl b5(void)
41 ; CHECK: float const volatile * __cdecl b6(void)
44 ; CHECK: float & __cdecl b7(void)
47 ; CHECK: float const & __cdecl b8(void)
50 ; CHECK: float volatile & __cdecl b9(void)
53 ; CHECK: float const volatile & __cdecl b10(void)
56 ; CHECK: char const ** __cdecl b11(void)
59 ; CHECK: class A __cdecl c1(void)
62 ; CHECK: class A const __cdecl c2(void)
65 ; CHECK: class A volatile __cdecl c3(void)
68 ; CHECK: class A const volatile __cdecl c4(void)
71 ; CHECK: class A const * __cdecl c5(void)
74 ; CHECK: class A volatile * __cdecl c6(void)
77 ; CHECK: class A const volatile * __cdecl c7(void)
80 ; CHECK: class A & __cdecl c8(void)
83 ; CHECK: class A const & __cdecl c9(void)
86 ; CHECK: class A volatile & __cdecl c10(void)
89 ; CHECK: class A const volatile & __cdecl c11(void)
92 ; CHECK: class B<int> __cdecl d1(void)
95 ; CHECK: class B<char const *> __cdecl d2(void)
97 ?d3@@YA?AV?$B@VA@@@@XZ
98 ; CHECK: class B<class A> __cdecl d3(void)
100 ?d4@@YAPAV?$B@VA@@@@XZ
101 ; CHECK: class B<class A> * __cdecl d4(void)
103 ?d5@@YAPBV?$B@VA@@@@XZ
104 ; CHECK: class B<class A> const * __cdecl d5(void)
106 ?d6@@YAPCV?$B@VA@@@@XZ
107 ; CHECK: class B<class A> volatile * __cdecl d6(void)
109 ?d7@@YAPDV?$B@VA@@@@XZ
110 ; CHECK: class B<class A> const volatile * __cdecl d7(void)
112 ?d8@@YAAAV?$B@VA@@@@XZ
113 ; CHECK: class B<class A> & __cdecl d8(void)
115 ?d9@@YAABV?$B@VA@@@@XZ
116 ; CHECK: class B<class A> const & __cdecl d9(void)
118 ?d10@@YAACV?$B@VA@@@@XZ
119 ; CHECK: class B<class A> volatile & __cdecl d10(void)
121 ?d11@@YAADV?$B@VA@@@@XZ
122 ; CHECK: class B<class A> const volatile & __cdecl d11(void)
125 ; CHECK: Enum __cdecl e1(void)
128 ; CHECK: Enum const __cdecl e2(void)
131 ; CHECK: Enum * __cdecl e3(void)
134 ; CHECK: Enum & __cdecl e4(void)
137 ; CHECK: struct S __cdecl f1(void)
140 ; CHECK: struct S const __cdecl f2(void)
143 ; CHECK: struct S * __cdecl f3(void)
146 ; CHECK: struct S const * __cdecl f4(void)
149 ; CHECK: struct S const volatile * __cdecl f5(void)
152 ; CHECK: struct S & __cdecl f6(void)
155 ; CHECK: struct S *const __cdecl f7(void)
158 ; CHECK: int S::* __cdecl f8(void)
161 ; CHECK: int S::*const __cdecl f9(void)
164 ; CHECK: int S::*__restrict __cdecl f10(void)
167 ; CHECK: int S::*const __restrict __cdecl f11(void)
170 ; CHECK: int (__cdecl * __cdecl g1(void))(int)
173 ; CHECK: int (__cdecl *const __cdecl g2(void))(int)
176 ; CHECK: int (__cdecl ** __cdecl g3(void))(int)
179 ; CHECK: int (__cdecl *const * __cdecl g4(void))(int)
182 ; CHECK: int &__restrict __cdecl h1(void)