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