1; These tests are based on clang/test/CodeGenCXX/mangle-ms-return-qualifiers.cpp 2 3; RUN: llvm-undname < %s | FileCheck %s 4 5; CHECK-NOT: Invalid mangled name 6 7?a1@@YAXXZ 8; CHECK: void __cdecl a1(void) 9 10?a2@@YAHXZ 11; CHECK: int __cdecl a2(void) 12 13?a3@@YA?BHXZ 14; CHECK: int const __cdecl a3(void) 15 16?a4@@YA?CHXZ 17; CHECK: int volatile __cdecl a4(void) 18 19?a5@@YA?DHXZ 20; CHECK: int const volatile __cdecl a5(void) 21 22?a6@@YAMXZ 23; CHECK: float __cdecl a6(void) 24 25?b1@@YAPAHXZ 26; CHECK: int * __cdecl b1(void) 27 28?b2@@YAPBDXZ 29; CHECK: char const * __cdecl b2(void) 30 31?b3@@YAPAMXZ 32; CHECK: float * __cdecl b3(void) 33 34?b4@@YAPBMXZ 35; CHECK: float const * __cdecl b4(void) 36 37?b5@@YAPCMXZ 38; CHECK: float volatile * __cdecl b5(void) 39 40?b6@@YAPDMXZ 41; CHECK: float const volatile * __cdecl b6(void) 42 43?b7@@YAAAMXZ 44; CHECK: float & __cdecl b7(void) 45 46?b8@@YAABMXZ 47; CHECK: float const & __cdecl b8(void) 48 49?b9@@YAACMXZ 50; CHECK: float volatile & __cdecl b9(void) 51 52?b10@@YAADMXZ 53; CHECK: float const volatile & __cdecl b10(void) 54 55?b11@@YAPAPBDXZ 56; CHECK: char const ** __cdecl b11(void) 57 58?c1@@YA?AVA@@XZ 59; CHECK: class A __cdecl c1(void) 60 61?c2@@YA?BVA@@XZ 62; CHECK: class A const __cdecl c2(void) 63 64?c3@@YA?CVA@@XZ 65; CHECK: class A volatile __cdecl c3(void) 66 67?c4@@YA?DVA@@XZ 68; CHECK: class A const volatile __cdecl c4(void) 69 70?c5@@YAPBVA@@XZ 71; CHECK: class A const * __cdecl c5(void) 72 73?c6@@YAPCVA@@XZ 74; CHECK: class A volatile * __cdecl c6(void) 75 76?c7@@YAPDVA@@XZ 77; CHECK: class A const volatile * __cdecl c7(void) 78 79?c8@@YAAAVA@@XZ 80; CHECK: class A & __cdecl c8(void) 81 82?c9@@YAABVA@@XZ 83; CHECK: class A const & __cdecl c9(void) 84 85?c10@@YAACVA@@XZ 86; CHECK: class A volatile & __cdecl c10(void) 87 88?c11@@YAADVA@@XZ 89; CHECK: class A const volatile & __cdecl c11(void) 90 91?d1@@YA?AV?$B@H@@XZ 92; CHECK: class B<int> __cdecl d1(void) 93 94?d2@@YA?AV?$B@PBD@@XZ 95; CHECK: class B<char const *> __cdecl d2(void) 96 97?d3@@YA?AV?$B@VA@@@@XZ 98; CHECK: class B<class A> __cdecl d3(void) 99 100?d4@@YAPAV?$B@VA@@@@XZ 101; CHECK: class B<class A> * __cdecl d4(void) 102 103?d5@@YAPBV?$B@VA@@@@XZ 104; CHECK: class B<class A> const * __cdecl d5(void) 105 106?d6@@YAPCV?$B@VA@@@@XZ 107; CHECK: class B<class A> volatile * __cdecl d6(void) 108 109?d7@@YAPDV?$B@VA@@@@XZ 110; CHECK: class B<class A> const volatile * __cdecl d7(void) 111 112?d8@@YAAAV?$B@VA@@@@XZ 113; CHECK: class B<class A> & __cdecl d8(void) 114 115?d9@@YAABV?$B@VA@@@@XZ 116; CHECK: class B<class A> const & __cdecl d9(void) 117 118?d10@@YAACV?$B@VA@@@@XZ 119; CHECK: class B<class A> volatile & __cdecl d10(void) 120 121?d11@@YAADV?$B@VA@@@@XZ 122; CHECK: class B<class A> const volatile & __cdecl d11(void) 123 124?e1@@YA?AW4Enum@@XZ 125; CHECK: Enum __cdecl e1(void) 126 127?e2@@YA?BW4Enum@@XZ 128; CHECK: Enum const __cdecl e2(void) 129 130?e3@@YAPAW4Enum@@XZ 131; CHECK: Enum * __cdecl e3(void) 132 133?e4@@YAAAW4Enum@@XZ 134; CHECK: Enum & __cdecl e4(void) 135 136?f1@@YA?AUS@@XZ 137; CHECK: struct S __cdecl f1(void) 138 139?f2@@YA?BUS@@XZ 140; CHECK: struct S const __cdecl f2(void) 141 142?f3@@YAPAUS@@XZ 143; CHECK: struct S * __cdecl f3(void) 144 145?f4@@YAPBUS@@XZ 146; CHECK: struct S const * __cdecl f4(void) 147 148?f5@@YAPDUS@@XZ 149; CHECK: struct S const volatile * __cdecl f5(void) 150 151?f6@@YAAAUS@@XZ 152; CHECK: struct S & __cdecl f6(void) 153 154?f7@@YAQAUS@@XZ 155; CHECK: struct S *const __cdecl f7(void) 156 157?f8@@YAPQS@@HXZ 158; CHECK: int S::* __cdecl f8(void) 159 160?f9@@YAQQS@@HXZ 161; CHECK: int S::*const __cdecl f9(void) 162 163?f10@@YAPIQS@@HXZ 164; CHECK: int S::*__restrict __cdecl f10(void) 165 166?f11@@YAQIQS@@HXZ 167; CHECK: int S::*const __restrict __cdecl f11(void) 168 169?g1@@YAP6AHH@ZXZ 170; CHECK: int (__cdecl * __cdecl g1(void))(int) 171 172?g2@@YAQ6AHH@ZXZ 173; CHECK: int (__cdecl *const __cdecl g2(void))(int) 174 175?g3@@YAPAP6AHH@ZXZ 176; CHECK: int (__cdecl ** __cdecl g3(void))(int) 177 178?g4@@YAPBQ6AHH@ZXZ 179; CHECK: int (__cdecl *const * __cdecl g4(void))(int) 180 181?h1@@YAAIAHXZ 182; CHECK: int &__restrict __cdecl h1(void) 183