1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
2 
3 #include "Inputs/json-dump-include.h"
4 
5 int TestLocation;
6 TestTypedefFromInclude TestLocationFromInclude;
7 
8 struct TestIndent {
9   int x;
10 };
11 
12 struct TestChildren {
13   int x;
14   struct y {
15     int z;
16   };
17 };
18 
testLabelDecl()19 void testLabelDecl() {
20   __label__ TestLabelDecl;
21   TestLabelDecl: goto TestLabelDecl;
22 }
23 
24 typedef int TestTypedefDecl;
25 
26 enum TestEnumDecl {
27   testEnumDecl
28 };
29 
30 struct TestEnumDeclAnon {
31   enum {
32     testEnumDeclAnon
33   } e;
34 };
35 
36 enum TestEnumDeclForward;
37 
38 struct TestRecordDecl {
39   int i;
40 };
41 
42 struct TestRecordDeclEmpty {
43 };
44 
45 struct TestRecordDeclAnon1 {
46   struct {
47   } testRecordDeclAnon1;
48 };
49 
50 struct TestRecordDeclAnon2 {
51   struct {
52   };
53 };
54 
55 struct TestRecordDeclForward;
56 
57 enum testEnumConstantDecl {
58   TestEnumConstantDecl,
59   TestEnumConstantDeclInit = 1
60 };
61 
62 struct TestIndirectFieldDecl {
63   struct {
64     int Field;
65   };
66 };
67 
68 // FIXME: It would be nice to dump the enum and its enumerators.
TestFunctionDecl(int x,enum{ e } y)69 int TestFunctionDecl(int x, enum { e } y) {
70   return x;
71 }
72 
73 // FIXME: It would be nice to dump 'Enum' and 'e'.
TestFunctionDecl2(enum Enum{ e } x)74 int TestFunctionDecl2(enum Enum { e } x) { return x; }
75 int TestFunctionDeclProto(int x);
76 void TestFunctionDeclNoProto();
77 extern int TestFunctionDeclSC();
78 inline int TestFunctionDeclInline();
79 
80 struct testFieldDecl {
81   int TestFieldDecl;
82   int TestFieldDeclWidth : 1;
83 };
84 
85 int TestVarDecl;
86 extern int TestVarDeclSC;
87 __thread int TestVarDeclThread;
88 int TestVarDeclInit = 0;
89 
90 void testParmVarDecl(int TestParmVarDecl);
91 
92 // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
93 
94 
95 // CHECK:  "kind": "TypedefDecl",
96 // CHECK-NEXT:  "loc": {
97 // CHECK-NEXT:   "offset": 12,
98 // CHECK-NEXT:   "file": "{{.*}}",
99 // CHECK-NEXT:   "line": 1,
100 // CHECK-NEXT:   "col": 13,
101 // CHECK-NEXT:   "tokLen": 22,
102 // CHECK-NEXT:   "includedFrom": {
103 // CHECK-NEXT:    "file": "{{.*}}"
104 // CHECK-NEXT:   }
105 // CHECK-NEXT:  },
106 // CHECK-NEXT:  "range": {
107 // CHECK-NEXT:   "begin": {
108 // CHECK-NEXT:    "offset": 0,
109 // CHECK-NEXT:    "col": 1,
110 // CHECK-NEXT:    "tokLen": 7,
111 // CHECK-NEXT:    "includedFrom": {
112 // CHECK-NEXT:     "file": "{{.*}}"
113 // CHECK-NEXT:    }
114 // CHECK-NEXT:   },
115 // CHECK-NEXT:   "end": {
116 // CHECK-NEXT:    "offset": 12,
117 // CHECK-NEXT:    "col": 13,
118 // CHECK-NEXT:    "tokLen": 22,
119 // CHECK-NEXT:    "includedFrom": {
120 // CHECK-NEXT:     "file": "{{.*}}"
121 // CHECK-NEXT:    }
122 // CHECK-NEXT:   }
123 // CHECK-NEXT:  },
124 // CHECK-NEXT:  "isReferenced": true,
125 // CHECK-NEXT:  "name": "TestTypedefFromInclude",
126 // CHECK-NEXT:  "type": {
127 // CHECK-NEXT:   "qualType": "int"
128 // CHECK-NEXT:  },
129 // CHECK-NEXT:  "inner": [
130 // CHECK-NEXT:   {
131 // CHECK-NEXT:    "id": "0x{{.*}}",
132 // CHECK-NEXT:    "kind": "BuiltinType",
133 // CHECK-NEXT:    "type": {
134 // CHECK-NEXT:     "qualType": "int"
135 // CHECK-NEXT:    }
136 // CHECK-NEXT:   }
137 // CHECK-NEXT:  ]
138 // CHECK-NEXT: }
139 
140 
141 // CHECK:  "kind": "VarDecl",
142 // CHECK-NEXT:  "loc": {
143 // CHECK-NEXT:   "offset": 149,
144 // CHECK-NEXT:   "file": "{{.*}}",
145 // CHECK-NEXT:   "line": 5,
146 // CHECK-NEXT:   "col": 5,
147 // CHECK-NEXT:   "tokLen": 12
148 // CHECK-NEXT:  },
149 // CHECK-NEXT:  "range": {
150 // CHECK-NEXT:   "begin": {
151 // CHECK-NEXT:    "offset": 145,
152 // CHECK-NEXT:    "col": 1,
153 // CHECK-NEXT:    "tokLen": 3
154 // CHECK-NEXT:   },
155 // CHECK-NEXT:   "end": {
156 // CHECK-NEXT:    "offset": 149,
157 // CHECK-NEXT:    "col": 5,
158 // CHECK-NEXT:    "tokLen": 12
159 // CHECK-NEXT:   }
160 // CHECK-NEXT:  },
161 // CHECK-NEXT:  "name": "TestLocation",
162 // CHECK-NEXT:  "mangledName": "TestLocation",
163 // CHECK-NEXT:  "type": {
164 // CHECK-NEXT:   "qualType": "int"
165 // CHECK-NEXT:  }
166 // CHECK-NEXT: }
167 
168 
169 // CHECK:  "kind": "VarDecl",
170 // CHECK-NEXT:  "loc": {
171 // CHECK-NEXT:   "offset": 186,
172 // CHECK-NEXT:   "file": "{{.*}}",
173 // CHECK-NEXT:   "line": 6,
174 // CHECK-NEXT:   "col": 24,
175 // CHECK-NEXT:   "tokLen": 23
176 // CHECK-NEXT:  },
177 // CHECK-NEXT:  "range": {
178 // CHECK-NEXT:   "begin": {
179 // CHECK-NEXT:    "offset": 163,
180 // CHECK-NEXT:    "col": 1,
181 // CHECK-NEXT:    "tokLen": 22
182 // CHECK-NEXT:   },
183 // CHECK-NEXT:   "end": {
184 // CHECK-NEXT:    "offset": 186,
185 // CHECK-NEXT:    "col": 24,
186 // CHECK-NEXT:    "tokLen": 23
187 // CHECK-NEXT:   }
188 // CHECK-NEXT:  },
189 // CHECK-NEXT:  "name": "TestLocationFromInclude",
190 // CHECK-NEXT:  "mangledName": "TestLocationFromInclude",
191 // CHECK-NEXT:  "type": {
192 // CHECK-NEXT:   "desugaredQualType": "int",
193 // CHECK-NEXT:   "qualType": "TestTypedefFromInclude",
194 // CHECK-NEXT:   "typeAliasDeclId": "0x{{.*}}"
195 // CHECK-NEXT:  }
196 // CHECK-NEXT: }
197 
198 
199 // CHECK:  "kind": "RecordDecl",
200 // CHECK-NEXT:  "loc": {
201 // CHECK-NEXT:   "offset": 219,
202 // CHECK-NEXT:   "file": "{{.*}}",
203 // CHECK-NEXT:   "line": 8,
204 // CHECK-NEXT:   "col": 8,
205 // CHECK-NEXT:   "tokLen": 10
206 // CHECK-NEXT:  },
207 // CHECK-NEXT:  "range": {
208 // CHECK-NEXT:   "begin": {
209 // CHECK-NEXT:    "offset": 212,
210 // CHECK-NEXT:    "col": 1,
211 // CHECK-NEXT:    "tokLen": 6
212 // CHECK-NEXT:   },
213 // CHECK-NEXT:   "end": {
214 // CHECK-NEXT:    "offset": 241,
215 // CHECK-NEXT:    "line": 10,
216 // CHECK-NEXT:    "col": 1,
217 // CHECK-NEXT:    "tokLen": 1
218 // CHECK-NEXT:   }
219 // CHECK-NEXT:  },
220 // CHECK-NEXT:  "name": "TestIndent",
221 // CHECK-NEXT:  "tagUsed": "struct",
222 // CHECK-NEXT:  "completeDefinition": true,
223 // CHECK-NEXT:  "inner": [
224 // CHECK-NEXT:   {
225 // CHECK-NEXT:    "id": "0x{{.*}}",
226 // CHECK-NEXT:    "kind": "FieldDecl",
227 // CHECK-NEXT:    "loc": {
228 // CHECK-NEXT:     "offset": 238,
229 // CHECK-NEXT:     "line": 9,
230 // CHECK-NEXT:     "col": 7,
231 // CHECK-NEXT:     "tokLen": 1
232 // CHECK-NEXT:    },
233 // CHECK-NEXT:    "range": {
234 // CHECK-NEXT:     "begin": {
235 // CHECK-NEXT:      "offset": 234,
236 // CHECK-NEXT:      "col": 3,
237 // CHECK-NEXT:      "tokLen": 3
238 // CHECK-NEXT:     },
239 // CHECK-NEXT:     "end": {
240 // CHECK-NEXT:      "offset": 238,
241 // CHECK-NEXT:      "col": 7,
242 // CHECK-NEXT:      "tokLen": 1
243 // CHECK-NEXT:     }
244 // CHECK-NEXT:    },
245 // CHECK-NEXT:    "name": "x",
246 // CHECK-NEXT:    "type": {
247 // CHECK-NEXT:     "qualType": "int"
248 // CHECK-NEXT:    }
249 // CHECK-NEXT:   }
250 // CHECK-NEXT:  ]
251 // CHECK-NEXT: }
252 
253 
254 // CHECK:  "kind": "RecordDecl",
255 // CHECK-NEXT:  "loc": {
256 // CHECK-NEXT:   "offset": 252,
257 // CHECK-NEXT:   "file": "{{.*}}",
258 // CHECK-NEXT:   "line": 12,
259 // CHECK-NEXT:   "col": 8,
260 // CHECK-NEXT:   "tokLen": 12
261 // CHECK-NEXT:  },
262 // CHECK-NEXT:  "range": {
263 // CHECK-NEXT:   "begin": {
264 // CHECK-NEXT:    "offset": 245,
265 // CHECK-NEXT:    "col": 1,
266 // CHECK-NEXT:    "tokLen": 6
267 // CHECK-NEXT:   },
268 // CHECK-NEXT:   "end": {
269 // CHECK-NEXT:    "offset": 305,
270 // CHECK-NEXT:    "line": 17,
271 // CHECK-NEXT:    "col": 1,
272 // CHECK-NEXT:    "tokLen": 1
273 // CHECK-NEXT:   }
274 // CHECK-NEXT:  },
275 // CHECK-NEXT:  "name": "TestChildren",
276 // CHECK-NEXT:  "tagUsed": "struct",
277 // CHECK-NEXT:  "completeDefinition": true,
278 // CHECK-NEXT:  "inner": [
279 // CHECK-NEXT:   {
280 // CHECK-NEXT:    "id": "0x{{.*}}",
281 // CHECK-NEXT:    "kind": "FieldDecl",
282 // CHECK-NEXT:    "loc": {
283 // CHECK-NEXT:     "offset": 273,
284 // CHECK-NEXT:     "line": 13,
285 // CHECK-NEXT:     "col": 7,
286 // CHECK-NEXT:     "tokLen": 1
287 // CHECK-NEXT:    },
288 // CHECK-NEXT:    "range": {
289 // CHECK-NEXT:     "begin": {
290 // CHECK-NEXT:      "offset": 269,
291 // CHECK-NEXT:      "col": 3,
292 // CHECK-NEXT:      "tokLen": 3
293 // CHECK-NEXT:     },
294 // CHECK-NEXT:     "end": {
295 // CHECK-NEXT:      "offset": 273,
296 // CHECK-NEXT:      "col": 7,
297 // CHECK-NEXT:      "tokLen": 1
298 // CHECK-NEXT:     }
299 // CHECK-NEXT:    },
300 // CHECK-NEXT:    "name": "x",
301 // CHECK-NEXT:    "type": {
302 // CHECK-NEXT:     "qualType": "int"
303 // CHECK-NEXT:    }
304 // CHECK-NEXT:   },
305 // CHECK-NEXT:   {
306 // CHECK-NEXT:    "id": "0x{{.*}}",
307 // CHECK-NEXT:    "kind": "RecordDecl",
308 // CHECK-NEXT:    "loc": {
309 // CHECK-NEXT:     "offset": 285,
310 // CHECK-NEXT:     "line": 14,
311 // CHECK-NEXT:     "col": 10,
312 // CHECK-NEXT:     "tokLen": 1
313 // CHECK-NEXT:    },
314 // CHECK-NEXT:    "range": {
315 // CHECK-NEXT:     "begin": {
316 // CHECK-NEXT:      "offset": 278,
317 // CHECK-NEXT:      "col": 3,
318 // CHECK-NEXT:      "tokLen": 6
319 // CHECK-NEXT:     },
320 // CHECK-NEXT:     "end": {
321 // CHECK-NEXT:      "offset": 302,
322 // CHECK-NEXT:      "line": 16,
323 // CHECK-NEXT:      "col": 3,
324 // CHECK-NEXT:      "tokLen": 1
325 // CHECK-NEXT:     }
326 // CHECK-NEXT:    },
327 // CHECK-NEXT:    "parentDeclContextId": "0x{{.*}}",
328 // CHECK-NEXT:    "name": "y",
329 // CHECK-NEXT:    "tagUsed": "struct",
330 // CHECK-NEXT:    "completeDefinition": true,
331 // CHECK-NEXT:    "inner": [
332 // CHECK-NEXT:     {
333 // CHECK-NEXT:      "id": "0x{{.*}}",
334 // CHECK-NEXT:      "kind": "FieldDecl",
335 // CHECK-NEXT:      "loc": {
336 // CHECK-NEXT:       "offset": 297,
337 // CHECK-NEXT:       "line": 15,
338 // CHECK-NEXT:       "col": 9,
339 // CHECK-NEXT:       "tokLen": 1
340 // CHECK-NEXT:      },
341 // CHECK-NEXT:      "range": {
342 // CHECK-NEXT:       "begin": {
343 // CHECK-NEXT:        "offset": 293,
344 // CHECK-NEXT:        "col": 5,
345 // CHECK-NEXT:        "tokLen": 3
346 // CHECK-NEXT:       },
347 // CHECK-NEXT:       "end": {
348 // CHECK-NEXT:        "offset": 297,
349 // CHECK-NEXT:        "col": 9,
350 // CHECK-NEXT:        "tokLen": 1
351 // CHECK-NEXT:       }
352 // CHECK-NEXT:      },
353 // CHECK-NEXT:      "name": "z",
354 // CHECK-NEXT:      "type": {
355 // CHECK-NEXT:       "qualType": "int"
356 // CHECK-NEXT:      }
357 // CHECK-NEXT:     }
358 // CHECK-NEXT:    ]
359 // CHECK-NEXT:   }
360 // CHECK-NEXT:  ]
361 // CHECK-NEXT: }
362 
363 
364 // CHECK:  "kind": "LabelDecl",
365 // CHECK-NEXT:  "loc": {
366 // CHECK-NEXT:   "offset": 344,
367 // CHECK-NEXT:   "file": "{{.*}}",
368 // CHECK-NEXT:   "line": 20,
369 // CHECK-NEXT:   "col": 13,
370 // CHECK-NEXT:   "tokLen": 13
371 // CHECK-NEXT:  },
372 // CHECK-NEXT:  "range": {
373 // CHECK-NEXT:   "begin": {
374 // CHECK-NEXT:    "offset": 334,
375 // CHECK-NEXT:    "col": 3,
376 // CHECK-NEXT:    "tokLen": 9
377 // CHECK-NEXT:   },
378 // CHECK-NEXT:   "end": {
379 // CHECK-NEXT:    "offset": 344,
380 // CHECK-NEXT:    "col": 13,
381 // CHECK-NEXT:    "tokLen": 13
382 // CHECK-NEXT:   }
383 // CHECK-NEXT:  },
384 // CHECK-NEXT:  "isUsed": true,
385 // CHECK-NEXT:  "name": "TestLabelDecl"
386 // CHECK-NEXT: }
387 
388 
389 // CHECK:  "kind": "TypedefDecl",
390 // CHECK-NEXT:  "loc": {
391 // CHECK-NEXT:   "offset": 411,
392 // CHECK-NEXT:   "file": "{{.*}}",
393 // CHECK-NEXT:   "line": 24,
394 // CHECK-NEXT:   "col": 13,
395 // CHECK-NEXT:   "tokLen": 15
396 // CHECK-NEXT:  },
397 // CHECK-NEXT:  "range": {
398 // CHECK-NEXT:   "begin": {
399 // CHECK-NEXT:    "offset": 399,
400 // CHECK-NEXT:    "col": 1,
401 // CHECK-NEXT:    "tokLen": 7
402 // CHECK-NEXT:   },
403 // CHECK-NEXT:   "end": {
404 // CHECK-NEXT:    "offset": 411,
405 // CHECK-NEXT:    "col": 13,
406 // CHECK-NEXT:    "tokLen": 15
407 // CHECK-NEXT:   }
408 // CHECK-NEXT:  },
409 // CHECK-NEXT:  "name": "TestTypedefDecl",
410 // CHECK-NEXT:  "type": {
411 // CHECK-NEXT:   "qualType": "int"
412 // CHECK-NEXT:  },
413 // CHECK-NEXT:  "inner": [
414 // CHECK-NEXT:   {
415 // CHECK-NEXT:    "id": "0x{{.*}}",
416 // CHECK-NEXT:    "kind": "BuiltinType",
417 // CHECK-NEXT:    "type": {
418 // CHECK-NEXT:     "qualType": "int"
419 // CHECK-NEXT:    }
420 // CHECK-NEXT:   }
421 // CHECK-NEXT:  ]
422 // CHECK-NEXT: }
423 
424 
425 // CHECK:  "kind": "EnumDecl",
426 // CHECK-NEXT:  "loc": {
427 // CHECK-NEXT:   "offset": 434,
428 // CHECK-NEXT:   "file": "{{.*}}",
429 // CHECK-NEXT:   "line": 26,
430 // CHECK-NEXT:   "col": 6,
431 // CHECK-NEXT:   "tokLen": 12
432 // CHECK-NEXT:  },
433 // CHECK-NEXT:  "range": {
434 // CHECK-NEXT:   "begin": {
435 // CHECK-NEXT:    "offset": 429,
436 // CHECK-NEXT:    "col": 1,
437 // CHECK-NEXT:    "tokLen": 4
438 // CHECK-NEXT:   },
439 // CHECK-NEXT:   "end": {
440 // CHECK-NEXT:    "offset": 464,
441 // CHECK-NEXT:    "line": 28,
442 // CHECK-NEXT:    "col": 1,
443 // CHECK-NEXT:    "tokLen": 1
444 // CHECK-NEXT:   }
445 // CHECK-NEXT:  },
446 // CHECK-NEXT:  "name": "TestEnumDecl",
447 // CHECK-NEXT:  "inner": [
448 // CHECK-NEXT:   {
449 // CHECK-NEXT:    "id": "0x{{.*}}",
450 // CHECK-NEXT:    "kind": "EnumConstantDecl",
451 // CHECK-NEXT:    "loc": {
452 // CHECK-NEXT:     "offset": 451,
453 // CHECK-NEXT:     "line": 27,
454 // CHECK-NEXT:     "col": 3,
455 // CHECK-NEXT:     "tokLen": 12
456 // CHECK-NEXT:    },
457 // CHECK-NEXT:    "range": {
458 // CHECK-NEXT:     "begin": {
459 // CHECK-NEXT:      "offset": 451,
460 // CHECK-NEXT:      "col": 3,
461 // CHECK-NEXT:      "tokLen": 12
462 // CHECK-NEXT:     },
463 // CHECK-NEXT:     "end": {
464 // CHECK-NEXT:      "offset": 451,
465 // CHECK-NEXT:      "col": 3,
466 // CHECK-NEXT:      "tokLen": 12
467 // CHECK-NEXT:     }
468 // CHECK-NEXT:    },
469 // CHECK-NEXT:    "name": "testEnumDecl",
470 // CHECK-NEXT:    "type": {
471 // CHECK-NEXT:     "qualType": "int"
472 // CHECK-NEXT:    }
473 // CHECK-NEXT:   }
474 // CHECK-NEXT:  ]
475 // CHECK-NEXT: }
476 
477 
478 // CHECK:  "kind": "RecordDecl",
479 // CHECK-NEXT:  "loc": {
480 // CHECK-NEXT:   "offset": 475,
481 // CHECK-NEXT:   "file": "{{.*}}",
482 // CHECK-NEXT:   "line": 30,
483 // CHECK-NEXT:   "col": 8,
484 // CHECK-NEXT:   "tokLen": 16
485 // CHECK-NEXT:  },
486 // CHECK-NEXT:  "range": {
487 // CHECK-NEXT:   "begin": {
488 // CHECK-NEXT:    "offset": 468,
489 // CHECK-NEXT:    "col": 1,
490 // CHECK-NEXT:    "tokLen": 6
491 // CHECK-NEXT:   },
492 // CHECK-NEXT:   "end": {
493 // CHECK-NEXT:    "offset": 531,
494 // CHECK-NEXT:    "line": 34,
495 // CHECK-NEXT:    "col": 1,
496 // CHECK-NEXT:    "tokLen": 1
497 // CHECK-NEXT:   }
498 // CHECK-NEXT:  },
499 // CHECK-NEXT:  "name": "TestEnumDeclAnon",
500 // CHECK-NEXT:  "tagUsed": "struct",
501 // CHECK-NEXT:  "completeDefinition": true,
502 // CHECK-NEXT:  "inner": [
503 // CHECK-NEXT:   {
504 // CHECK-NEXT:    "id": "0x{{.*}}",
505 // CHECK-NEXT:    "kind": "EnumDecl",
506 // CHECK-NEXT:    "loc": {
507 // CHECK-NEXT:     "offset": 496,
508 // CHECK-NEXT:     "line": 31,
509 // CHECK-NEXT:     "col": 3,
510 // CHECK-NEXT:     "tokLen": 4
511 // CHECK-NEXT:    },
512 // CHECK-NEXT:    "range": {
513 // CHECK-NEXT:     "begin": {
514 // CHECK-NEXT:      "offset": 496,
515 // CHECK-NEXT:      "col": 3,
516 // CHECK-NEXT:      "tokLen": 4
517 // CHECK-NEXT:     },
518 // CHECK-NEXT:     "end": {
519 // CHECK-NEXT:      "offset": 526,
520 // CHECK-NEXT:      "line": 33,
521 // CHECK-NEXT:      "col": 3,
522 // CHECK-NEXT:      "tokLen": 1
523 // CHECK-NEXT:     }
524 // CHECK-NEXT:    },
525 // CHECK-NEXT:    "inner": [
526 // CHECK-NEXT:     {
527 // CHECK-NEXT:      "id": "0x{{.*}}",
528 // CHECK-NEXT:      "kind": "EnumConstantDecl",
529 // CHECK-NEXT:      "loc": {
530 // CHECK-NEXT:       "offset": 507,
531 // CHECK-NEXT:       "line": 32,
532 // CHECK-NEXT:       "col": 5,
533 // CHECK-NEXT:       "tokLen": 16
534 // CHECK-NEXT:      },
535 // CHECK-NEXT:      "range": {
536 // CHECK-NEXT:       "begin": {
537 // CHECK-NEXT:        "offset": 507,
538 // CHECK-NEXT:        "col": 5,
539 // CHECK-NEXT:        "tokLen": 16
540 // CHECK-NEXT:       },
541 // CHECK-NEXT:       "end": {
542 // CHECK-NEXT:        "offset": 507,
543 // CHECK-NEXT:        "col": 5,
544 // CHECK-NEXT:        "tokLen": 16
545 // CHECK-NEXT:       }
546 // CHECK-NEXT:      },
547 // CHECK-NEXT:      "name": "testEnumDeclAnon",
548 // CHECK-NEXT:      "type": {
549 // CHECK-NEXT:       "qualType": "int"
550 // CHECK-NEXT:      }
551 // CHECK-NEXT:     }
552 // CHECK-NEXT:    ]
553 // CHECK-NEXT:   },
554 // CHECK-NEXT:   {
555 // CHECK-NEXT:    "id": "0x{{.*}}",
556 // CHECK-NEXT:    "kind": "FieldDecl",
557 // CHECK-NEXT:    "loc": {
558 // CHECK-NEXT:     "offset": 528,
559 // CHECK-NEXT:     "line": 33,
560 // CHECK-NEXT:     "col": 5,
561 // CHECK-NEXT:     "tokLen": 1
562 // CHECK-NEXT:    },
563 // CHECK-NEXT:    "range": {
564 // CHECK-NEXT:     "begin": {
565 // CHECK-NEXT:      "offset": 496,
566 // CHECK-NEXT:      "line": 31,
567 // CHECK-NEXT:      "col": 3,
568 // CHECK-NEXT:      "tokLen": 4
569 // CHECK-NEXT:     },
570 // CHECK-NEXT:     "end": {
571 // CHECK-NEXT:      "offset": 528,
572 // CHECK-NEXT:      "line": 33,
573 // CHECK-NEXT:      "col": 5,
574 // CHECK-NEXT:      "tokLen": 1
575 // CHECK-NEXT:     }
576 // CHECK-NEXT:    },
577 // CHECK-NEXT:    "name": "e",
578 // CHECK-NEXT:    "type": {
579 // CHECK-NEXT:     "desugaredQualType": "enum TestEnumDeclAnon::(anonymous at {{.*}}:31:3)",
580 // CHECK-NEXT:     "qualType": "enum (anonymous enum at {{.*}}:31:3)"
581 // CHECK-NEXT:    }
582 // CHECK-NEXT:   }
583 // CHECK-NEXT:  ]
584 // CHECK-NEXT: }
585 
586 
587 // CHECK:  "kind": "EnumDecl",
588 // CHECK-NEXT:  "loc": {
589 // CHECK-NEXT:   "offset": 540,
590 // CHECK-NEXT:   "file": "{{.*}}",
591 // CHECK-NEXT:   "line": 36,
592 // CHECK-NEXT:   "col": 6,
593 // CHECK-NEXT:   "tokLen": 19
594 // CHECK-NEXT:  },
595 // CHECK-NEXT:  "range": {
596 // CHECK-NEXT:   "begin": {
597 // CHECK-NEXT:    "offset": 535,
598 // CHECK-NEXT:    "col": 1,
599 // CHECK-NEXT:    "tokLen": 4
600 // CHECK-NEXT:   },
601 // CHECK-NEXT:   "end": {
602 // CHECK-NEXT:    "offset": 540,
603 // CHECK-NEXT:    "col": 6,
604 // CHECK-NEXT:    "tokLen": 19
605 // CHECK-NEXT:   }
606 // CHECK-NEXT:  },
607 // CHECK-NEXT:  "name": "TestEnumDeclForward"
608 // CHECK-NEXT: }
609 
610 
611 // CHECK:  "kind": "RecordDecl",
612 // CHECK-NEXT:  "loc": {
613 // CHECK-NEXT:   "offset": 569,
614 // CHECK-NEXT:   "file": "{{.*}}",
615 // CHECK-NEXT:   "line": 38,
616 // CHECK-NEXT:   "col": 8,
617 // CHECK-NEXT:   "tokLen": 14
618 // CHECK-NEXT:  },
619 // CHECK-NEXT:  "range": {
620 // CHECK-NEXT:   "begin": {
621 // CHECK-NEXT:    "offset": 562,
622 // CHECK-NEXT:    "col": 1,
623 // CHECK-NEXT:    "tokLen": 6
624 // CHECK-NEXT:   },
625 // CHECK-NEXT:   "end": {
626 // CHECK-NEXT:    "offset": 595,
627 // CHECK-NEXT:    "line": 40,
628 // CHECK-NEXT:    "col": 1,
629 // CHECK-NEXT:    "tokLen": 1
630 // CHECK-NEXT:   }
631 // CHECK-NEXT:  },
632 // CHECK-NEXT:  "name": "TestRecordDecl",
633 // CHECK-NEXT:  "tagUsed": "struct",
634 // CHECK-NEXT:  "completeDefinition": true,
635 // CHECK-NEXT:  "inner": [
636 // CHECK-NEXT:   {
637 // CHECK-NEXT:    "id": "0x{{.*}}",
638 // CHECK-NEXT:    "kind": "FieldDecl",
639 // CHECK-NEXT:    "loc": {
640 // CHECK-NEXT:     "offset": 592,
641 // CHECK-NEXT:     "line": 39,
642 // CHECK-NEXT:     "col": 7,
643 // CHECK-NEXT:     "tokLen": 1
644 // CHECK-NEXT:    },
645 // CHECK-NEXT:    "range": {
646 // CHECK-NEXT:     "begin": {
647 // CHECK-NEXT:      "offset": 588,
648 // CHECK-NEXT:      "col": 3,
649 // CHECK-NEXT:      "tokLen": 3
650 // CHECK-NEXT:     },
651 // CHECK-NEXT:     "end": {
652 // CHECK-NEXT:      "offset": 592,
653 // CHECK-NEXT:      "col": 7,
654 // CHECK-NEXT:      "tokLen": 1
655 // CHECK-NEXT:     }
656 // CHECK-NEXT:    },
657 // CHECK-NEXT:    "name": "i",
658 // CHECK-NEXT:    "type": {
659 // CHECK-NEXT:     "qualType": "int"
660 // CHECK-NEXT:    }
661 // CHECK-NEXT:   }
662 // CHECK-NEXT:  ]
663 // CHECK-NEXT: }
664 
665 
666 // CHECK:  "kind": "RecordDecl",
667 // CHECK-NEXT:  "loc": {
668 // CHECK-NEXT:   "offset": 606,
669 // CHECK-NEXT:   "file": "{{.*}}",
670 // CHECK-NEXT:   "line": 42,
671 // CHECK-NEXT:   "col": 8,
672 // CHECK-NEXT:   "tokLen": 19
673 // CHECK-NEXT:  },
674 // CHECK-NEXT:  "range": {
675 // CHECK-NEXT:   "begin": {
676 // CHECK-NEXT:    "offset": 599,
677 // CHECK-NEXT:    "col": 1,
678 // CHECK-NEXT:    "tokLen": 6
679 // CHECK-NEXT:   },
680 // CHECK-NEXT:   "end": {
681 // CHECK-NEXT:    "offset": 628,
682 // CHECK-NEXT:    "line": 43,
683 // CHECK-NEXT:    "col": 1,
684 // CHECK-NEXT:    "tokLen": 1
685 // CHECK-NEXT:   }
686 // CHECK-NEXT:  },
687 // CHECK-NEXT:  "name": "TestRecordDeclEmpty",
688 // CHECK-NEXT:  "tagUsed": "struct",
689 // CHECK-NEXT:  "completeDefinition": true
690 // CHECK-NEXT: }
691 
692 
693 // CHECK:  "kind": "RecordDecl",
694 // CHECK-NEXT:  "loc": {
695 // CHECK-NEXT:   "offset": 639,
696 // CHECK-NEXT:   "file": "{{.*}}",
697 // CHECK-NEXT:   "line": 45,
698 // CHECK-NEXT:   "col": 8,
699 // CHECK-NEXT:   "tokLen": 19
700 // CHECK-NEXT:  },
701 // CHECK-NEXT:  "range": {
702 // CHECK-NEXT:   "begin": {
703 // CHECK-NEXT:    "offset": 632,
704 // CHECK-NEXT:    "col": 1,
705 // CHECK-NEXT:    "tokLen": 6
706 // CHECK-NEXT:   },
707 // CHECK-NEXT:   "end": {
708 // CHECK-NEXT:    "offset": 697,
709 // CHECK-NEXT:    "line": 48,
710 // CHECK-NEXT:    "col": 1,
711 // CHECK-NEXT:    "tokLen": 1
712 // CHECK-NEXT:   }
713 // CHECK-NEXT:  },
714 // CHECK-NEXT:  "name": "TestRecordDeclAnon1",
715 // CHECK-NEXT:  "tagUsed": "struct",
716 // CHECK-NEXT:  "completeDefinition": true,
717 // CHECK-NEXT:  "inner": [
718 // CHECK-NEXT:   {
719 // CHECK-NEXT:    "id": "0x{{.*}}",
720 // CHECK-NEXT:    "kind": "RecordDecl",
721 // CHECK-NEXT:    "loc": {
722 // CHECK-NEXT:     "offset": 663,
723 // CHECK-NEXT:     "line": 46,
724 // CHECK-NEXT:     "col": 3,
725 // CHECK-NEXT:     "tokLen": 6
726 // CHECK-NEXT:    },
727 // CHECK-NEXT:    "range": {
728 // CHECK-NEXT:     "begin": {
729 // CHECK-NEXT:      "offset": 663,
730 // CHECK-NEXT:      "col": 3,
731 // CHECK-NEXT:      "tokLen": 6
732 // CHECK-NEXT:     },
733 // CHECK-NEXT:     "end": {
734 // CHECK-NEXT:      "offset": 674,
735 // CHECK-NEXT:      "line": 47,
736 // CHECK-NEXT:      "col": 3,
737 // CHECK-NEXT:      "tokLen": 1
738 // CHECK-NEXT:     }
739 // CHECK-NEXT:    },
740 // CHECK-NEXT:    "tagUsed": "struct",
741 // CHECK-NEXT:    "completeDefinition": true
742 // CHECK-NEXT:   },
743 // CHECK-NEXT:   {
744 // CHECK-NEXT:    "id": "0x{{.*}}",
745 // CHECK-NEXT:    "kind": "FieldDecl",
746 // CHECK-NEXT:    "loc": {
747 // CHECK-NEXT:     "offset": 676,
748 // CHECK-NEXT:     "col": 5,
749 // CHECK-NEXT:     "tokLen": 19
750 // CHECK-NEXT:    },
751 // CHECK-NEXT:    "range": {
752 // CHECK-NEXT:     "begin": {
753 // CHECK-NEXT:      "offset": 663,
754 // CHECK-NEXT:      "line": 46,
755 // CHECK-NEXT:      "col": 3,
756 // CHECK-NEXT:      "tokLen": 6
757 // CHECK-NEXT:     },
758 // CHECK-NEXT:     "end": {
759 // CHECK-NEXT:      "offset": 676,
760 // CHECK-NEXT:      "line": 47,
761 // CHECK-NEXT:      "col": 5,
762 // CHECK-NEXT:      "tokLen": 19
763 // CHECK-NEXT:     }
764 // CHECK-NEXT:    },
765 // CHECK-NEXT:    "name": "testRecordDeclAnon1",
766 // CHECK-NEXT:    "type": {
767 // CHECK-NEXT:     "desugaredQualType": "struct TestRecordDeclAnon1::(anonymous at {{.*}}:46:3)",
768 // CHECK-NEXT:     "qualType": "struct (anonymous struct at {{.*}}:46:3)"
769 // CHECK-NEXT:    }
770 // CHECK-NEXT:   }
771 // CHECK-NEXT:  ]
772 // CHECK-NEXT: }
773 
774 
775 // CHECK:  "kind": "RecordDecl",
776 // CHECK-NEXT:  "loc": {
777 // CHECK-NEXT:   "offset": 708,
778 // CHECK-NEXT:   "file": "{{.*}}",
779 // CHECK-NEXT:   "line": 50,
780 // CHECK-NEXT:   "col": 8,
781 // CHECK-NEXT:   "tokLen": 19
782 // CHECK-NEXT:  },
783 // CHECK-NEXT:  "range": {
784 // CHECK-NEXT:   "begin": {
785 // CHECK-NEXT:    "offset": 701,
786 // CHECK-NEXT:    "col": 1,
787 // CHECK-NEXT:    "tokLen": 6
788 // CHECK-NEXT:   },
789 // CHECK-NEXT:   "end": {
790 // CHECK-NEXT:    "offset": 746,
791 // CHECK-NEXT:    "line": 53,
792 // CHECK-NEXT:    "col": 1,
793 // CHECK-NEXT:    "tokLen": 1
794 // CHECK-NEXT:   }
795 // CHECK-NEXT:  },
796 // CHECK-NEXT:  "name": "TestRecordDeclAnon2",
797 // CHECK-NEXT:  "tagUsed": "struct",
798 // CHECK-NEXT:  "completeDefinition": true,
799 // CHECK-NEXT:  "inner": [
800 // CHECK-NEXT:   {
801 // CHECK-NEXT:    "id": "0x{{.*}}",
802 // CHECK-NEXT:    "kind": "RecordDecl",
803 // CHECK-NEXT:    "loc": {
804 // CHECK-NEXT:     "offset": 732,
805 // CHECK-NEXT:     "line": 51,
806 // CHECK-NEXT:     "col": 3,
807 // CHECK-NEXT:     "tokLen": 6
808 // CHECK-NEXT:    },
809 // CHECK-NEXT:    "range": {
810 // CHECK-NEXT:     "begin": {
811 // CHECK-NEXT:      "offset": 732,
812 // CHECK-NEXT:      "col": 3,
813 // CHECK-NEXT:      "tokLen": 6
814 // CHECK-NEXT:     },
815 // CHECK-NEXT:     "end": {
816 // CHECK-NEXT:      "offset": 743,
817 // CHECK-NEXT:      "line": 52,
818 // CHECK-NEXT:      "col": 3,
819 // CHECK-NEXT:      "tokLen": 1
820 // CHECK-NEXT:     }
821 // CHECK-NEXT:    },
822 // CHECK-NEXT:    "tagUsed": "struct",
823 // CHECK-NEXT:    "completeDefinition": true
824 // CHECK-NEXT:   },
825 // CHECK-NEXT:   {
826 // CHECK-NEXT:    "id": "0x{{.*}}",
827 // CHECK-NEXT:    "kind": "FieldDecl",
828 // CHECK-NEXT:    "loc": {
829 // CHECK-NEXT:     "offset": 732,
830 // CHECK-NEXT:     "line": 51,
831 // CHECK-NEXT:     "col": 3,
832 // CHECK-NEXT:     "tokLen": 6
833 // CHECK-NEXT:    },
834 // CHECK-NEXT:    "range": {
835 // CHECK-NEXT:     "begin": {
836 // CHECK-NEXT:      "offset": 732,
837 // CHECK-NEXT:      "col": 3,
838 // CHECK-NEXT:      "tokLen": 6
839 // CHECK-NEXT:     },
840 // CHECK-NEXT:     "end": {
841 // CHECK-NEXT:      "offset": 732,
842 // CHECK-NEXT:      "col": 3,
843 // CHECK-NEXT:      "tokLen": 6
844 // CHECK-NEXT:     }
845 // CHECK-NEXT:    },
846 // CHECK-NEXT:    "isImplicit": true,
847 // CHECK-NEXT:    "type": {
848 // CHECK-NEXT:     "qualType": "struct TestRecordDeclAnon2::(anonymous at {{.*}}:51:3)"
849 // CHECK-NEXT:    }
850 // CHECK-NEXT:   }
851 // CHECK-NEXT:  ]
852 // CHECK-NEXT: }
853 
854 
855 // CHECK:  "kind": "RecordDecl",
856 // CHECK-NEXT:  "loc": {
857 // CHECK-NEXT:   "offset": 757,
858 // CHECK-NEXT:   "file": "{{.*}}",
859 // CHECK-NEXT:   "line": 55,
860 // CHECK-NEXT:   "col": 8,
861 // CHECK-NEXT:   "tokLen": 21
862 // CHECK-NEXT:  },
863 // CHECK-NEXT:  "range": {
864 // CHECK-NEXT:   "begin": {
865 // CHECK-NEXT:    "offset": 750,
866 // CHECK-NEXT:    "col": 1,
867 // CHECK-NEXT:    "tokLen": 6
868 // CHECK-NEXT:   },
869 // CHECK-NEXT:   "end": {
870 // CHECK-NEXT:    "offset": 757,
871 // CHECK-NEXT:    "col": 8,
872 // CHECK-NEXT:    "tokLen": 21
873 // CHECK-NEXT:   }
874 // CHECK-NEXT:  },
875 // CHECK-NEXT:  "name": "TestRecordDeclForward",
876 // CHECK-NEXT:  "tagUsed": "struct"
877 // CHECK-NEXT: }
878 
879 
880 // CHECK:  "kind": "EnumConstantDecl",
881 // CHECK-NEXT:  "loc": {
882 // CHECK-NEXT:   "offset": 811,
883 // CHECK-NEXT:   "file": "{{.*}}",
884 // CHECK-NEXT:   "line": 58,
885 // CHECK-NEXT:   "col": 3,
886 // CHECK-NEXT:   "tokLen": 20
887 // CHECK-NEXT:  },
888 // CHECK-NEXT:  "range": {
889 // CHECK-NEXT:   "begin": {
890 // CHECK-NEXT:    "offset": 811,
891 // CHECK-NEXT:    "col": 3,
892 // CHECK-NEXT:    "tokLen": 20
893 // CHECK-NEXT:   },
894 // CHECK-NEXT:   "end": {
895 // CHECK-NEXT:    "offset": 811,
896 // CHECK-NEXT:    "col": 3,
897 // CHECK-NEXT:    "tokLen": 20
898 // CHECK-NEXT:   }
899 // CHECK-NEXT:  },
900 // CHECK-NEXT:  "name": "TestEnumConstantDecl",
901 // CHECK-NEXT:  "type": {
902 // CHECK-NEXT:   "qualType": "int"
903 // CHECK-NEXT:  }
904 // CHECK-NEXT: }
905 
906 
907 // CHECK:  "kind": "EnumConstantDecl",
908 // CHECK-NEXT:  "loc": {
909 // CHECK-NEXT:   "offset": 835,
910 // CHECK-NEXT:   "file": "{{.*}}",
911 // CHECK-NEXT:   "line": 59,
912 // CHECK-NEXT:   "col": 3,
913 // CHECK-NEXT:   "tokLen": 24
914 // CHECK-NEXT:  },
915 // CHECK-NEXT:  "range": {
916 // CHECK-NEXT:   "begin": {
917 // CHECK-NEXT:    "offset": 835,
918 // CHECK-NEXT:    "col": 3,
919 // CHECK-NEXT:    "tokLen": 24
920 // CHECK-NEXT:   },
921 // CHECK-NEXT:   "end": {
922 // CHECK-NEXT:    "offset": 862,
923 // CHECK-NEXT:    "col": 30,
924 // CHECK-NEXT:    "tokLen": 1
925 // CHECK-NEXT:   }
926 // CHECK-NEXT:  },
927 // CHECK-NEXT:  "name": "TestEnumConstantDeclInit",
928 // CHECK-NEXT:  "type": {
929 // CHECK-NEXT:   "qualType": "int"
930 // CHECK-NEXT:  },
931 // CHECK-NEXT:  "inner": [
932 // CHECK-NEXT:   {
933 // CHECK-NEXT:    "id": "0x{{.*}}",
934 // CHECK-NEXT:    "kind": "ConstantExpr",
935 // CHECK-NEXT:    "range": {
936 // CHECK-NEXT:     "begin": {
937 // CHECK-NEXT:      "offset": 862,
938 // CHECK-NEXT:      "col": 30,
939 // CHECK-NEXT:      "tokLen": 1
940 // CHECK-NEXT:     },
941 // CHECK-NEXT:     "end": {
942 // CHECK-NEXT:      "offset": 862,
943 // CHECK-NEXT:      "col": 30,
944 // CHECK-NEXT:      "tokLen": 1
945 // CHECK-NEXT:     }
946 // CHECK-NEXT:    },
947 // CHECK-NEXT:    "type": {
948 // CHECK-NEXT:     "qualType": "int"
949 // CHECK-NEXT:    },
950 // CHECK-NEXT:    "valueCategory": "rvalue",
951 // CHECK-NEXT:    "inner": [
952 // CHECK-NEXT:     {
953 // CHECK-NEXT:      "id": "0x{{.*}}",
954 // CHECK-NEXT:      "kind": "IntegerLiteral",
955 // CHECK-NEXT:      "range": {
956 // CHECK-NEXT:       "begin": {
957 // CHECK-NEXT:        "offset": 862,
958 // CHECK-NEXT:        "col": 30,
959 // CHECK-NEXT:        "tokLen": 1
960 // CHECK-NEXT:       },
961 // CHECK-NEXT:       "end": {
962 // CHECK-NEXT:        "offset": 862,
963 // CHECK-NEXT:        "col": 30,
964 // CHECK-NEXT:        "tokLen": 1
965 // CHECK-NEXT:       }
966 // CHECK-NEXT:      },
967 // CHECK-NEXT:      "type": {
968 // CHECK-NEXT:       "qualType": "int"
969 // CHECK-NEXT:      },
970 // CHECK-NEXT:      "valueCategory": "rvalue",
971 // CHECK-NEXT:      "value": "1"
972 // CHECK-NEXT:     }
973 // CHECK-NEXT:    ]
974 // CHECK-NEXT:   }
975 // CHECK-NEXT:  ]
976 // CHECK-NEXT: }
977 
978 
979 // CHECK:  "kind": "RecordDecl",
980 // CHECK-NEXT:  "loc": {
981 // CHECK-NEXT:   "offset": 875,
982 // CHECK-NEXT:   "file": "{{.*}}",
983 // CHECK-NEXT:   "line": 62,
984 // CHECK-NEXT:   "col": 8,
985 // CHECK-NEXT:   "tokLen": 21
986 // CHECK-NEXT:  },
987 // CHECK-NEXT:  "range": {
988 // CHECK-NEXT:   "begin": {
989 // CHECK-NEXT:    "offset": 868,
990 // CHECK-NEXT:    "col": 1,
991 // CHECK-NEXT:    "tokLen": 6
992 // CHECK-NEXT:   },
993 // CHECK-NEXT:   "end": {
994 // CHECK-NEXT:    "offset": 930,
995 // CHECK-NEXT:    "line": 66,
996 // CHECK-NEXT:    "col": 1,
997 // CHECK-NEXT:    "tokLen": 1
998 // CHECK-NEXT:   }
999 // CHECK-NEXT:  },
1000 // CHECK-NEXT:  "name": "TestIndirectFieldDecl",
1001 // CHECK-NEXT:  "tagUsed": "struct",
1002 // CHECK-NEXT:  "completeDefinition": true,
1003 // CHECK-NEXT:  "inner": [
1004 // CHECK-NEXT:   {
1005 // CHECK-NEXT:    "id": "0x{{.*}}",
1006 // CHECK-NEXT:    "kind": "RecordDecl",
1007 // CHECK-NEXT:    "loc": {
1008 // CHECK-NEXT:     "offset": 901,
1009 // CHECK-NEXT:     "line": 63,
1010 // CHECK-NEXT:     "col": 3,
1011 // CHECK-NEXT:     "tokLen": 6
1012 // CHECK-NEXT:    },
1013 // CHECK-NEXT:    "range": {
1014 // CHECK-NEXT:     "begin": {
1015 // CHECK-NEXT:      "offset": 901,
1016 // CHECK-NEXT:      "col": 3,
1017 // CHECK-NEXT:      "tokLen": 6
1018 // CHECK-NEXT:     },
1019 // CHECK-NEXT:     "end": {
1020 // CHECK-NEXT:      "offset": 927,
1021 // CHECK-NEXT:      "line": 65,
1022 // CHECK-NEXT:      "col": 3,
1023 // CHECK-NEXT:      "tokLen": 1
1024 // CHECK-NEXT:     }
1025 // CHECK-NEXT:    },
1026 // CHECK-NEXT:    "tagUsed": "struct",
1027 // CHECK-NEXT:    "completeDefinition": true,
1028 // CHECK-NEXT:    "inner": [
1029 // CHECK-NEXT:     {
1030 // CHECK-NEXT:      "id": "0x{{.*}}",
1031 // CHECK-NEXT:      "kind": "FieldDecl",
1032 // CHECK-NEXT:      "loc": {
1033 // CHECK-NEXT:       "offset": 918,
1034 // CHECK-NEXT:       "line": 64,
1035 // CHECK-NEXT:       "col": 9,
1036 // CHECK-NEXT:       "tokLen": 5
1037 // CHECK-NEXT:      },
1038 // CHECK-NEXT:      "range": {
1039 // CHECK-NEXT:       "begin": {
1040 // CHECK-NEXT:        "offset": 914,
1041 // CHECK-NEXT:        "col": 5,
1042 // CHECK-NEXT:        "tokLen": 3
1043 // CHECK-NEXT:       },
1044 // CHECK-NEXT:       "end": {
1045 // CHECK-NEXT:        "offset": 918,
1046 // CHECK-NEXT:        "col": 9,
1047 // CHECK-NEXT:        "tokLen": 5
1048 // CHECK-NEXT:       }
1049 // CHECK-NEXT:      },
1050 // CHECK-NEXT:      "name": "Field",
1051 // CHECK-NEXT:      "type": {
1052 // CHECK-NEXT:       "qualType": "int"
1053 // CHECK-NEXT:      }
1054 // CHECK-NEXT:     }
1055 // CHECK-NEXT:    ]
1056 // CHECK-NEXT:   },
1057 // CHECK-NEXT:   {
1058 // CHECK-NEXT:    "id": "0x{{.*}}",
1059 // CHECK-NEXT:    "kind": "FieldDecl",
1060 // CHECK-NEXT:    "loc": {
1061 // CHECK-NEXT:     "offset": 901,
1062 // CHECK-NEXT:     "line": 63,
1063 // CHECK-NEXT:     "col": 3,
1064 // CHECK-NEXT:     "tokLen": 6
1065 // CHECK-NEXT:    },
1066 // CHECK-NEXT:    "range": {
1067 // CHECK-NEXT:     "begin": {
1068 // CHECK-NEXT:      "offset": 901,
1069 // CHECK-NEXT:      "col": 3,
1070 // CHECK-NEXT:      "tokLen": 6
1071 // CHECK-NEXT:     },
1072 // CHECK-NEXT:     "end": {
1073 // CHECK-NEXT:      "offset": 901,
1074 // CHECK-NEXT:      "col": 3,
1075 // CHECK-NEXT:      "tokLen": 6
1076 // CHECK-NEXT:     }
1077 // CHECK-NEXT:    },
1078 // CHECK-NEXT:    "isImplicit": true,
1079 // CHECK-NEXT:    "type": {
1080 // CHECK-NEXT:     "qualType": "struct TestIndirectFieldDecl::(anonymous at {{.*}}:63:3)"
1081 // CHECK-NEXT:    }
1082 // CHECK-NEXT:   },
1083 // CHECK-NEXT:   {
1084 // CHECK-NEXT:    "id": "0x{{.*}}",
1085 // CHECK-NEXT:    "kind": "IndirectFieldDecl",
1086 // CHECK-NEXT:    "loc": {
1087 // CHECK-NEXT:     "offset": 918,
1088 // CHECK-NEXT:     "line": 64,
1089 // CHECK-NEXT:     "col": 9,
1090 // CHECK-NEXT:     "tokLen": 5
1091 // CHECK-NEXT:    },
1092 // CHECK-NEXT:    "range": {
1093 // CHECK-NEXT:     "begin": {
1094 // CHECK-NEXT:      "offset": 918,
1095 // CHECK-NEXT:      "col": 9,
1096 // CHECK-NEXT:      "tokLen": 5
1097 // CHECK-NEXT:     },
1098 // CHECK-NEXT:     "end": {
1099 // CHECK-NEXT:      "offset": 918,
1100 // CHECK-NEXT:      "col": 9,
1101 // CHECK-NEXT:      "tokLen": 5
1102 // CHECK-NEXT:     }
1103 // CHECK-NEXT:    },
1104 // CHECK-NEXT:    "isImplicit": true,
1105 // CHECK-NEXT:    "name": "Field"
1106 // CHECK-NEXT:   }
1107 // CHECK-NEXT:  ]
1108 // CHECK-NEXT: }
1109 
1110 
1111 // CHECK:  "kind": "FunctionDecl",
1112 // CHECK-NEXT:  "loc": {
1113 // CHECK-NEXT:   "offset": 1003,
1114 // CHECK-NEXT:   "file": "{{.*}}",
1115 // CHECK-NEXT:   "line": 69,
1116 // CHECK-NEXT:   "col": 5,
1117 // CHECK-NEXT:   "tokLen": 16
1118 // CHECK-NEXT:  },
1119 // CHECK-NEXT:  "range": {
1120 // CHECK-NEXT:   "begin": {
1121 // CHECK-NEXT:    "offset": 999,
1122 // CHECK-NEXT:    "col": 1,
1123 // CHECK-NEXT:    "tokLen": 3
1124 // CHECK-NEXT:   },
1125 // CHECK-NEXT:   "end": {
1126 // CHECK-NEXT:    "offset": 1055,
1127 // CHECK-NEXT:    "line": 71,
1128 // CHECK-NEXT:    "col": 1,
1129 // CHECK-NEXT:    "tokLen": 1
1130 // CHECK-NEXT:   }
1131 // CHECK-NEXT:  },
1132 // CHECK-NEXT:  "name": "TestFunctionDecl",
1133 // CHECK-NEXT:  "mangledName": "TestFunctionDecl",
1134 // CHECK-NEXT:  "type": {
1135 // CHECK-NEXT:   "qualType": "int (int, enum (anonymous enum at {{.*}}:69:29))"
1136 // CHECK-NEXT:  },
1137 // CHECK-NEXT:  "inner": [
1138 // CHECK-NEXT:   {
1139 // CHECK-NEXT:    "id": "0x{{.*}}",
1140 // CHECK-NEXT:    "kind": "ParmVarDecl",
1141 // CHECK-NEXT:    "loc": {
1142 // CHECK-NEXT:     "offset": 1024,
1143 // CHECK-NEXT:     "line": 69,
1144 // CHECK-NEXT:     "col": 26,
1145 // CHECK-NEXT:     "tokLen": 1
1146 // CHECK-NEXT:    },
1147 // CHECK-NEXT:    "range": {
1148 // CHECK-NEXT:     "begin": {
1149 // CHECK-NEXT:      "offset": 1020,
1150 // CHECK-NEXT:      "col": 22,
1151 // CHECK-NEXT:      "tokLen": 3
1152 // CHECK-NEXT:     },
1153 // CHECK-NEXT:     "end": {
1154 // CHECK-NEXT:      "offset": 1024,
1155 // CHECK-NEXT:      "col": 26,
1156 // CHECK-NEXT:      "tokLen": 1
1157 // CHECK-NEXT:     }
1158 // CHECK-NEXT:    },
1159 // CHECK-NEXT:    "isUsed": true,
1160 // CHECK-NEXT:    "name": "x",
1161 // CHECK-NEXT:    "mangledName": "x",
1162 // CHECK-NEXT:    "type": {
1163 // CHECK-NEXT:     "qualType": "int"
1164 // CHECK-NEXT:    }
1165 // CHECK-NEXT:   },
1166 // CHECK-NEXT:   {
1167 // CHECK-NEXT:    "id": "0x{{.*}}",
1168 // CHECK-NEXT:    "kind": "ParmVarDecl",
1169 // CHECK-NEXT:    "loc": {
1170 // CHECK-NEXT:     "offset": 1038,
1171 // CHECK-NEXT:     "col": 40,
1172 // CHECK-NEXT:     "tokLen": 1
1173 // CHECK-NEXT:    },
1174 // CHECK-NEXT:    "range": {
1175 // CHECK-NEXT:     "begin": {
1176 // CHECK-NEXT:      "offset": 1027,
1177 // CHECK-NEXT:      "col": 29,
1178 // CHECK-NEXT:      "tokLen": 4
1179 // CHECK-NEXT:     },
1180 // CHECK-NEXT:     "end": {
1181 // CHECK-NEXT:      "offset": 1038,
1182 // CHECK-NEXT:      "col": 40,
1183 // CHECK-NEXT:      "tokLen": 1
1184 // CHECK-NEXT:     }
1185 // CHECK-NEXT:    },
1186 // CHECK-NEXT:    "name": "y",
1187 // CHECK-NEXT:    "mangledName": "y",
1188 // CHECK-NEXT:    "type": {
1189 // CHECK-NEXT:     "desugaredQualType": "enum (anonymous at {{.*}}:69:29)",
1190 // CHECK-NEXT:     "qualType": "enum (anonymous enum at {{.*}}:69:29)"
1191 // CHECK-NEXT:    }
1192 // CHECK-NEXT:   },
1193 // CHECK-NEXT:   {
1194 // CHECK-NEXT:    "id": "0x{{.*}}",
1195 // CHECK-NEXT:    "kind": "CompoundStmt",
1196 // CHECK-NEXT:    "range": {
1197 // CHECK-NEXT:     "begin": {
1198 // CHECK-NEXT:      "offset": 1041,
1199 // CHECK-NEXT:      "col": 43,
1200 // CHECK-NEXT:      "tokLen": 1
1201 // CHECK-NEXT:     },
1202 // CHECK-NEXT:     "end": {
1203 // CHECK-NEXT:      "offset": 1055,
1204 // CHECK-NEXT:      "line": 71,
1205 // CHECK-NEXT:      "col": 1,
1206 // CHECK-NEXT:      "tokLen": 1
1207 // CHECK-NEXT:     }
1208 // CHECK-NEXT:    },
1209 // CHECK-NEXT:    "inner": [
1210 // CHECK-NEXT:     {
1211 // CHECK-NEXT:      "id": "0x{{.*}}",
1212 // CHECK-NEXT:      "kind": "ReturnStmt",
1213 // CHECK-NEXT:      "range": {
1214 // CHECK-NEXT:       "begin": {
1215 // CHECK-NEXT:        "offset": 1045,
1216 // CHECK-NEXT:        "line": 70,
1217 // CHECK-NEXT:        "col": 3,
1218 // CHECK-NEXT:        "tokLen": 6
1219 // CHECK-NEXT:       },
1220 // CHECK-NEXT:       "end": {
1221 // CHECK-NEXT:        "offset": 1052,
1222 // CHECK-NEXT:        "col": 10,
1223 // CHECK-NEXT:        "tokLen": 1
1224 // CHECK-NEXT:       }
1225 // CHECK-NEXT:      },
1226 // CHECK-NEXT:      "inner": [
1227 // CHECK-NEXT:       {
1228 // CHECK-NEXT:        "id": "0x{{.*}}",
1229 // CHECK-NEXT:        "kind": "ImplicitCastExpr",
1230 // CHECK-NEXT:        "range": {
1231 // CHECK-NEXT:         "begin": {
1232 // CHECK-NEXT:          "offset": 1052,
1233 // CHECK-NEXT:          "col": 10,
1234 // CHECK-NEXT:          "tokLen": 1
1235 // CHECK-NEXT:         },
1236 // CHECK-NEXT:         "end": {
1237 // CHECK-NEXT:          "offset": 1052,
1238 // CHECK-NEXT:          "col": 10,
1239 // CHECK-NEXT:          "tokLen": 1
1240 // CHECK-NEXT:         }
1241 // CHECK-NEXT:        },
1242 // CHECK-NEXT:        "type": {
1243 // CHECK-NEXT:         "qualType": "int"
1244 // CHECK-NEXT:        },
1245 // CHECK-NEXT:        "valueCategory": "rvalue",
1246 // CHECK-NEXT:        "castKind": "LValueToRValue",
1247 // CHECK-NEXT:        "inner": [
1248 // CHECK-NEXT:         {
1249 // CHECK-NEXT:          "id": "0x{{.*}}",
1250 // CHECK-NEXT:          "kind": "DeclRefExpr",
1251 // CHECK-NEXT:          "range": {
1252 // CHECK-NEXT:           "begin": {
1253 // CHECK-NEXT:            "offset": 1052,
1254 // CHECK-NEXT:            "col": 10,
1255 // CHECK-NEXT:            "tokLen": 1
1256 // CHECK-NEXT:           },
1257 // CHECK-NEXT:           "end": {
1258 // CHECK-NEXT:            "offset": 1052,
1259 // CHECK-NEXT:            "col": 10,
1260 // CHECK-NEXT:            "tokLen": 1
1261 // CHECK-NEXT:           }
1262 // CHECK-NEXT:          },
1263 // CHECK-NEXT:          "type": {
1264 // CHECK-NEXT:           "qualType": "int"
1265 // CHECK-NEXT:          },
1266 // CHECK-NEXT:          "valueCategory": "lvalue",
1267 // CHECK-NEXT:          "referencedDecl": {
1268 // CHECK-NEXT:           "id": "0x{{.*}}",
1269 // CHECK-NEXT:           "kind": "ParmVarDecl",
1270 // CHECK-NEXT:           "name": "x",
1271 // CHECK-NEXT:           "type": {
1272 // CHECK-NEXT:            "qualType": "int"
1273 // CHECK-NEXT:           }
1274 // CHECK-NEXT:          }
1275 // CHECK-NEXT:         }
1276 // CHECK-NEXT:        ]
1277 // CHECK-NEXT:       }
1278 // CHECK-NEXT:      ]
1279 // CHECK-NEXT:     }
1280 // CHECK-NEXT:    ]
1281 // CHECK-NEXT:   }
1282 // CHECK-NEXT:  ]
1283 // CHECK-NEXT: }
1284 
1285 
1286 // CHECK:  "kind": "FunctionDecl",
1287 // CHECK-NEXT:  "loc": {
1288 // CHECK-NEXT:   "offset": 1113,
1289 // CHECK-NEXT:   "file": "{{.*}}",
1290 // CHECK-NEXT:   "line": 74,
1291 // CHECK-NEXT:   "col": 5,
1292 // CHECK-NEXT:   "tokLen": 17
1293 // CHECK-NEXT:  },
1294 // CHECK-NEXT:  "range": {
1295 // CHECK-NEXT:   "begin": {
1296 // CHECK-NEXT:    "offset": 1109,
1297 // CHECK-NEXT:    "col": 1,
1298 // CHECK-NEXT:    "tokLen": 3
1299 // CHECK-NEXT:   },
1300 // CHECK-NEXT:   "end": {
1301 // CHECK-NEXT:    "offset": 1162,
1302 // CHECK-NEXT:    "col": 54,
1303 // CHECK-NEXT:    "tokLen": 1
1304 // CHECK-NEXT:   }
1305 // CHECK-NEXT:  },
1306 // CHECK-NEXT:  "name": "TestFunctionDecl2",
1307 // CHECK-NEXT:  "mangledName": "TestFunctionDecl2",
1308 // CHECK-NEXT:  "type": {
1309 // CHECK-NEXT:   "qualType": "int (enum Enum)"
1310 // CHECK-NEXT:  },
1311 // CHECK-NEXT:  "inner": [
1312 // CHECK-NEXT:   {
1313 // CHECK-NEXT:    "id": "0x{{.*}}",
1314 // CHECK-NEXT:    "kind": "ParmVarDecl",
1315 // CHECK-NEXT:    "loc": {
1316 // CHECK-NEXT:     "offset": 1147,
1317 // CHECK-NEXT:     "col": 39,
1318 // CHECK-NEXT:     "tokLen": 1
1319 // CHECK-NEXT:    },
1320 // CHECK-NEXT:    "range": {
1321 // CHECK-NEXT:     "begin": {
1322 // CHECK-NEXT:      "offset": 1131,
1323 // CHECK-NEXT:      "col": 23,
1324 // CHECK-NEXT:      "tokLen": 4
1325 // CHECK-NEXT:     },
1326 // CHECK-NEXT:     "end": {
1327 // CHECK-NEXT:      "offset": 1147,
1328 // CHECK-NEXT:      "col": 39,
1329 // CHECK-NEXT:      "tokLen": 1
1330 // CHECK-NEXT:     }
1331 // CHECK-NEXT:    },
1332 // CHECK-NEXT:    "isUsed": true,
1333 // CHECK-NEXT:    "name": "x",
1334 // CHECK-NEXT:    "mangledName": "x",
1335 // CHECK-NEXT:    "type": {
1336 // CHECK-NEXT:     "desugaredQualType": "enum Enum",
1337 // CHECK-NEXT:     "qualType": "enum Enum"
1338 // CHECK-NEXT:    }
1339 // CHECK-NEXT:   },
1340 // CHECK-NEXT:   {
1341 // CHECK-NEXT:    "id": "0x{{.*}}",
1342 // CHECK-NEXT:    "kind": "CompoundStmt",
1343 // CHECK-NEXT:    "range": {
1344 // CHECK-NEXT:     "begin": {
1345 // CHECK-NEXT:      "offset": 1150,
1346 // CHECK-NEXT:      "col": 42,
1347 // CHECK-NEXT:      "tokLen": 1
1348 // CHECK-NEXT:     },
1349 // CHECK-NEXT:     "end": {
1350 // CHECK-NEXT:      "offset": 1162,
1351 // CHECK-NEXT:      "col": 54,
1352 // CHECK-NEXT:      "tokLen": 1
1353 // CHECK-NEXT:     }
1354 // CHECK-NEXT:    },
1355 // CHECK-NEXT:    "inner": [
1356 // CHECK-NEXT:     {
1357 // CHECK-NEXT:      "id": "0x{{.*}}",
1358 // CHECK-NEXT:      "kind": "ReturnStmt",
1359 // CHECK-NEXT:      "range": {
1360 // CHECK-NEXT:       "begin": {
1361 // CHECK-NEXT:        "offset": 1152,
1362 // CHECK-NEXT:        "col": 44,
1363 // CHECK-NEXT:        "tokLen": 6
1364 // CHECK-NEXT:       },
1365 // CHECK-NEXT:       "end": {
1366 // CHECK-NEXT:        "offset": 1159,
1367 // CHECK-NEXT:        "col": 51,
1368 // CHECK-NEXT:        "tokLen": 1
1369 // CHECK-NEXT:       }
1370 // CHECK-NEXT:      },
1371 // CHECK-NEXT:      "inner": [
1372 // CHECK-NEXT:       {
1373 // CHECK-NEXT:        "id": "0x{{.*}}",
1374 // CHECK-NEXT:        "kind": "ImplicitCastExpr",
1375 // CHECK-NEXT:        "range": {
1376 // CHECK-NEXT:         "begin": {
1377 // CHECK-NEXT:          "offset": 1159,
1378 // CHECK-NEXT:          "col": 51,
1379 // CHECK-NEXT:          "tokLen": 1
1380 // CHECK-NEXT:         },
1381 // CHECK-NEXT:         "end": {
1382 // CHECK-NEXT:          "offset": 1159,
1383 // CHECK-NEXT:          "col": 51,
1384 // CHECK-NEXT:          "tokLen": 1
1385 // CHECK-NEXT:         }
1386 // CHECK-NEXT:        },
1387 // CHECK-NEXT:        "type": {
1388 // CHECK-NEXT:         "qualType": "int"
1389 // CHECK-NEXT:        },
1390 // CHECK-NEXT:        "valueCategory": "rvalue",
1391 // CHECK-NEXT:        "castKind": "IntegralCast",
1392 // CHECK-NEXT:        "inner": [
1393 // CHECK-NEXT:         {
1394 // CHECK-NEXT:          "id": "0x{{.*}}",
1395 // CHECK-NEXT:          "kind": "ImplicitCastExpr",
1396 // CHECK-NEXT:          "range": {
1397 // CHECK-NEXT:           "begin": {
1398 // CHECK-NEXT:            "offset": 1159,
1399 // CHECK-NEXT:            "col": 51,
1400 // CHECK-NEXT:            "tokLen": 1
1401 // CHECK-NEXT:           },
1402 // CHECK-NEXT:           "end": {
1403 // CHECK-NEXT:            "offset": 1159,
1404 // CHECK-NEXT:            "col": 51,
1405 // CHECK-NEXT:            "tokLen": 1
1406 // CHECK-NEXT:           }
1407 // CHECK-NEXT:          },
1408 // CHECK-NEXT:          "type": {
1409 // CHECK-NEXT:           "desugaredQualType": "enum Enum",
1410 // CHECK-NEXT:           "qualType": "enum Enum"
1411 // CHECK-NEXT:          },
1412 // CHECK-NEXT:          "valueCategory": "rvalue",
1413 // CHECK-NEXT:          "castKind": "LValueToRValue",
1414 // CHECK-NEXT:          "inner": [
1415 // CHECK-NEXT:           {
1416 // CHECK-NEXT:            "id": "0x{{.*}}",
1417 // CHECK-NEXT:            "kind": "DeclRefExpr",
1418 // CHECK-NEXT:            "range": {
1419 // CHECK-NEXT:             "begin": {
1420 // CHECK-NEXT:              "offset": 1159,
1421 // CHECK-NEXT:              "col": 51,
1422 // CHECK-NEXT:              "tokLen": 1
1423 // CHECK-NEXT:             },
1424 // CHECK-NEXT:             "end": {
1425 // CHECK-NEXT:              "offset": 1159,
1426 // CHECK-NEXT:              "col": 51,
1427 // CHECK-NEXT:              "tokLen": 1
1428 // CHECK-NEXT:             }
1429 // CHECK-NEXT:            },
1430 // CHECK-NEXT:            "type": {
1431 // CHECK-NEXT:             "desugaredQualType": "enum Enum",
1432 // CHECK-NEXT:             "qualType": "enum Enum"
1433 // CHECK-NEXT:            },
1434 // CHECK-NEXT:            "valueCategory": "lvalue",
1435 // CHECK-NEXT:            "referencedDecl": {
1436 // CHECK-NEXT:             "id": "0x{{.*}}",
1437 // CHECK-NEXT:             "kind": "ParmVarDecl",
1438 // CHECK-NEXT:             "name": "x",
1439 // CHECK-NEXT:             "type": {
1440 // CHECK-NEXT:              "desugaredQualType": "enum Enum",
1441 // CHECK-NEXT:              "qualType": "enum Enum"
1442 // CHECK-NEXT:             }
1443 // CHECK-NEXT:            }
1444 // CHECK-NEXT:           }
1445 // CHECK-NEXT:          ]
1446 // CHECK-NEXT:         }
1447 // CHECK-NEXT:        ]
1448 // CHECK-NEXT:       }
1449 // CHECK-NEXT:      ]
1450 // CHECK-NEXT:     }
1451 // CHECK-NEXT:    ]
1452 // CHECK-NEXT:   }
1453 // CHECK-NEXT:  ]
1454 // CHECK-NEXT: }
1455 
1456 
1457 // CHECK:  "kind": "FunctionDecl",
1458 // CHECK-NEXT:  "loc": {
1459 // CHECK-NEXT:   "offset": 1168,
1460 // CHECK-NEXT:   "file": "{{.*}}",
1461 // CHECK-NEXT:   "line": 75,
1462 // CHECK-NEXT:   "col": 5,
1463 // CHECK-NEXT:   "tokLen": 21
1464 // CHECK-NEXT:  },
1465 // CHECK-NEXT:  "range": {
1466 // CHECK-NEXT:   "begin": {
1467 // CHECK-NEXT:    "offset": 1164,
1468 // CHECK-NEXT:    "col": 1,
1469 // CHECK-NEXT:    "tokLen": 3
1470 // CHECK-NEXT:   },
1471 // CHECK-NEXT:   "end": {
1472 // CHECK-NEXT:    "offset": 1195,
1473 // CHECK-NEXT:    "col": 32,
1474 // CHECK-NEXT:    "tokLen": 1
1475 // CHECK-NEXT:   }
1476 // CHECK-NEXT:  },
1477 // CHECK-NEXT:  "name": "TestFunctionDeclProto",
1478 // CHECK-NEXT:  "mangledName": "TestFunctionDeclProto",
1479 // CHECK-NEXT:  "type": {
1480 // CHECK-NEXT:   "qualType": "int (int)"
1481 // CHECK-NEXT:  },
1482 // CHECK-NEXT:  "inner": [
1483 // CHECK-NEXT:   {
1484 // CHECK-NEXT:    "id": "0x{{.*}}",
1485 // CHECK-NEXT:    "kind": "ParmVarDecl",
1486 // CHECK-NEXT:    "loc": {
1487 // CHECK-NEXT:     "offset": 1194,
1488 // CHECK-NEXT:     "col": 31,
1489 // CHECK-NEXT:     "tokLen": 1
1490 // CHECK-NEXT:    },
1491 // CHECK-NEXT:    "range": {
1492 // CHECK-NEXT:     "begin": {
1493 // CHECK-NEXT:      "offset": 1190,
1494 // CHECK-NEXT:      "col": 27,
1495 // CHECK-NEXT:      "tokLen": 3
1496 // CHECK-NEXT:     },
1497 // CHECK-NEXT:     "end": {
1498 // CHECK-NEXT:      "offset": 1194,
1499 // CHECK-NEXT:      "col": 31,
1500 // CHECK-NEXT:      "tokLen": 1
1501 // CHECK-NEXT:     }
1502 // CHECK-NEXT:    },
1503 // CHECK-NEXT:    "name": "x",
1504 // CHECK-NEXT:    "mangledName": "x",
1505 // CHECK-NEXT:    "type": {
1506 // CHECK-NEXT:     "qualType": "int"
1507 // CHECK-NEXT:    }
1508 // CHECK-NEXT:   }
1509 // CHECK-NEXT:  ]
1510 // CHECK-NEXT: }
1511 
1512 
1513 // CHECK:  "kind": "FunctionDecl",
1514 // CHECK-NEXT:  "loc": {
1515 // CHECK-NEXT:   "offset": 1203,
1516 // CHECK-NEXT:   "file": "{{.*}}",
1517 // CHECK-NEXT:   "line": 76,
1518 // CHECK-NEXT:   "col": 6,
1519 // CHECK-NEXT:   "tokLen": 23
1520 // CHECK-NEXT:  },
1521 // CHECK-NEXT:  "range": {
1522 // CHECK-NEXT:   "begin": {
1523 // CHECK-NEXT:    "offset": 1198,
1524 // CHECK-NEXT:    "col": 1,
1525 // CHECK-NEXT:    "tokLen": 4
1526 // CHECK-NEXT:   },
1527 // CHECK-NEXT:   "end": {
1528 // CHECK-NEXT:    "offset": 1227,
1529 // CHECK-NEXT:    "col": 30,
1530 // CHECK-NEXT:    "tokLen": 1
1531 // CHECK-NEXT:   }
1532 // CHECK-NEXT:  },
1533 // CHECK-NEXT:  "name": "TestFunctionDeclNoProto",
1534 // CHECK-NEXT:  "mangledName": "TestFunctionDeclNoProto",
1535 // CHECK-NEXT:  "type": {
1536 // CHECK-NEXT:   "qualType": "void ()"
1537 // CHECK-NEXT:  }
1538 // CHECK-NEXT: }
1539 
1540 
1541 // CHECK:  "kind": "FunctionDecl",
1542 // CHECK-NEXT:  "loc": {
1543 // CHECK-NEXT:   "offset": 1241,
1544 // CHECK-NEXT:   "file": "{{.*}}",
1545 // CHECK-NEXT:   "line": 77,
1546 // CHECK-NEXT:   "col": 12,
1547 // CHECK-NEXT:   "tokLen": 18
1548 // CHECK-NEXT:  },
1549 // CHECK-NEXT:  "range": {
1550 // CHECK-NEXT:   "begin": {
1551 // CHECK-NEXT:    "offset": 1230,
1552 // CHECK-NEXT:    "col": 1,
1553 // CHECK-NEXT:    "tokLen": 6
1554 // CHECK-NEXT:   },
1555 // CHECK-NEXT:   "end": {
1556 // CHECK-NEXT:    "offset": 1260,
1557 // CHECK-NEXT:    "col": 31,
1558 // CHECK-NEXT:    "tokLen": 1
1559 // CHECK-NEXT:   }
1560 // CHECK-NEXT:  },
1561 // CHECK-NEXT:  "name": "TestFunctionDeclSC",
1562 // CHECK-NEXT:  "mangledName": "TestFunctionDeclSC",
1563 // CHECK-NEXT:  "type": {
1564 // CHECK-NEXT:   "qualType": "int ()"
1565 // CHECK-NEXT:  },
1566 // CHECK-NEXT:  "storageClass": "extern"
1567 // CHECK-NEXT: }
1568 
1569 
1570 // CHECK:  "kind": "FunctionDecl",
1571 // CHECK-NEXT:  "loc": {
1572 // CHECK-NEXT:   "offset": 1274,
1573 // CHECK-NEXT:   "file": "{{.*}}",
1574 // CHECK-NEXT:   "line": 78,
1575 // CHECK-NEXT:   "col": 12,
1576 // CHECK-NEXT:   "tokLen": 22
1577 // CHECK-NEXT:  },
1578 // CHECK-NEXT:  "range": {
1579 // CHECK-NEXT:   "begin": {
1580 // CHECK-NEXT:    "offset": 1263,
1581 // CHECK-NEXT:    "col": 1,
1582 // CHECK-NEXT:    "tokLen": 6
1583 // CHECK-NEXT:   },
1584 // CHECK-NEXT:   "end": {
1585 // CHECK-NEXT:    "offset": 1297,
1586 // CHECK-NEXT:    "col": 35,
1587 // CHECK-NEXT:    "tokLen": 1
1588 // CHECK-NEXT:   }
1589 // CHECK-NEXT:  },
1590 // CHECK-NEXT:  "name": "TestFunctionDeclInline",
1591 // CHECK-NEXT:  "mangledName": "TestFunctionDeclInline",
1592 // CHECK-NEXT:  "type": {
1593 // CHECK-NEXT:   "qualType": "int ()"
1594 // CHECK-NEXT:  },
1595 // CHECK-NEXT:  "inline": true
1596 // CHECK-NEXT: }
1597 
1598 
1599 // CHECK:  "kind": "FieldDecl",
1600 // CHECK-NEXT:  "loc": {
1601 // CHECK-NEXT:   "offset": 1330,
1602 // CHECK-NEXT:   "file": "{{.*}}",
1603 // CHECK-NEXT:   "line": 81,
1604 // CHECK-NEXT:   "col": 7,
1605 // CHECK-NEXT:   "tokLen": 13
1606 // CHECK-NEXT:  },
1607 // CHECK-NEXT:  "range": {
1608 // CHECK-NEXT:   "begin": {
1609 // CHECK-NEXT:    "offset": 1326,
1610 // CHECK-NEXT:    "col": 3,
1611 // CHECK-NEXT:    "tokLen": 3
1612 // CHECK-NEXT:   },
1613 // CHECK-NEXT:   "end": {
1614 // CHECK-NEXT:    "offset": 1330,
1615 // CHECK-NEXT:    "col": 7,
1616 // CHECK-NEXT:    "tokLen": 13
1617 // CHECK-NEXT:   }
1618 // CHECK-NEXT:  },
1619 // CHECK-NEXT:  "name": "TestFieldDecl",
1620 // CHECK-NEXT:  "type": {
1621 // CHECK-NEXT:   "qualType": "int"
1622 // CHECK-NEXT:  }
1623 // CHECK-NEXT: }
1624 
1625 
1626 // CHECK:  "kind": "FieldDecl",
1627 // CHECK-NEXT:  "loc": {
1628 // CHECK-NEXT:   "offset": 1351,
1629 // CHECK-NEXT:   "file": "{{.*}}",
1630 // CHECK-NEXT:   "line": 82,
1631 // CHECK-NEXT:   "col": 7,
1632 // CHECK-NEXT:   "tokLen": 18
1633 // CHECK-NEXT:  },
1634 // CHECK-NEXT:  "range": {
1635 // CHECK-NEXT:   "begin": {
1636 // CHECK-NEXT:    "offset": 1347,
1637 // CHECK-NEXT:    "col": 3,
1638 // CHECK-NEXT:    "tokLen": 3
1639 // CHECK-NEXT:   },
1640 // CHECK-NEXT:   "end": {
1641 // CHECK-NEXT:    "offset": 1372,
1642 // CHECK-NEXT:    "col": 28,
1643 // CHECK-NEXT:    "tokLen": 1
1644 // CHECK-NEXT:   }
1645 // CHECK-NEXT:  },
1646 // CHECK-NEXT:  "name": "TestFieldDeclWidth",
1647 // CHECK-NEXT:  "type": {
1648 // CHECK-NEXT:   "qualType": "int"
1649 // CHECK-NEXT:  },
1650 // CHECK-NEXT:  "isBitfield": true,
1651 // CHECK-NEXT:  "inner": [
1652 // CHECK-NEXT:   {
1653 // CHECK-NEXT:    "id": "0x{{.*}}",
1654 // CHECK-NEXT:    "kind": "ConstantExpr",
1655 // CHECK-NEXT:    "range": {
1656 // CHECK-NEXT:     "begin": {
1657 // CHECK-NEXT:      "offset": 1372,
1658 // CHECK-NEXT:      "col": 28,
1659 // CHECK-NEXT:      "tokLen": 1
1660 // CHECK-NEXT:     },
1661 // CHECK-NEXT:     "end": {
1662 // CHECK-NEXT:      "offset": 1372,
1663 // CHECK-NEXT:      "col": 28,
1664 // CHECK-NEXT:      "tokLen": 1
1665 // CHECK-NEXT:     }
1666 // CHECK-NEXT:    },
1667 // CHECK-NEXT:    "type": {
1668 // CHECK-NEXT:     "qualType": "int"
1669 // CHECK-NEXT:    },
1670 // CHECK-NEXT:    "valueCategory": "rvalue",
1671 // CHECK-NEXT:    "inner": [
1672 // CHECK-NEXT:     {
1673 // CHECK-NEXT:      "id": "0x{{.*}}",
1674 // CHECK-NEXT:      "kind": "IntegerLiteral",
1675 // CHECK-NEXT:      "range": {
1676 // CHECK-NEXT:       "begin": {
1677 // CHECK-NEXT:        "offset": 1372,
1678 // CHECK-NEXT:        "col": 28,
1679 // CHECK-NEXT:        "tokLen": 1
1680 // CHECK-NEXT:       },
1681 // CHECK-NEXT:       "end": {
1682 // CHECK-NEXT:        "offset": 1372,
1683 // CHECK-NEXT:        "col": 28,
1684 // CHECK-NEXT:        "tokLen": 1
1685 // CHECK-NEXT:       }
1686 // CHECK-NEXT:      },
1687 // CHECK-NEXT:      "type": {
1688 // CHECK-NEXT:       "qualType": "int"
1689 // CHECK-NEXT:      },
1690 // CHECK-NEXT:      "valueCategory": "rvalue",
1691 // CHECK-NEXT:      "value": "1"
1692 // CHECK-NEXT:     }
1693 // CHECK-NEXT:    ]
1694 // CHECK-NEXT:   }
1695 // CHECK-NEXT:  ]
1696 // CHECK-NEXT: }
1697 
1698 
1699 // CHECK:  "kind": "VarDecl",
1700 // CHECK-NEXT:  "loc": {
1701 // CHECK-NEXT:   "offset": 1383,
1702 // CHECK-NEXT:   "file": "{{.*}}",
1703 // CHECK-NEXT:   "line": 85,
1704 // CHECK-NEXT:   "col": 5,
1705 // CHECK-NEXT:   "tokLen": 11
1706 // CHECK-NEXT:  },
1707 // CHECK-NEXT:  "range": {
1708 // CHECK-NEXT:   "begin": {
1709 // CHECK-NEXT:    "offset": 1379,
1710 // CHECK-NEXT:    "col": 1,
1711 // CHECK-NEXT:    "tokLen": 3
1712 // CHECK-NEXT:   },
1713 // CHECK-NEXT:   "end": {
1714 // CHECK-NEXT:    "offset": 1383,
1715 // CHECK-NEXT:    "col": 5,
1716 // CHECK-NEXT:    "tokLen": 11
1717 // CHECK-NEXT:   }
1718 // CHECK-NEXT:  },
1719 // CHECK-NEXT:  "name": "TestVarDecl",
1720 // CHECK-NEXT:  "mangledName": "TestVarDecl",
1721 // CHECK-NEXT:  "type": {
1722 // CHECK-NEXT:   "qualType": "int"
1723 // CHECK-NEXT:  }
1724 // CHECK-NEXT: }
1725 
1726 
1727 // CHECK:  "kind": "VarDecl",
1728 // CHECK-NEXT:  "loc": {
1729 // CHECK-NEXT:   "offset": 1407,
1730 // CHECK-NEXT:   "file": "{{.*}}",
1731 // CHECK-NEXT:   "line": 86,
1732 // CHECK-NEXT:   "col": 12,
1733 // CHECK-NEXT:   "tokLen": 13
1734 // CHECK-NEXT:  },
1735 // CHECK-NEXT:  "range": {
1736 // CHECK-NEXT:   "begin": {
1737 // CHECK-NEXT:    "offset": 1396,
1738 // CHECK-NEXT:    "col": 1,
1739 // CHECK-NEXT:    "tokLen": 6
1740 // CHECK-NEXT:   },
1741 // CHECK-NEXT:   "end": {
1742 // CHECK-NEXT:    "offset": 1407,
1743 // CHECK-NEXT:    "col": 12,
1744 // CHECK-NEXT:    "tokLen": 13
1745 // CHECK-NEXT:   }
1746 // CHECK-NEXT:  },
1747 // CHECK-NEXT:  "name": "TestVarDeclSC",
1748 // CHECK-NEXT:  "mangledName": "TestVarDeclSC",
1749 // CHECK-NEXT:  "type": {
1750 // CHECK-NEXT:   "qualType": "int"
1751 // CHECK-NEXT:  },
1752 // CHECK-NEXT:  "storageClass": "extern"
1753 // CHECK-NEXT: }
1754 
1755 
1756 // CHECK:  "kind": "VarDecl",
1757 // CHECK-NEXT:  "loc": {
1758 // CHECK-NEXT:   "offset": 1435,
1759 // CHECK-NEXT:   "file": "{{.*}}",
1760 // CHECK-NEXT:   "line": 87,
1761 // CHECK-NEXT:   "col": 14,
1762 // CHECK-NEXT:   "tokLen": 17
1763 // CHECK-NEXT:  },
1764 // CHECK-NEXT:  "range": {
1765 // CHECK-NEXT:   "begin": {
1766 // CHECK-NEXT:    "offset": 1422,
1767 // CHECK-NEXT:    "col": 1,
1768 // CHECK-NEXT:    "tokLen": 8
1769 // CHECK-NEXT:   },
1770 // CHECK-NEXT:   "end": {
1771 // CHECK-NEXT:    "offset": 1435,
1772 // CHECK-NEXT:    "col": 14,
1773 // CHECK-NEXT:    "tokLen": 17
1774 // CHECK-NEXT:   }
1775 // CHECK-NEXT:  },
1776 // CHECK-NEXT:  "name": "TestVarDeclThread",
1777 // CHECK-NEXT:  "mangledName": "TestVarDeclThread",
1778 // CHECK-NEXT:  "type": {
1779 // CHECK-NEXT:   "qualType": "int"
1780 // CHECK-NEXT:  },
1781 // CHECK-NEXT:  "tls": "static"
1782 // CHECK-NEXT: }
1783 
1784 
1785 // CHECK:  "kind": "VarDecl",
1786 // CHECK-NEXT:  "loc": {
1787 // CHECK-NEXT:   "offset": 1458,
1788 // CHECK-NEXT:   "file": "{{.*}}",
1789 // CHECK-NEXT:   "line": 88,
1790 // CHECK-NEXT:   "col": 5,
1791 // CHECK-NEXT:   "tokLen": 15
1792 // CHECK-NEXT:  },
1793 // CHECK-NEXT:  "range": {
1794 // CHECK-NEXT:   "begin": {
1795 // CHECK-NEXT:    "offset": 1454,
1796 // CHECK-NEXT:    "col": 1,
1797 // CHECK-NEXT:    "tokLen": 3
1798 // CHECK-NEXT:   },
1799 // CHECK-NEXT:   "end": {
1800 // CHECK-NEXT:    "offset": 1476,
1801 // CHECK-NEXT:    "col": 23,
1802 // CHECK-NEXT:    "tokLen": 1
1803 // CHECK-NEXT:   }
1804 // CHECK-NEXT:  },
1805 // CHECK-NEXT:  "name": "TestVarDeclInit",
1806 // CHECK-NEXT:  "mangledName": "TestVarDeclInit",
1807 // CHECK-NEXT:  "type": {
1808 // CHECK-NEXT:   "qualType": "int"
1809 // CHECK-NEXT:  },
1810 // CHECK-NEXT:  "init": "c",
1811 // CHECK-NEXT:  "inner": [
1812 // CHECK-NEXT:   {
1813 // CHECK-NEXT:    "id": "0x{{.*}}",
1814 // CHECK-NEXT:    "kind": "IntegerLiteral",
1815 // CHECK-NEXT:    "range": {
1816 // CHECK-NEXT:     "begin": {
1817 // CHECK-NEXT:      "offset": 1476,
1818 // CHECK-NEXT:      "col": 23,
1819 // CHECK-NEXT:      "tokLen": 1
1820 // CHECK-NEXT:     },
1821 // CHECK-NEXT:     "end": {
1822 // CHECK-NEXT:      "offset": 1476,
1823 // CHECK-NEXT:      "col": 23,
1824 // CHECK-NEXT:      "tokLen": 1
1825 // CHECK-NEXT:     }
1826 // CHECK-NEXT:    },
1827 // CHECK-NEXT:    "type": {
1828 // CHECK-NEXT:     "qualType": "int"
1829 // CHECK-NEXT:    },
1830 // CHECK-NEXT:    "valueCategory": "rvalue",
1831 // CHECK-NEXT:    "value": "0"
1832 // CHECK-NEXT:   }
1833 // CHECK-NEXT:  ]
1834 // CHECK-NEXT: }
1835 
1836 
1837 // CHECK:  "kind": "ParmVarDecl",
1838 // CHECK-NEXT:  "loc": {
1839 // CHECK-NEXT:   "offset": 1505,
1840 // CHECK-NEXT:   "file": "{{.*}}",
1841 // CHECK-NEXT:   "line": 90,
1842 // CHECK-NEXT:   "col": 26,
1843 // CHECK-NEXT:   "tokLen": 15
1844 // CHECK-NEXT:  },
1845 // CHECK-NEXT:  "range": {
1846 // CHECK-NEXT:   "begin": {
1847 // CHECK-NEXT:    "offset": 1501,
1848 // CHECK-NEXT:    "col": 22,
1849 // CHECK-NEXT:    "tokLen": 3
1850 // CHECK-NEXT:   },
1851 // CHECK-NEXT:   "end": {
1852 // CHECK-NEXT:    "offset": 1505,
1853 // CHECK-NEXT:    "col": 26,
1854 // CHECK-NEXT:    "tokLen": 15
1855 // CHECK-NEXT:   }
1856 // CHECK-NEXT:  },
1857 // CHECK-NEXT:  "name": "TestParmVarDecl",
1858 // CHECK-NEXT:  "mangledName": "TestParmVarDecl",
1859 // CHECK-NEXT:  "type": {
1860 // CHECK-NEXT:   "qualType": "int"
1861 // CHECK-NEXT:  }
1862 // CHECK-NEXT: }
1863