1 namespace outer {
2 namespace inner {
3 template<typename T>
4 struct vector {
5 typedef T* iterator;
6 };
7 }
8 }
9
10 namespace outer_alias = outer;
11
12 struct X { };
13
14 using outer_alias::inner::vector;
15
16 struct X_vector : outer_alias::inner::vector<X> {
17 using outer_alias::inner::vector<X>::iterator;
18 };
19
20 namespace outer {
21 namespace inner {
22 template<typename T, unsigned N>
23 struct array {
24 void foo();
25 static int max_size;
26 };
27 }
28 }
29
30 template<typename T, unsigned N>
foo()31 void outer::inner::array<T, N>::foo() {
32 }
33
34 template<typename T, unsigned N>
35 int outer::inner::array<T, N>::max_size = 17;
36
37 template<typename T>
38 struct X2 : outer::inner::vector<T> {
39 typedef T type;
40 using typename outer::inner::vector<type>::iterator;
41 using outer::inner::vector<type>::push_back;
42 };
43
44 namespace outer {
45 namespace inner {
46 namespace secret {
47 }
48 }
49 }
50
51 using namespace outer_alias::inner::secret;
52 namespace super_secret = outer_alias::inner::secret;
53
54 template<typename T>
55 struct X3 {
fX356 void f(T *t) {
57 t->::outer_alias::inner::template vector<T>::~vector<T>();
58 }
59 };
60
61 namespace outer {
62 namespace inner {
63 void f(int);
64 void f(double);
65 }
66 }
67
68 template<typename T>
69 struct X4 {
70 typedef T type;
71 void g(int);
72 void g(float);
73
hX474 void h(T t) {
75 ::outer_alias::inner::f(t);
76 ::X4<type>::g(t);
77 this->::X4<type>::g(t);
78 }
79 };
80
81 typedef int Integer;
82 template<>
83 struct X4<Integer> {
84 typedef Integer type;
85
86 void g(int);
87 void g(float);
88
hX489 void h(type t) {
90 ::outer_alias::inner::f(t);
91 ::X4<type>::g(t);
92 this->::X4<type>::g(t);
93 }
94 };
95
96
97 template<typename T>
98 struct X5 {
99 typedef T type;
100 typedef typename outer_alias::inner::vector<type>::iterator iter_type;
101 typedef typename outer_alias::inner::vector<int>::iterator int_ptr_type;
102 };
103
104 template<typename T>
105 struct X6 {
106 typedef T* type;
107 typedef typename outer_alias::inner::vector<type>::template rebind<type> type1;
108 typedef typename outer_alias::inner::vector<type>::template rebind<type>::other type2;
109 typedef class outer_alias::inner::vector<type>::template rebind<type> type3;
110 typedef class outer_alias::inner::vector<type>::template rebind<type>::other type4;
111 };
112
113 namespace outer {
114 namespace inner {
115 template<typename T, template<class> class TT>
116 struct apply_meta {
117 typedef typename TT<T>::type type;
118 };
119 }
120 }
121
122 template<typename T, typename U>
123 struct X7 {
124 typedef T T_type;
125 typedef U U_type;
126 typedef outer_alias::inner::apply_meta<T_type, U_type::template apply> type;
127 };
128
129 struct X8 {
130 void f();
131 };
132
133 struct X9 : X8 {
134 typedef X8 inherited;
fX9135 void f() {
136 inherited::f();
137 }
138 };
139
140 // RUN: c-index-test -test-annotate-tokens=%s:13:1:137:1 -fno-delayed-template-parsing %s | FileCheck %s
141
142 // CHECK: Keyword: "using" [14:1 - 14:6] UsingDeclaration=vector[4:12]
143 // CHECK: Identifier: "outer_alias" [14:7 - 14:18] NamespaceRef=outer_alias:10:11
144 // CHECK: Punctuation: "::" [14:18 - 14:20] UsingDeclaration=vector[4:12]
145 // CHECK: Identifier: "inner" [14:20 - 14:25] NamespaceRef=inner:2:13
146 // CHECK: Punctuation: "::" [14:25 - 14:27] UsingDeclaration=vector[4:12]
147 // CHECK: Identifier: "vector" [14:27 - 14:33] OverloadedDeclRef=vector[4:12]
148 // CHECK: Punctuation: ";" [14:33 - 14:34]
149
150 // Base specifiers
151 // CHECK: Identifier: "outer_alias" [16:19 - 16:30] NamespaceRef=outer_alias:10:11
152 // CHECK: Punctuation: "::" [16:30 - 16:32] C++ base class specifier=outer_alias::inner::vector<X>:4:12 [access=public isVirtual=false]
153 // CHECK: Identifier: "inner" [16:32 - 16:37] NamespaceRef=inner:2:13
154 // CHECK: Punctuation: "::" [16:37 - 16:39] C++ base class specifier=outer_alias::inner::vector<X>:4:12 [access=public isVirtual=false]
155 // CHECK: Identifier: "vector" [16:39 - 16:45] TemplateRef=vector:4:12
156 // CHECK: Punctuation: "<" [16:45 - 16:46] C++ base class specifier=outer_alias::inner::vector<X>:4:12 [access=public isVirtual=false]
157 // CHECK: Identifier: "X" [16:46 - 16:47] TypeRef=struct X:12:8
158 // CHECK: Punctuation: ">" [16:47 - 16:48] C++ base class specifier=outer_alias::inner::vector<X>:4:12 [access=public isVirtual=false]
159
160
161 // CHECK: Keyword: "using" [17:3 - 17:8] UsingDeclaration=iterator[5:18]
162 // CHECK: Identifier: "outer_alias" [17:9 - 17:20] NamespaceRef=outer_alias:10:11
163 // CHECK: Punctuation: "::" [17:20 - 17:22] UsingDeclaration=iterator[5:18]
164 // CHECK: Identifier: "inner" [17:22 - 17:27] NamespaceRef=inner:2:13
165 // CHECK: Punctuation: "::" [17:27 - 17:29] UsingDeclaration=iterator[5:18]
166 // CHECK: Identifier: "vector" [17:29 - 17:35] TemplateRef=vector:4:12
167 // CHECK: Punctuation: "<" [17:35 - 17:36] UsingDeclaration=iterator[5:18]
168 // CHECK: Identifier: "X" [17:36 - 17:37] TypeRef=struct X:12:8
169 // CHECK: Punctuation: ">" [17:37 - 17:38] UsingDeclaration=iterator[5:18]
170 // CHECK: Punctuation: "::" [17:38 - 17:40] UsingDeclaration=iterator[5:18]
171 // CHECK: Identifier: "iterator" [17:40 - 17:48] OverloadedDeclRef=iterator[5:18]
172
173 // CHECK: Keyword: "void" [31:1 - 31:5] CXXMethod=foo:31:33 (Definition)
174 // CHECK: Identifier: "outer" [31:6 - 31:11] NamespaceRef=outer:20:11
175 // CHECK: Punctuation: "::" [31:11 - 31:13] CXXMethod=foo:31:33 (Definition)
176 // CHECK: Identifier: "inner" [31:13 - 31:18] NamespaceRef=inner:21:13
177 // CHECK: Punctuation: "::" [31:18 - 31:20] CXXMethod=foo:31:33 (Definition)
178 // CHECK: Identifier: "array" [31:20 - 31:25] TemplateRef=array:23:12
179 // CHECK: Punctuation: "<" [31:25 - 31:26] CXXMethod=foo:31:33 (Definition)
180 // CHECK: Identifier: "T" [31:26 - 31:27] TypeRef=T:30:19
181 // CHECK: Punctuation: "," [31:27 - 31:28] CXXMethod=foo:31:33 (Definition)
182 // CHECK: Identifier: "N" [31:29 - 31:30] DeclRefExpr=N:30:31
183 // CHECK: Punctuation: ">" [31:30 - 31:31] CXXMethod=foo:31:33 (Definition)
184 // CHECK: Punctuation: "::" [31:31 - 31:33] CXXMethod=foo:31:33 (Definition)
185 // CHECK: Identifier: "foo" [31:33 - 31:36] CXXMethod=foo:31:33 (Definition)
186 // CHECK: Punctuation: "(" [31:36 - 31:37] CXXMethod=foo:31:33 (Definition)
187 // CHECK: Punctuation: ")" [31:37 - 31:38] CXXMethod=foo:31:33 (Definition)
188
189 // CHECK: Keyword: "int" [35:1 - 35:4] VarDecl=max_size:35:32 (Definition)
190 // CHECK: Identifier: "outer" [35:5 - 35:10] NamespaceRef=outer:20:11
191 // CHECK: Punctuation: "::" [35:10 - 35:12] VarDecl=max_size:35:32 (Definition)
192 // CHECK: Identifier: "inner" [35:12 - 35:17] NamespaceRef=inner:21:13
193 // CHECK: Punctuation: "::" [35:17 - 35:19] VarDecl=max_size:35:32 (Definition)
194 // CHECK: Identifier: "array" [35:19 - 35:24] TemplateRef=array:23:12
195 // CHECK: Punctuation: "<" [35:24 - 35:25] VarDecl=max_size:35:32 (Definition)
196 // CHECK: Identifier: "T" [35:25 - 35:26] TypeRef=T:34:19
197 // CHECK: Punctuation: "," [35:26 - 35:27] VarDecl=max_size:35:32 (Definition)
198 // CHECK: Identifier: "N" [35:28 - 35:29] DeclRefExpr=N:34:31
199 // CHECK: Punctuation: ">" [35:29 - 35:30] VarDecl=max_size:35:32 (Definition)
200 // CHECK: Punctuation: "::" [35:30 - 35:32] VarDecl=max_size:35:32 (Definition)
201 // CHECK: Identifier: "max_size" [35:32 - 35:40] VarDecl=max_size:35:32 (Definition)
202 // CHECK: Punctuation: "=" [35:41 - 35:42] VarDecl=max_size:35:32 (Definition)
203 // CHECK: Literal: "17" [35:43 - 35:45] IntegerLiteral=
204 // CHECK: Punctuation: ";" [35:45 - 35:46]
205
206 // CHECK: Keyword: "using" [40:3 - 40:8] UsingDeclaration=iterator:40:46
207 // CHECK: Keyword: "typename" [40:9 - 40:17] UsingDeclaration=iterator:40:46
208 // CHECK: Identifier: "outer" [40:18 - 40:23] NamespaceRef=outer:20:11
209 // CHECK: Punctuation: "::" [40:23 - 40:25] UsingDeclaration=iterator:40:46
210 // CHECK: Identifier: "inner" [40:25 - 40:30] NamespaceRef=inner:21:13
211 // CHECK: Punctuation: "::" [40:30 - 40:32] UsingDeclaration=iterator:40:46
212 // CHECK: Identifier: "vector" [40:32 - 40:38] TemplateRef=vector:4:12
213 // CHECK: Punctuation: "<" [40:38 - 40:39] UsingDeclaration=iterator:40:46
214 // CHECK: Identifier: "type" [40:39 - 40:43] TypeRef=X2::type:39:13
215 // CHECK: Punctuation: ">" [40:43 - 40:44] UsingDeclaration=iterator:40:46
216 // CHECK: Punctuation: "::" [40:44 - 40:46] UsingDeclaration=iterator:40:46
217 // CHECK: Identifier: "iterator" [40:46 - 40:54] UsingDeclaration=iterator:40:46
218 // CHECK: Punctuation: ";" [40:54 - 40:55] ClassTemplate=X2:38:8 (Definition)
219 // CHECK: Keyword: "using" [41:3 - 41:8] UsingDeclaration=push_back:41:37
220 // CHECK: Identifier: "outer" [41:9 - 41:14] NamespaceRef=outer:20:11
221 // CHECK: Punctuation: "::" [41:14 - 41:16] UsingDeclaration=push_back:41:37
222 // CHECK: Identifier: "inner" [41:16 - 41:21] NamespaceRef=inner:21:13
223 // CHECK: Punctuation: "::" [41:21 - 41:23] UsingDeclaration=push_back:41:37
224 // CHECK: Identifier: "vector" [41:23 - 41:29] TemplateRef=vector:4:12
225 // CHECK: Punctuation: "<" [41:29 - 41:30] UsingDeclaration=push_back:41:37
226 // CHECK: Identifier: "type" [41:30 - 41:34] TypeRef=X2::type:39:13
227 // CHECK: Punctuation: ">" [41:34 - 41:35] UsingDeclaration=push_back:41:37
228 // CHECK: Punctuation: "::" [41:35 - 41:37] UsingDeclaration=push_back:41:37
229 // CHECK: Identifier: "push_back" [41:37 - 41:46] UsingDeclaration=push_back:41:37
230
231 // Using directive
232 // CHECK: Keyword: "using" [51:1 - 51:6] UsingDirective=:51:37
233 // CHECK: Keyword: "namespace" [51:7 - 51:16] UsingDirective=:51:37
234 // CHECK: Identifier: "outer_alias" [51:17 - 51:28] NamespaceRef=outer_alias:10:11
235 // CHECK: Punctuation: "::" [51:28 - 51:30] UsingDirective=:51:37
236 // CHECK: Identifier: "inner" [51:30 - 51:35] NamespaceRef=inner:45:13
237 // CHECK: Punctuation: "::" [51:35 - 51:37] UsingDirective=:51:37
238 // CHECK: Identifier: "secret" [51:37 - 51:43] NamespaceRef=secret:46:15
239
240 // Namespace alias
241 // CHECK: Keyword: "namespace" [52:1 - 52:10] NamespaceAlias=super_secret:52:11
242 // CHECK: Identifier: "super_secret" [52:11 - 52:23] NamespaceAlias=super_secret:52:11
243 // CHECK: Punctuation: "=" [52:24 - 52:25] NamespaceAlias=super_secret:52:11
244 // CHECK: Identifier: "outer_alias" [52:26 - 52:37] NamespaceRef=outer_alias:10:11
245 // CHECK: Punctuation: "::" [52:37 - 52:39] NamespaceAlias=super_secret:52:11
246 // CHECK: Identifier: "inner" [52:39 - 52:44] NamespaceRef=inner:45:13
247 // CHECK: Punctuation: "::" [52:44 - 52:46] NamespaceAlias=super_secret:52:11
248 // CHECK: Identifier: "secret" [52:46 - 52:52] NamespaceRef=secret:46:15
249 // CHECK: Punctuation: ";" [52:52 - 52:53]
250
251 // Pseudo-destructor
252 // CHECK: Identifier: "t" [57:5 - 57:6] DeclRefExpr=t:56:13
253 // CHECK: Punctuation: "->" [57:6 - 57:8] MemberRefExpr=
254 // CHECK: Punctuation: "::" [57:8 - 57:10] MemberRefExpr=
255 // CHECK: Identifier: "outer_alias" [57:10 - 57:21] NamespaceRef=outer_alias:10:11
256 // CHECK: Punctuation: "::" [57:21 - 57:23] MemberRefExpr=
257 // CHECK: Identifier: "inner" [57:23 - 57:28] NamespaceRef=inner:45:13
258 // CHECK: Punctuation: "::" [57:28 - 57:30] MemberRefExpr=
259 // CHECK: Keyword: "template" [57:30 - 57:38] MemberRefExpr=
260 // CHECK: Identifier: "vector" [57:39 - 57:45] TemplateRef=vector:4:12
261 // CHECK: Punctuation: "<" [57:45 - 57:46] MemberRefExpr=
262 // CHECK: Identifier: "T" [57:46 - 57:47] TypeRef=T:54:19
263 // CHECK: Punctuation: ">" [57:47 - 57:48] MemberRefExpr=
264 // CHECK: Punctuation: "::" [57:48 - 57:50] MemberRefExpr=
265 // CHECK: Punctuation: "~" [57:50 - 57:51] MemberRefExpr=
266 // CHECK: Identifier: "vector" [57:51 - 57:57] TemplateRef=vector:4:12
267 // CHECK: Punctuation: "<" [57:57 - 57:58] MemberRefExpr=
268 // CHECK: Identifier: "T" [57:58 - 57:59] TypeRef=T:54:19
269 // CHECK: Punctuation: ">" [57:59 - 57:60] MemberRefExpr=
270 // CHECK: Punctuation: "(" [57:60 - 57:61] CallExpr=
271 // CHECK: Punctuation: ")" [57:61 - 57:62] CallExpr=
272
273 // Unresolved member and non-member references
274 // CHECK: Punctuation: "::" [75:5 - 75:7] DeclRefExpr=[63:10, 64:10]
275 // CHECK: Identifier: "outer_alias" [75:7 - 75:18] NamespaceRef=outer_alias:10:11
276 // CHECK: Punctuation: "::" [75:18 - 75:20] DeclRefExpr=[63:10, 64:10]
277 // CHECK: Identifier: "inner" [75:20 - 75:25] NamespaceRef=inner:62:13
278 // CHECK: Punctuation: "::" [75:25 - 75:27] DeclRefExpr=[63:10, 64:10]
279 // CHECK: Identifier: "f" [75:27 - 75:28] OverloadedDeclRef=f[63:10, 64:10]
280 // CHECK: Punctuation: "(" [75:28 - 75:29] CallExpr=
281 // CHECK: Identifier: "t" [75:29 - 75:30] DeclRefExpr=t:74:12
282 // CHECK: Punctuation: ")" [75:30 - 75:31] CallExpr=
283 // CHECK: Punctuation: "::" [76:5 - 76:7] MemberRefExpr=[71:8, 72:8]
284 // CHECK: Identifier: "X4" [76:7 - 76:9] TemplateRef=X4:69:8
285 // CHECK: Punctuation: "<" [76:9 - 76:10] MemberRefExpr=[71:8, 72:8]
286 // CHECK: Identifier: "type" [76:10 - 76:14] TypeRef=X4::type:70:13
287 // CHECK: Punctuation: ">" [76:14 - 76:15] MemberRefExpr=[71:8, 72:8]
288 // CHECK: Punctuation: "::" [76:15 - 76:17] MemberRefExpr=[71:8, 72:8]
289 // CHECK: Identifier: "g" [76:17 - 76:18] OverloadedDeclRef=g[71:8, 72:8]
290 // CHECK: Punctuation: "(" [76:18 - 76:19] CallExpr=
291 // CHECK: Identifier: "t" [76:19 - 76:20] DeclRefExpr=t:74:12
292 // CHECK: Punctuation: ")" [76:20 - 76:21] CallExpr=
293 // CHECK: Punctuation: ";" [76:21 - 76:22] CompoundStmt=
294 // CHECK: Keyword: "this" [77:5 - 77:9] CXXThisExpr=
295 // CHECK: Punctuation: "->" [77:9 - 77:11] MemberRefExpr=
296 // CHECK: Punctuation: "::" [77:11 - 77:13] MemberRefExpr=
297 // CHECK: Identifier: "X4" [77:13 - 77:15] TemplateRef=X4:69:8
298 // CHECK: Punctuation: "<" [77:15 - 77:16] MemberRefExpr=
299 // CHECK: Identifier: "type" [77:16 - 77:20] TypeRef=X4::type:70:13
300 // CHECK: Punctuation: ">" [77:20 - 77:21] MemberRefExpr=
301 // CHECK: Punctuation: "::" [77:21 - 77:23] MemberRefExpr=
302 // CHECK: Identifier: "g" [77:23 - 77:24] MemberRefExpr=
303 // CHECK: Punctuation: "(" [77:24 - 77:25] CallExpr=
304 // CHECK: Identifier: "t" [77:25 - 77:26] DeclRefExpr=t:74:12
305 // CHECK: Punctuation: ")" [77:26 - 77:27] CallExpr=
306
307 // Resolved member and non-member references
308 // CHECK: Punctuation: "::" [90:5 - 90:7] DeclRefExpr=f:63:10
309 // CHECK: Identifier: "outer_alias" [90:7 - 90:18] NamespaceRef=outer_alias:10:11
310 // CHECK: Punctuation: "::" [90:18 - 90:20] DeclRefExpr=f:63:10
311 // CHECK: Identifier: "inner" [90:20 - 90:25] NamespaceRef=inner:62:13
312 // CHECK: Punctuation: "::" [90:25 - 90:27] DeclRefExpr=f:63:10
313 // CHECK: Identifier: "f" [90:27 - 90:28] DeclRefExpr=f:63:10
314 // CHECK: Punctuation: "(" [90:28 - 90:29] CallExpr=f:63:10
315 // CHECK: Identifier: "t" [90:29 - 90:30] DeclRefExpr=t:89:15
316 // CHECK: Punctuation: ")" [90:30 - 90:31] CallExpr=f:63:10
317 // CHECK: Punctuation: ";" [90:31 - 90:32] CompoundStmt=
318 // CHECK: Punctuation: "::" [91:5 - 91:7] MemberRefExpr=g:86:8
319 // CHECK: Identifier: "X4" [91:7 - 91:9] TemplateRef=X4:69:8
320 // CHECK: Punctuation: "<" [91:9 - 91:10] MemberRefExpr=g:86:8
321 // CHECK: Identifier: "type" [91:10 - 91:14] TypeRef=X4<int>::type:84:19
322 // CHECK: Punctuation: ">" [91:14 - 91:15] MemberRefExpr=g:86:8
323 // CHECK: Punctuation: "::" [91:15 - 91:17] MemberRefExpr=g:86:8
324 // CHECK: Identifier: "g" [91:17 - 91:18] MemberRefExpr=g:86:8
325 // CHECK: Punctuation: "(" [91:18 - 91:19] CallExpr=g:86:8
326 // CHECK: Identifier: "t" [91:19 - 91:20] DeclRefExpr=t:89:15
327 // CHECK: Punctuation: ")" [91:20 - 91:21] CallExpr=g:86:8
328 // CHECK: Punctuation: ";" [91:21 - 91:22] CompoundStmt=
329 // CHECK: Keyword: "this" [92:5 - 92:9] CXXThisExpr=
330 // CHECK: Punctuation: "->" [92:9 - 92:11] MemberRefExpr=g:86:8
331 // CHECK: Punctuation: "::" [92:11 - 92:13] MemberRefExpr=g:86:8
332 // CHECK: Identifier: "X4" [92:13 - 92:15] TemplateRef=X4:69:8
333 // CHECK: Punctuation: "<" [92:15 - 92:16] MemberRefExpr=g:86:8
334 // CHECK: Identifier: "type" [92:16 - 92:20] TypeRef=X4<int>::type:84:19
335 // CHECK: Punctuation: ">" [92:20 - 92:21] MemberRefExpr=g:86:8
336 // CHECK: Punctuation: "::" [92:21 - 92:23] MemberRefExpr=g:86:8
337 // CHECK: Identifier: "g" [92:23 - 92:24] MemberRefExpr=g:86:8
338 // CHECK: Punctuation: "(" [92:24 - 92:25] CallExpr=g:86:8
339 // CHECK: Identifier: "t" [92:25 - 92:26] DeclRefExpr=t:89:15
340 // CHECK: Punctuation: ")" [92:26 - 92:27] CallExpr=g:86:8
341
342 // Dependent name type
343 // CHECK: Keyword: "typedef" [100:3 - 100:10] TypedefDecl=iter_type:100:63 (Definition)
344 // CHECK: Keyword: "typename" [100:11 - 100:19] TypedefDecl=iter_type:100:63 (Definition)
345 // CHECK: Identifier: "outer_alias" [100:20 - 100:31] NamespaceRef=outer_alias:10:11
346 // CHECK: Punctuation: "::" [100:31 - 100:33] TypedefDecl=iter_type:100:63 (Definition)
347 // CHECK: Identifier: "inner" [100:33 - 100:38] NamespaceRef=inner:62:13
348 // CHECK: Punctuation: "::" [100:38 - 100:40] TypedefDecl=iter_type:100:63 (Definition)
349 // CHECK: Identifier: "vector" [100:40 - 100:46] TemplateRef=vector:4:12
350 // CHECK: Punctuation: "<" [100:46 - 100:47] TypedefDecl=iter_type:100:63 (Definition)
351 // CHECK: Identifier: "type" [100:47 - 100:51] TypeRef=X5::type:99:13
352 // CHECK: Punctuation: ">" [100:51 - 100:52] TypedefDecl=iter_type:100:63 (Definition)
353 // CHECK: Punctuation: "::" [100:52 - 100:54] TypedefDecl=iter_type:100:63 (Definition)
354 // CHECK: Identifier: "iterator" [100:54 - 100:62] TypedefDecl=iter_type:100:63 (Definition)
355 // CHECK: Identifier: "iter_type" [100:63 - 100:72] TypedefDecl=iter_type:100:63 (Definition)
356
357 // CHECK: Keyword: "typedef" [101:3 - 101:10] TypedefDecl=int_ptr_type:101:62 (Definition)
358 // CHECK: Keyword: "typename" [101:11 - 101:19] TypedefDecl=int_ptr_type:101:62 (Definition)
359 // CHECK: Identifier: "outer_alias" [101:20 - 101:31] NamespaceRef=outer_alias:10:11
360 // CHECK: Punctuation: "::" [101:31 - 101:33] TypedefDecl=int_ptr_type:101:62 (Definition)
361 // CHECK: Identifier: "inner" [101:33 - 101:38] NamespaceRef=inner:62:13
362 // CHECK: Punctuation: "::" [101:38 - 101:40] TypedefDecl=int_ptr_type:101:62 (Definition)
363 // CHECK: Identifier: "vector" [101:40 - 101:46] TemplateRef=vector:4:12
364 // CHECK: Punctuation: "<" [101:46 - 101:47] TypedefDecl=int_ptr_type:101:62 (Definition)
365 // CHECK: Keyword: "int" [101:47 - 101:50] TypedefDecl=int_ptr_type:101:62 (Definition)
366 // CHECK: Punctuation: ">" [101:50 - 101:51] TypedefDecl=int_ptr_type:101:62 (Definition)
367 // CHECK: Punctuation: "::" [101:51 - 101:53] TypedefDecl=int_ptr_type:101:62 (Definition)
368 // CHECK: Identifier: "iterator" [101:53 - 101:61] TypeRef=outer::inner::vector<int>::iterator:5:18
369 // CHECK: Identifier: "int_ptr_type" [101:62 - 101:74] TypedefDecl=int_ptr_type:101:62 (Definition)
370
371 // Dependent template specialization types
372 // CHECK: Keyword: "typename" [107:11 - 107:19] TypedefDecl=type1:107:76 (Definition)
373 // CHECK: Identifier: "outer_alias" [107:20 - 107:31] NamespaceRef=outer_alias:10:11
374 // CHECK: Punctuation: "::" [107:31 - 107:33] TypedefDecl=type1:107:76 (Definition)
375 // CHECK: Identifier: "inner" [107:33 - 107:38] NamespaceRef=inner:62:13
376 // CHECK: Punctuation: "::" [107:38 - 107:40] TypedefDecl=type1:107:76 (Definition)
377 // CHECK: Identifier: "vector" [107:40 - 107:46] TemplateRef=vector:4:12
378 // CHECK: Punctuation: "<" [107:46 - 107:47] TypedefDecl=type1:107:76 (Definition)
379 // CHECK: Identifier: "type" [107:47 - 107:51] TypeRef=X6::type:106:14
380 // CHECK: Punctuation: ">" [107:51 - 107:52] TypedefDecl=type1:107:76 (Definition)
381 // CHECK: Punctuation: "::" [107:52 - 107:54] TypedefDecl=type1:107:76 (Definition)
382 // CHECK: Keyword: "template" [107:54 - 107:62] TypedefDecl=type1:107:76 (Definition)
383 // CHECK: Identifier: "rebind" [107:63 - 107:69] TypedefDecl=type1:107:76 (Definition)
384 // CHECK: Punctuation: "<" [107:69 - 107:70] TypedefDecl=type1:107:76 (Definition)
385 // CHECK: Identifier: "type" [107:70 - 107:74] TypeRef=X6::type:106:14
386 // CHECK: Punctuation: ">" [107:74 - 107:75] TypedefDecl=type1:107:76 (Definition)
387 // CHECK: Identifier: "type1" [107:76 - 107:81] TypedefDecl=type1:107:76 (Definition)
388
389 // CHECK: Keyword: "typedef" [108:3 - 108:10] TypedefDecl=type2:108:83 (Definition)
390 // CHECK: Keyword: "typename" [108:11 - 108:19] TypedefDecl=type2:108:83 (Definition)
391 // CHECK: Identifier: "outer_alias" [108:20 - 108:31] NamespaceRef=outer_alias:10:11
392 // CHECK: Punctuation: "::" [108:31 - 108:33] TypedefDecl=type2:108:83 (Definition)
393 // CHECK: Identifier: "inner" [108:33 - 108:38] NamespaceRef=inner:62:13
394 // CHECK: Punctuation: "::" [108:38 - 108:40] TypedefDecl=type2:108:83 (Definition)
395 // CHECK: Identifier: "vector" [108:40 - 108:46] TemplateRef=vector:4:12
396 // CHECK: Punctuation: "<" [108:46 - 108:47] TypedefDecl=type2:108:83 (Definition)
397 // CHECK: Identifier: "type" [108:47 - 108:51] TypeRef=X6::type:106:14
398 // CHECK: Punctuation: ">" [108:51 - 108:52] TypedefDecl=type2:108:83 (Definition)
399 // CHECK: Punctuation: "::" [108:52 - 108:54] TypedefDecl=type2:108:83 (Definition)
400 // CHECK: Keyword: "template" [108:54 - 108:62] TypedefDecl=type2:108:83 (Definition)
401 // CHECK: Identifier: "rebind" [108:63 - 108:69] TypedefDecl=type2:108:83 (Definition)
402 // CHECK: Punctuation: "<" [108:69 - 108:70] TypedefDecl=type2:108:83 (Definition)
403 // CHECK: Identifier: "type" [108:70 - 108:74] TypeRef=X6::type:106:14
404 // CHECK: Punctuation: ">" [108:74 - 108:75] TypedefDecl=type2:108:83 (Definition)
405 // CHECK: Punctuation: "::" [108:75 - 108:77] TypedefDecl=type2:108:83 (Definition)
406 // CHECK: Identifier: "other" [108:77 - 108:82] TypedefDecl=type2:108:83 (Definition)
407 // CHECK: Identifier: "type2" [108:83 - 108:88] TypedefDecl=type2:108:83 (Definition)
408
409 // CHECK: Keyword: "typedef" [109:3 - 109:10] TypedefDecl=type3:109:73 (Definition)
410 // CHECK: Keyword: "class" [109:11 - 109:16] TypedefDecl=type3:109:73 (Definition)
411 // CHECK: Identifier: "outer_alias" [109:17 - 109:28] NamespaceRef=outer_alias:10:11
412 // CHECK: Punctuation: "::" [109:28 - 109:30] TypedefDecl=type3:109:73 (Definition)
413 // CHECK: Identifier: "inner" [109:30 - 109:35] NamespaceRef=inner:62:13
414 // CHECK: Punctuation: "::" [109:35 - 109:37] TypedefDecl=type3:109:73 (Definition)
415 // CHECK: Identifier: "vector" [109:37 - 109:43] TemplateRef=vector:4:12
416 // CHECK: Punctuation: "<" [109:43 - 109:44] TypedefDecl=type3:109:73 (Definition)
417 // CHECK: Identifier: "type" [109:44 - 109:48] TypeRef=X6::type:106:14
418 // CHECK: Punctuation: ">" [109:48 - 109:49] TypedefDecl=type3:109:73 (Definition)
419 // CHECK: Punctuation: "::" [109:49 - 109:51] TypedefDecl=type3:109:73 (Definition)
420 // CHECK: Keyword: "template" [109:51 - 109:59] TypedefDecl=type3:109:73 (Definition)
421 // CHECK: Identifier: "rebind" [109:60 - 109:66] TypedefDecl=type3:109:73 (Definition)
422 // CHECK: Punctuation: "<" [109:66 - 109:67] TypedefDecl=type3:109:73 (Definition)
423 // CHECK: Identifier: "type" [109:67 - 109:71] TypeRef=X6::type:106:14
424 // CHECK: Punctuation: ">" [109:71 - 109:72] TypedefDecl=type3:109:73 (Definition)
425 // CHECK: Identifier: "type3" [109:73 - 109:78] TypedefDecl=type3:109:73 (Definition)
426
427 // CHECK: Keyword: "class" [110:11 - 110:16] TypedefDecl=type4:110:80 (Definition)
428 // CHECK: Identifier: "outer_alias" [110:17 - 110:28] NamespaceRef=outer_alias:10:11
429 // CHECK: Punctuation: "::" [110:28 - 110:30] TypedefDecl=type4:110:80 (Definition)
430 // CHECK: Identifier: "inner" [110:30 - 110:35] NamespaceRef=inner:62:13
431 // CHECK: Punctuation: "::" [110:35 - 110:37] TypedefDecl=type4:110:80 (Definition)
432 // CHECK: Identifier: "vector" [110:37 - 110:43] TemplateRef=vector:4:12
433 // CHECK: Punctuation: "<" [110:43 - 110:44] TypedefDecl=type4:110:80 (Definition)
434 // CHECK: Identifier: "type" [110:44 - 110:48] TypeRef=X6::type:106:14
435 // CHECK: Punctuation: ">" [110:48 - 110:49] TypedefDecl=type4:110:80 (Definition)
436 // CHECK: Punctuation: "::" [110:49 - 110:51] TypedefDecl=type4:110:80 (Definition)
437 // CHECK: Keyword: "template" [110:51 - 110:59] TypedefDecl=type4:110:80 (Definition)
438 // CHECK: Identifier: "rebind" [110:60 - 110:66] TypedefDecl=type4:110:80 (Definition)
439 // CHECK: Punctuation: "<" [110:66 - 110:67] TypedefDecl=type4:110:80 (Definition)
440 // CHECK: Identifier: "type" [110:67 - 110:71] TypeRef=X6::type:106:14
441 // CHECK: Punctuation: ">" [110:71 - 110:72] TypedefDecl=type4:110:80 (Definition)
442 // CHECK: Punctuation: "::" [110:72 - 110:74] TypedefDecl=type4:110:80 (Definition)
443 // CHECK: Identifier: "other" [110:74 - 110:79] TypedefDecl=type4:110:80 (Definition)
444 // CHECK: Identifier: "type4" [110:80 - 110:85] TypedefDecl=type4:110:80 (Definition)
445
446 // Template template arguments
447 // CHECK: Keyword: "typedef" [126:3 - 126:10] TypedefDecl=type:126:74 (Definition)
448 // CHECK: Identifier: "outer_alias" [126:11 - 126:22] NamespaceRef=outer_alias:10:11
449 // CHECK: Punctuation: "::" [126:22 - 126:24] TypedefDecl=type:126:74 (Definition)
450 // CHECK: Identifier: "inner" [126:24 - 126:29] NamespaceRef=inner:114:13
451 // CHECK: Punctuation: "::" [126:29 - 126:31] TypedefDecl=type:126:74 (Definition)
452 // CHECK: Identifier: "apply_meta" [126:31 - 126:41] TemplateRef=apply_meta:116:12
453 // CHECK: Punctuation: "<" [126:41 - 126:42] TypedefDecl=type:126:74 (Definition)
454 // CHECK: Identifier: "T_type" [126:42 - 126:48] TypeRef=X7::T_type:124:13
455 // CHECK: Punctuation: "," [126:48 - 126:49] TypedefDecl=type:126:74 (Definition)
456 // CHECK: Identifier: "U_type" [126:50 - 126:56] TypeRef=X7::U_type:125:13
457 // CHECK: Punctuation: "::" [126:56 - 126:58] TypedefDecl=type:126:74 (Definition)
458 // CHECK: Keyword: "template" [126:58 - 126:66] TypedefDecl=type:126:74 (Definition)
459 // CHECK: Identifier: "apply" [126:67 - 126:72] TypedefDecl=type:126:74 (Definition)
460 // CHECK: Punctuation: ">" [126:72 - 126:73] TypedefDecl=type:126:74 (Definition)
461 // CHECK: Identifier: "type" [126:74 - 126:78] TypedefDecl=type:126:74 (Definition)
462
463 // Member access expressions
464 // CHECK: Identifier: "inherited" [136:5 - 136:14] TypeRef=X9::inherited:134:14
465 // CHECK: Punctuation: "::" [136:14 - 136:16] MemberRefExpr=f:130:8
466 // CHECK: Identifier: "f" [136:16 - 136:17] MemberRefExpr=f:130:8
467