1 | // clang-format off |
2 | |
3 | // REQUIRES: system-windows |
4 | // RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s |
5 | // RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -dump-ast %t.exe | FileCheck %s |
6 | |
7 | namespace A { |
8 | namespace B { |
9 | using NamespaceTypedef = double; |
10 | } |
11 | template<typename T> |
12 | class C { |
13 | public: |
14 | using ClassTypedef = T; |
15 | }; |
16 | using ClassTypedef = C<char>::ClassTypedef; |
17 | using ClassTypedef2 = C<wchar_t>::ClassTypedef; |
18 | |
19 | template<typename T> |
20 | using AliasTemplate = typename C<T>::ClassTypedef; |
21 | } |
22 | |
23 | namespace { |
24 | using AnonNamespaceTypedef = bool; |
25 | } |
26 | |
27 | using IntTypedef = int; |
28 | |
29 | using ULongArrayTypedef = unsigned long[10]; |
30 | |
31 | using RefTypedef = long double*&; |
32 | |
33 | using FuncPtrTypedef = long long(*)(int&, unsigned char**, short[], const double, volatile bool); |
34 | |
35 | using VarArgsFuncTypedef = char(*)(void*, long, unsigned short, unsigned int, ...); |
36 | |
37 | using VarArgsFuncTypedefA = float(*)(...); |
38 | |
39 | int main(int argc, char **argv) { |
40 | long double *Ptr; |
41 | |
42 | A::B::NamespaceTypedef *X0; |
43 | A::C<char>::ClassTypedef *X1; |
44 | A::C<wchar_t>::ClassTypedef *X2; |
45 | AnonNamespaceTypedef *X3; |
46 | IntTypedef *X4; |
47 | ULongArrayTypedef *X5; |
48 | RefTypedef X6 = Ptr; |
49 | FuncPtrTypedef X7; |
50 | VarArgsFuncTypedef X8; |
51 | VarArgsFuncTypedefA X9; |
52 | A::AliasTemplate<float> X10; |
53 | return 0; |
54 | } |
55 | |
56 | |
57 | // CHECK: namespace { |
58 | // CHECK-NEXT: typedef bool AnonNamespaceTypedef; |
59 | // CHECK-NEXT: } |
60 | // CHECK-NEXT: typedef unsigned long ULongArrayTypedef[10]; |
61 | // CHECK-NEXT: typedef double *&RefTypedef; |
62 | // CHECK-NEXT: namespace A { |
63 | // CHECK-NEXT: namespace B { |
64 | // CHECK-NEXT: typedef double NamespaceTypedef; |
65 | // CHECK-NEXT: } |
66 | // CHECK-NEXT: typedef float AliasTemplate<float>; |
67 | // CHECK-NEXT: } |
68 | // CHECK-NEXT: typedef long long (*FuncPtrTypedef)(int &, unsigned char **, short *, const double, volatile bool); |
69 | // CHECK-NEXT: typedef char (*VarArgsFuncTypedef)(void *, long, unsigned short, unsigned int, ...); |
70 | // CHECK-NEXT: typedef float (*VarArgsFuncTypedefA)(...); |
71 | // CHECK-NEXT: typedef int IntTypedef; |
72 | |