[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / AST / ast-dump-stmt-json.m
blob096b9c3900d3656f384446cf57327ad126245d44
1 // RUN: %clang_cc1 -triple x86_64-pc-win32 -Wno-unused -fblocks -fobjc-exceptions -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
3 void TestBlockExpr(int x) {
4   ^{ x; };
7 void TestExprWithCleanup(int x) {
8   ^{ x; };
11 @interface A
12 @end
14 void TestObjCAtCatchStmt(void) {
15   @try {
16   } @catch(A *a) {
17   } @catch(...) {
18   } @finally {
19   }
22 // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
25 // CHECK-NOT: {{^}}Dumping
26 // CHECK:  "kind": "FunctionDecl",
27 // CHECK-NEXT:  "loc": {
28 // CHECK-NEXT:   "offset": {{[0-9]+}},
29 // CHECK-NEXT:   "file": "{{.*}}",
30 // CHECK-NEXT:   "line": 3,
31 // CHECK-NEXT:   "col": 6,
32 // CHECK-NEXT:   "tokLen": 13
33 // CHECK-NEXT:  },
34 // CHECK-NEXT:  "range": {
35 // CHECK-NEXT:   "begin": {
36 // CHECK-NEXT:    "offset": {{[0-9]+}},
37 // CHECK-NEXT:    "col": 1,
38 // CHECK-NEXT:    "tokLen": 4
39 // CHECK-NEXT:   },
40 // CHECK-NEXT:   "end": {
41 // CHECK-NEXT:    "offset": {{[0-9]+}},
42 // CHECK-NEXT:    "line": 5,
43 // CHECK-NEXT:    "col": 1,
44 // CHECK-NEXT:    "tokLen": 1
45 // CHECK-NEXT:   }
46 // CHECK-NEXT:  },
47 // CHECK-NEXT:  "name": "TestBlockExpr",
48 // CHECK-NEXT:  "mangledName": "TestBlockExpr",
49 // CHECK-NEXT:  "type": {
50 // CHECK-NEXT:   "qualType": "void (int)"
51 // CHECK-NEXT:  },
52 // CHECK-NEXT:  "inner": [
53 // CHECK-NEXT:   {
54 // CHECK-NEXT:    "id": "0x{{.*}}",
55 // CHECK-NEXT:    "kind": "ParmVarDecl",
56 // CHECK-NEXT:    "loc": {
57 // CHECK-NEXT:     "offset": {{[0-9]+}},
58 // CHECK-NEXT:     "line": 3,
59 // CHECK-NEXT:     "col": 24,
60 // CHECK-NEXT:     "tokLen": 1
61 // CHECK-NEXT:    },
62 // CHECK-NEXT:    "range": {
63 // CHECK-NEXT:     "begin": {
64 // CHECK-NEXT:      "offset": {{[0-9]+}},
65 // CHECK-NEXT:      "col": 20,
66 // CHECK-NEXT:      "tokLen": 3
67 // CHECK-NEXT:     },
68 // CHECK-NEXT:     "end": {
69 // CHECK-NEXT:      "offset": {{[0-9]+}},
70 // CHECK-NEXT:      "col": 24,
71 // CHECK-NEXT:      "tokLen": 1
72 // CHECK-NEXT:     }
73 // CHECK-NEXT:    },
74 // CHECK-NEXT:    "isUsed": true,
75 // CHECK-NEXT:    "name": "x",
76 // CHECK-NEXT:    "type": {
77 // CHECK-NEXT:     "qualType": "int"
78 // CHECK-NEXT:    }
79 // CHECK-NEXT:   },
80 // CHECK-NEXT:   {
81 // CHECK-NEXT:    "id": "0x{{.*}}",
82 // CHECK-NEXT:    "kind": "CompoundStmt",
83 // CHECK-NEXT:    "range": {
84 // CHECK-NEXT:     "begin": {
85 // CHECK-NEXT:      "offset": {{[0-9]+}},
86 // CHECK-NEXT:      "col": 27,
87 // CHECK-NEXT:      "tokLen": 1
88 // CHECK-NEXT:     },
89 // CHECK-NEXT:     "end": {
90 // CHECK-NEXT:      "offset": {{[0-9]+}},
91 // CHECK-NEXT:      "line": 5,
92 // CHECK-NEXT:      "col": 1,
93 // CHECK-NEXT:      "tokLen": 1
94 // CHECK-NEXT:     }
95 // CHECK-NEXT:    },
96 // CHECK-NEXT:    "inner": [
97 // CHECK-NEXT:     {
98 // CHECK-NEXT:      "id": "0x{{.*}}",
99 // CHECK-NEXT:      "kind": "ExprWithCleanups",
100 // CHECK-NEXT:      "range": {
101 // CHECK-NEXT:       "begin": {
102 // CHECK-NEXT:        "offset": {{[0-9]+}},
103 // CHECK-NEXT:        "line": 4,
104 // CHECK-NEXT:        "col": 3,
105 // CHECK-NEXT:        "tokLen": 1
106 // CHECK-NEXT:       },
107 // CHECK-NEXT:       "end": {
108 // CHECK-NEXT:        "offset": {{[0-9]+}},
109 // CHECK-NEXT:        "col": 9,
110 // CHECK-NEXT:        "tokLen": 1
111 // CHECK-NEXT:       }
112 // CHECK-NEXT:      },
113 // CHECK-NEXT:      "type": {
114 // CHECK-NEXT:       "qualType": "void (^)(void)"
115 // CHECK-NEXT:      },
116 // CHECK-NEXT:      "valueCategory": "prvalue",
117 // CHECK-NEXT:      "cleanupsHaveSideEffects": true,
118 // CHECK-NEXT:      "cleanups": [
119 // CHECK-NEXT:       {
120 // CHECK-NEXT:        "id": "0x{{.*}}",
121 // CHECK-NEXT:        "kind": "BlockDecl"
122 // CHECK-NEXT:       }
123 // CHECK-NEXT:      ],
124 // CHECK-NEXT:      "inner": [
125 // CHECK-NEXT:       {
126 // CHECK-NEXT:        "id": "0x{{.*}}",
127 // CHECK-NEXT:        "kind": "BlockExpr",
128 // CHECK-NEXT:        "range": {
129 // CHECK-NEXT:         "begin": {
130 // CHECK-NEXT:          "offset": {{[0-9]+}},
131 // CHECK-NEXT:          "col": 3,
132 // CHECK-NEXT:          "tokLen": 1
133 // CHECK-NEXT:         },
134 // CHECK-NEXT:         "end": {
135 // CHECK-NEXT:          "offset": {{[0-9]+}},
136 // CHECK-NEXT:          "col": 9,
137 // CHECK-NEXT:          "tokLen": 1
138 // CHECK-NEXT:         }
139 // CHECK-NEXT:        },
140 // CHECK-NEXT:        "type": {
141 // CHECK-NEXT:         "qualType": "void (^)(void)"
142 // CHECK-NEXT:        },
143 // CHECK-NEXT:        "valueCategory": "prvalue",
144 // CHECK-NEXT:        "inner": [
145 // CHECK-NEXT:         {
146 // CHECK-NEXT:          "id": "0x{{.*}}",
147 // CHECK-NEXT:          "kind": "BlockDecl",
148 // CHECK-NEXT:          "loc": {
149 // CHECK-NEXT:           "offset": {{[0-9]+}},
150 // CHECK-NEXT:           "col": 3,
151 // CHECK-NEXT:           "tokLen": 1
152 // CHECK-NEXT:          },
153 // CHECK-NEXT:          "range": {
154 // CHECK-NEXT:           "begin": {
155 // CHECK-NEXT:            "offset": {{[0-9]+}},
156 // CHECK-NEXT:            "col": 3,
157 // CHECK-NEXT:            "tokLen": 1
158 // CHECK-NEXT:           },
159 // CHECK-NEXT:           "end": {
160 // CHECK-NEXT:            "offset": {{[0-9]+}},
161 // CHECK-NEXT:            "col": 9,
162 // CHECK-NEXT:            "tokLen": 1
163 // CHECK-NEXT:           }
164 // CHECK-NEXT:          },
165 // CHECK-NEXT:          "inner": [
166 // CHECK-NEXT:           {
167 // CHECK-NEXT:            "kind": "Capture",
168 // CHECK-NEXT:            "var": {
169 // CHECK-NEXT:             "id": "0x{{.*}}",
170 // CHECK-NEXT:             "kind": "ParmVarDecl",
171 // CHECK-NEXT:             "name": "x",
172 // CHECK-NEXT:             "type": {
173 // CHECK-NEXT:              "qualType": "int"
174 // CHECK-NEXT:             }
175 // CHECK-NEXT:            }
176 // CHECK-NEXT:           },
177 // CHECK-NEXT:           {
178 // CHECK-NEXT:            "id": "0x{{.*}}",
179 // CHECK-NEXT:            "kind": "CompoundStmt",
180 // CHECK-NEXT:            "range": {
181 // CHECK-NEXT:             "begin": {
182 // CHECK-NEXT:              "offset": {{[0-9]+}},
183 // CHECK-NEXT:              "col": 4,
184 // CHECK-NEXT:              "tokLen": 1
185 // CHECK-NEXT:             },
186 // CHECK-NEXT:             "end": {
187 // CHECK-NEXT:              "offset": {{[0-9]+}},
188 // CHECK-NEXT:              "col": 9,
189 // CHECK-NEXT:              "tokLen": 1
190 // CHECK-NEXT:             }
191 // CHECK-NEXT:            },
192 // CHECK-NEXT:            "inner": [
193 // CHECK-NEXT:             {
194 // CHECK-NEXT:              "id": "0x{{.*}}",
195 // CHECK-NEXT:              "kind": "ImplicitCastExpr",
196 // CHECK-NEXT:              "range": {
197 // CHECK-NEXT:               "begin": {
198 // CHECK-NEXT:                "offset": {{[0-9]+}},
199 // CHECK-NEXT:                "col": 6,
200 // CHECK-NEXT:                "tokLen": 1
201 // CHECK-NEXT:               },
202 // CHECK-NEXT:               "end": {
203 // CHECK-NEXT:                "offset": {{[0-9]+}},
204 // CHECK-NEXT:                "col": 6,
205 // CHECK-NEXT:                "tokLen": 1
206 // CHECK-NEXT:               }
207 // CHECK-NEXT:              },
208 // CHECK-NEXT:              "type": {
209 // CHECK-NEXT:               "qualType": "int"
210 // CHECK-NEXT:              },
211 // CHECK-NEXT:              "valueCategory": "prvalue",
212 // CHECK-NEXT:              "castKind": "LValueToRValue",
213 // CHECK-NEXT:              "inner": [
214 // CHECK-NEXT:               {
215 // CHECK-NEXT:                "id": "0x{{.*}}",
216 // CHECK-NEXT:                "kind": "DeclRefExpr",
217 // CHECK-NEXT:                "range": {
218 // CHECK-NEXT:                 "begin": {
219 // CHECK-NEXT:                  "offset": {{[0-9]+}},
220 // CHECK-NEXT:                  "col": 6,
221 // CHECK-NEXT:                  "tokLen": 1
222 // CHECK-NEXT:                 },
223 // CHECK-NEXT:                 "end": {
224 // CHECK-NEXT:                  "offset": {{[0-9]+}},
225 // CHECK-NEXT:                  "col": 6,
226 // CHECK-NEXT:                  "tokLen": 1
227 // CHECK-NEXT:                 }
228 // CHECK-NEXT:                },
229 // CHECK-NEXT:                "type": {
230 // CHECK-NEXT:                 "qualType": "const int"
231 // CHECK-NEXT:                },
232 // CHECK-NEXT:                "valueCategory": "lvalue",
233 // CHECK-NEXT:                "referencedDecl": {
234 // CHECK-NEXT:                 "id": "0x{{.*}}",
235 // CHECK-NEXT:                 "kind": "ParmVarDecl",
236 // CHECK-NEXT:                 "name": "x",
237 // CHECK-NEXT:                 "type": {
238 // CHECK-NEXT:                  "qualType": "int"
239 // CHECK-NEXT:                 }
240 // CHECK-NEXT:                }
241 // CHECK-NEXT:               }
242 // CHECK-NEXT:              ]
243 // CHECK-NEXT:             }
244 // CHECK-NEXT:            ]
245 // CHECK-NEXT:           }
246 // CHECK-NEXT:          ]
247 // CHECK-NEXT:         }
248 // CHECK-NEXT:        ]
249 // CHECK-NEXT:       }
250 // CHECK-NEXT:      ]
251 // CHECK-NEXT:     }
252 // CHECK-NEXT:    ]
253 // CHECK-NEXT:   }
254 // CHECK-NEXT:  ]
255 // CHECK-NEXT: }
258 // CHECK-NOT: {{^}}Dumping
259 // CHECK:  "kind": "FunctionDecl",
260 // CHECK-NEXT:  "loc": {
261 // CHECK-NEXT:   "offset": {{[0-9]+}},
262 // CHECK-NEXT:   "file": "{{.*}}",
263 // CHECK-NEXT:   "line": 7,
264 // CHECK-NEXT:   "col": 6,
265 // CHECK-NEXT:   "tokLen": 19
266 // CHECK-NEXT:  },
267 // CHECK-NEXT:  "range": {
268 // CHECK-NEXT:   "begin": {
269 // CHECK-NEXT:    "offset": {{[0-9]+}},
270 // CHECK-NEXT:    "col": 1,
271 // CHECK-NEXT:    "tokLen": 4
272 // CHECK-NEXT:   },
273 // CHECK-NEXT:   "end": {
274 // CHECK-NEXT:    "offset": {{[0-9]+}},
275 // CHECK-NEXT:    "line": 9,
276 // CHECK-NEXT:    "col": 1,
277 // CHECK-NEXT:    "tokLen": 1
278 // CHECK-NEXT:   }
279 // CHECK-NEXT:  },
280 // CHECK-NEXT:  "name": "TestExprWithCleanup",
281 // CHECK-NEXT:  "mangledName": "TestExprWithCleanup",
282 // CHECK-NEXT:  "type": {
283 // CHECK-NEXT:   "qualType": "void (int)"
284 // CHECK-NEXT:  },
285 // CHECK-NEXT:  "inner": [
286 // CHECK-NEXT:   {
287 // CHECK-NEXT:    "id": "0x{{.*}}",
288 // CHECK-NEXT:    "kind": "ParmVarDecl",
289 // CHECK-NEXT:    "loc": {
290 // CHECK-NEXT:     "offset": {{[0-9]+}},
291 // CHECK-NEXT:     "line": 7,
292 // CHECK-NEXT:     "col": 30,
293 // CHECK-NEXT:     "tokLen": 1
294 // CHECK-NEXT:    },
295 // CHECK-NEXT:    "range": {
296 // CHECK-NEXT:     "begin": {
297 // CHECK-NEXT:      "offset": {{[0-9]+}},
298 // CHECK-NEXT:      "col": 26,
299 // CHECK-NEXT:      "tokLen": 3
300 // CHECK-NEXT:     },
301 // CHECK-NEXT:     "end": {
302 // CHECK-NEXT:      "offset": {{[0-9]+}},
303 // CHECK-NEXT:      "col": 30,
304 // CHECK-NEXT:      "tokLen": 1
305 // CHECK-NEXT:     }
306 // CHECK-NEXT:    },
307 // CHECK-NEXT:    "isUsed": true,
308 // CHECK-NEXT:    "name": "x",
309 // CHECK-NEXT:    "type": {
310 // CHECK-NEXT:     "qualType": "int"
311 // CHECK-NEXT:    }
312 // CHECK-NEXT:   },
313 // CHECK-NEXT:   {
314 // CHECK-NEXT:    "id": "0x{{.*}}",
315 // CHECK-NEXT:    "kind": "CompoundStmt",
316 // CHECK-NEXT:    "range": {
317 // CHECK-NEXT:     "begin": {
318 // CHECK-NEXT:      "offset": {{[0-9]+}},
319 // CHECK-NEXT:      "col": 33,
320 // CHECK-NEXT:      "tokLen": 1
321 // CHECK-NEXT:     },
322 // CHECK-NEXT:     "end": {
323 // CHECK-NEXT:      "offset": {{[0-9]+}},
324 // CHECK-NEXT:      "line": 9,
325 // CHECK-NEXT:      "col": 1,
326 // CHECK-NEXT:      "tokLen": 1
327 // CHECK-NEXT:     }
328 // CHECK-NEXT:    },
329 // CHECK-NEXT:    "inner": [
330 // CHECK-NEXT:     {
331 // CHECK-NEXT:      "id": "0x{{.*}}",
332 // CHECK-NEXT:      "kind": "ExprWithCleanups",
333 // CHECK-NEXT:      "range": {
334 // CHECK-NEXT:       "begin": {
335 // CHECK-NEXT:        "offset": {{[0-9]+}},
336 // CHECK-NEXT:        "line": 8,
337 // CHECK-NEXT:        "col": 3,
338 // CHECK-NEXT:        "tokLen": 1
339 // CHECK-NEXT:       },
340 // CHECK-NEXT:       "end": {
341 // CHECK-NEXT:        "offset": {{[0-9]+}},
342 // CHECK-NEXT:        "col": 9,
343 // CHECK-NEXT:        "tokLen": 1
344 // CHECK-NEXT:       }
345 // CHECK-NEXT:      },
346 // CHECK-NEXT:      "type": {
347 // CHECK-NEXT:       "qualType": "void (^)(void)"
348 // CHECK-NEXT:      },
349 // CHECK-NEXT:      "valueCategory": "prvalue",
350 // CHECK-NEXT:      "cleanupsHaveSideEffects": true,
351 // CHECK-NEXT:      "cleanups": [
352 // CHECK-NEXT:       {
353 // CHECK-NEXT:        "id": "0x{{.*}}",
354 // CHECK-NEXT:        "kind": "BlockDecl"
355 // CHECK-NEXT:       }
356 // CHECK-NEXT:      ],
357 // CHECK-NEXT:      "inner": [
358 // CHECK-NEXT:       {
359 // CHECK-NEXT:        "id": "0x{{.*}}",
360 // CHECK-NEXT:        "kind": "BlockExpr",
361 // CHECK-NEXT:        "range": {
362 // CHECK-NEXT:         "begin": {
363 // CHECK-NEXT:          "offset": {{[0-9]+}},
364 // CHECK-NEXT:          "col": 3,
365 // CHECK-NEXT:          "tokLen": 1
366 // CHECK-NEXT:         },
367 // CHECK-NEXT:         "end": {
368 // CHECK-NEXT:          "offset": {{[0-9]+}},
369 // CHECK-NEXT:          "col": 9,
370 // CHECK-NEXT:          "tokLen": 1
371 // CHECK-NEXT:         }
372 // CHECK-NEXT:        },
373 // CHECK-NEXT:        "type": {
374 // CHECK-NEXT:         "qualType": "void (^)(void)"
375 // CHECK-NEXT:        },
376 // CHECK-NEXT:        "valueCategory": "prvalue",
377 // CHECK-NEXT:        "inner": [
378 // CHECK-NEXT:         {
379 // CHECK-NEXT:          "id": "0x{{.*}}",
380 // CHECK-NEXT:          "kind": "BlockDecl",
381 // CHECK-NEXT:          "loc": {
382 // CHECK-NEXT:           "offset": {{[0-9]+}},
383 // CHECK-NEXT:           "col": 3,
384 // CHECK-NEXT:           "tokLen": 1
385 // CHECK-NEXT:          },
386 // CHECK-NEXT:          "range": {
387 // CHECK-NEXT:           "begin": {
388 // CHECK-NEXT:            "offset": {{[0-9]+}},
389 // CHECK-NEXT:            "col": 3,
390 // CHECK-NEXT:            "tokLen": 1
391 // CHECK-NEXT:           },
392 // CHECK-NEXT:           "end": {
393 // CHECK-NEXT:            "offset": {{[0-9]+}},
394 // CHECK-NEXT:            "col": 9,
395 // CHECK-NEXT:            "tokLen": 1
396 // CHECK-NEXT:           }
397 // CHECK-NEXT:          },
398 // CHECK-NEXT:          "inner": [
399 // CHECK-NEXT:           {
400 // CHECK-NEXT:            "kind": "Capture",
401 // CHECK-NEXT:            "var": {
402 // CHECK-NEXT:             "id": "0x{{.*}}",
403 // CHECK-NEXT:             "kind": "ParmVarDecl",
404 // CHECK-NEXT:             "name": "x",
405 // CHECK-NEXT:             "type": {
406 // CHECK-NEXT:              "qualType": "int"
407 // CHECK-NEXT:             }
408 // CHECK-NEXT:            }
409 // CHECK-NEXT:           },
410 // CHECK-NEXT:           {
411 // CHECK-NEXT:            "id": "0x{{.*}}",
412 // CHECK-NEXT:            "kind": "CompoundStmt",
413 // CHECK-NEXT:            "range": {
414 // CHECK-NEXT:             "begin": {
415 // CHECK-NEXT:              "offset": {{[0-9]+}},
416 // CHECK-NEXT:              "col": 4,
417 // CHECK-NEXT:              "tokLen": 1
418 // CHECK-NEXT:             },
419 // CHECK-NEXT:             "end": {
420 // CHECK-NEXT:              "offset": {{[0-9]+}},
421 // CHECK-NEXT:              "col": 9,
422 // CHECK-NEXT:              "tokLen": 1
423 // CHECK-NEXT:             }
424 // CHECK-NEXT:            },
425 // CHECK-NEXT:            "inner": [
426 // CHECK-NEXT:             {
427 // CHECK-NEXT:              "id": "0x{{.*}}",
428 // CHECK-NEXT:              "kind": "ImplicitCastExpr",
429 // CHECK-NEXT:              "range": {
430 // CHECK-NEXT:               "begin": {
431 // CHECK-NEXT:                "offset": {{[0-9]+}},
432 // CHECK-NEXT:                "col": 6,
433 // CHECK-NEXT:                "tokLen": 1
434 // CHECK-NEXT:               },
435 // CHECK-NEXT:               "end": {
436 // CHECK-NEXT:                "offset": {{[0-9]+}},
437 // CHECK-NEXT:                "col": 6,
438 // CHECK-NEXT:                "tokLen": 1
439 // CHECK-NEXT:               }
440 // CHECK-NEXT:              },
441 // CHECK-NEXT:              "type": {
442 // CHECK-NEXT:               "qualType": "int"
443 // CHECK-NEXT:              },
444 // CHECK-NEXT:              "valueCategory": "prvalue",
445 // CHECK-NEXT:              "castKind": "LValueToRValue",
446 // CHECK-NEXT:              "inner": [
447 // CHECK-NEXT:               {
448 // CHECK-NEXT:                "id": "0x{{.*}}",
449 // CHECK-NEXT:                "kind": "DeclRefExpr",
450 // CHECK-NEXT:                "range": {
451 // CHECK-NEXT:                 "begin": {
452 // CHECK-NEXT:                  "offset": {{[0-9]+}},
453 // CHECK-NEXT:                  "col": 6,
454 // CHECK-NEXT:                  "tokLen": 1
455 // CHECK-NEXT:                 },
456 // CHECK-NEXT:                 "end": {
457 // CHECK-NEXT:                  "offset": {{[0-9]+}},
458 // CHECK-NEXT:                  "col": 6,
459 // CHECK-NEXT:                  "tokLen": 1
460 // CHECK-NEXT:                 }
461 // CHECK-NEXT:                },
462 // CHECK-NEXT:                "type": {
463 // CHECK-NEXT:                 "qualType": "const int"
464 // CHECK-NEXT:                },
465 // CHECK-NEXT:                "valueCategory": "lvalue",
466 // CHECK-NEXT:                "referencedDecl": {
467 // CHECK-NEXT:                 "id": "0x{{.*}}",
468 // CHECK-NEXT:                 "kind": "ParmVarDecl",
469 // CHECK-NEXT:                 "name": "x",
470 // CHECK-NEXT:                 "type": {
471 // CHECK-NEXT:                  "qualType": "int"
472 // CHECK-NEXT:                 }
473 // CHECK-NEXT:                }
474 // CHECK-NEXT:               }
475 // CHECK-NEXT:              ]
476 // CHECK-NEXT:             }
477 // CHECK-NEXT:            ]
478 // CHECK-NEXT:           }
479 // CHECK-NEXT:          ]
480 // CHECK-NEXT:         }
481 // CHECK-NEXT:        ]
482 // CHECK-NEXT:       }
483 // CHECK-NEXT:      ]
484 // CHECK-NEXT:     }
485 // CHECK-NEXT:    ]
486 // CHECK-NEXT:   }
487 // CHECK-NEXT:  ]
488 // CHECK-NEXT: }
491 // CHECK-NOT: {{^}}Dumping
492 // CHECK:  "kind": "FunctionDecl",
493 // CHECK-NEXT:  "loc": {
494 // CHECK-NEXT:   "offset": {{[0-9]+}},
495 // CHECK-NEXT:   "file": "{{.*}}",
496 // CHECK-NEXT:   "line": 14,
497 // CHECK-NEXT:   "col": 6,
498 // CHECK-NEXT:   "tokLen": 19
499 // CHECK-NEXT:  },
500 // CHECK-NEXT:  "range": {
501 // CHECK-NEXT:   "begin": {
502 // CHECK-NEXT:    "offset": {{[0-9]+}},
503 // CHECK-NEXT:    "col": 1,
504 // CHECK-NEXT:    "tokLen": 4
505 // CHECK-NEXT:   },
506 // CHECK-NEXT:   "end": {
507 // CHECK-NEXT:    "offset": {{[0-9]+}},
508 // CHECK-NEXT:    "line": 20,
509 // CHECK-NEXT:    "col": 1,
510 // CHECK-NEXT:    "tokLen": 1
511 // CHECK-NEXT:   }
512 // CHECK-NEXT:  },
513 // CHECK-NEXT:  "name": "TestObjCAtCatchStmt",
514 // CHECK-NEXT:  "mangledName": "TestObjCAtCatchStmt",
515 // CHECK-NEXT:  "type": {
516 // CHECK-NEXT:   "qualType": "void (void)"
517 // CHECK-NEXT:  },
518 // CHECK-NEXT:  "inner": [
519 // CHECK-NEXT:   {
520 // CHECK-NEXT:    "id": "0x{{.*}}",
521 // CHECK-NEXT:    "kind": "CompoundStmt",
522 // CHECK-NEXT:    "range": {
523 // CHECK-NEXT:     "begin": {
524 // CHECK-NEXT:      "offset": {{[0-9]+}},
525 // CHECK-NEXT:      "line": 14,
526 // CHECK-NEXT:      "col": 32,
527 // CHECK-NEXT:      "tokLen": 1
528 // CHECK-NEXT:     },
529 // CHECK-NEXT:     "end": {
530 // CHECK-NEXT:      "offset": {{[0-9]+}},
531 // CHECK-NEXT:      "line": 20,
532 // CHECK-NEXT:      "col": 1,
533 // CHECK-NEXT:      "tokLen": 1
534 // CHECK-NEXT:     }
535 // CHECK-NEXT:    },
536 // CHECK-NEXT:    "inner": [
537 // CHECK-NEXT:     {
538 // CHECK-NEXT:      "id": "0x{{.*}}",
539 // CHECK-NEXT:      "kind": "ObjCAtTryStmt",
540 // CHECK-NEXT:      "range": {
541 // CHECK-NEXT:       "begin": {
542 // CHECK-NEXT:        "offset": {{[0-9]+}},
543 // CHECK-NEXT:        "line": 15,
544 // CHECK-NEXT:        "col": 3,
545 // CHECK-NEXT:        "tokLen": 1
546 // CHECK-NEXT:       },
547 // CHECK-NEXT:       "end": {
548 // CHECK-NEXT:        "offset": {{[0-9]+}},
549 // CHECK-NEXT:        "line": 19,
550 // CHECK-NEXT:        "col": 3,
551 // CHECK-NEXT:        "tokLen": 1
552 // CHECK-NEXT:       }
553 // CHECK-NEXT:      },
554 // CHECK-NEXT:      "inner": [
555 // CHECK-NEXT:       {
556 // CHECK-NEXT:        "id": "0x{{.*}}",
557 // CHECK-NEXT:        "kind": "CompoundStmt",
558 // CHECK-NEXT:        "range": {
559 // CHECK-NEXT:         "begin": {
560 // CHECK-NEXT:          "offset": {{[0-9]+}},
561 // CHECK-NEXT:          "line": 15,
562 // CHECK-NEXT:          "col": 8,
563 // CHECK-NEXT:          "tokLen": 1
564 // CHECK-NEXT:         },
565 // CHECK-NEXT:         "end": {
566 // CHECK-NEXT:          "offset": {{[0-9]+}},
567 // CHECK-NEXT:          "line": 16,
568 // CHECK-NEXT:          "col": 3,
569 // CHECK-NEXT:          "tokLen": 1
570 // CHECK-NEXT:         }
571 // CHECK-NEXT:        }
572 // CHECK-NEXT:       },
573 // CHECK-NEXT:       {
574 // CHECK-NEXT:        "id": "0x{{.*}}",
575 // CHECK-NEXT:        "kind": "ObjCAtCatchStmt",
576 // CHECK-NEXT:        "range": {
577 // CHECK-NEXT:         "begin": {
578 // CHECK-NEXT:          "offset": {{[0-9]+}},
579 // CHECK-NEXT:          "col": 5,
580 // CHECK-NEXT:          "tokLen": 1
581 // CHECK-NEXT:         },
582 // CHECK-NEXT:         "end": {
583 // CHECK-NEXT:          "offset": {{[0-9]+}},
584 // CHECK-NEXT:          "line": 17,
585 // CHECK-NEXT:          "col": 3,
586 // CHECK-NEXT:          "tokLen": 1
587 // CHECK-NEXT:         }
588 // CHECK-NEXT:        },
589 // CHECK-NEXT:        "inner": [
590 // CHECK-NEXT:         {
591 // CHECK-NEXT:          "id": "0x{{.*}}",
592 // CHECK-NEXT:          "kind": "VarDecl",
593 // CHECK-NEXT:          "loc": {
594 // CHECK-NEXT:           "offset": {{[0-9]+}},
595 // CHECK-NEXT:           "line": 16,
596 // CHECK-NEXT:           "col": 15,
597 // CHECK-NEXT:           "tokLen": 1
598 // CHECK-NEXT:          },
599 // CHECK-NEXT:          "range": {
600 // CHECK-NEXT:           "begin": {
601 // CHECK-NEXT:            "offset": {{[0-9]+}},
602 // CHECK-NEXT:            "col": 12,
603 // CHECK-NEXT:            "tokLen": 1
604 // CHECK-NEXT:           },
605 // CHECK-NEXT:           "end": {
606 // CHECK-NEXT:            "offset": {{[0-9]+}},
607 // CHECK-NEXT:            "col": 15,
608 // CHECK-NEXT:            "tokLen": 1
609 // CHECK-NEXT:           }
610 // CHECK-NEXT:          },
611 // CHECK-NEXT:          "name": "a",
612 // CHECK-NEXT:          "type": {
613 // CHECK-NEXT:           "qualType": "A *"
614 // CHECK-NEXT:          }
615 // CHECK-NEXT:         },
616 // CHECK-NEXT:         {
617 // CHECK-NEXT:          "id": "0x{{.*}}",
618 // CHECK-NEXT:          "kind": "CompoundStmt",
619 // CHECK-NEXT:          "range": {
620 // CHECK-NEXT:           "begin": {
621 // CHECK-NEXT:            "offset": {{[0-9]+}},
622 // CHECK-NEXT:            "col": 18,
623 // CHECK-NEXT:            "tokLen": 1
624 // CHECK-NEXT:           },
625 // CHECK-NEXT:           "end": {
626 // CHECK-NEXT:            "offset": {{[0-9]+}},
627 // CHECK-NEXT:            "line": 17,
628 // CHECK-NEXT:            "col": 3,
629 // CHECK-NEXT:            "tokLen": 1
630 // CHECK-NEXT:           }
631 // CHECK-NEXT:          }
632 // CHECK-NEXT:         }
633 // CHECK-NEXT:        ]
634 // CHECK-NEXT:       },
635 // CHECK-NEXT:       {
636 // CHECK-NEXT:        "id": "0x{{.*}}",
637 // CHECK-NEXT:        "kind": "ObjCAtCatchStmt",
638 // CHECK-NEXT:        "range": {
639 // CHECK-NEXT:         "begin": {
640 // CHECK-NEXT:          "offset": {{[0-9]+}},
641 // CHECK-NEXT:          "col": 5,
642 // CHECK-NEXT:          "tokLen": 1
643 // CHECK-NEXT:         },
644 // CHECK-NEXT:         "end": {
645 // CHECK-NEXT:          "offset": {{[0-9]+}},
646 // CHECK-NEXT:          "line": 18,
647 // CHECK-NEXT:          "col": 3,
648 // CHECK-NEXT:          "tokLen": 1
649 // CHECK-NEXT:         }
650 // CHECK-NEXT:        },
651 // CHECK-NEXT:        "isCatchAll": true,
652 // CHECK-NEXT:        "inner": [
653 // CHECK-NEXT:         {
654 // CHECK-NEXT:          "id": "0x{{.*}}",
655 // CHECK-NEXT:          "kind": "CompoundStmt",
656 // CHECK-NEXT:          "range": {
657 // CHECK-NEXT:           "begin": {
658 // CHECK-NEXT:            "offset": {{[0-9]+}},
659 // CHECK-NEXT:            "line": 17,
660 // CHECK-NEXT:            "col": 17,
661 // CHECK-NEXT:            "tokLen": 1
662 // CHECK-NEXT:           },
663 // CHECK-NEXT:           "end": {
664 // CHECK-NEXT:            "offset": {{[0-9]+}},
665 // CHECK-NEXT:            "line": 18,
666 // CHECK-NEXT:            "col": 3,
667 // CHECK-NEXT:            "tokLen": 1
668 // CHECK-NEXT:           }
669 // CHECK-NEXT:          }
670 // CHECK-NEXT:         }
671 // CHECK-NEXT:        ]
672 // CHECK-NEXT:       },
673 // CHECK-NEXT:       {
674 // CHECK-NEXT:        "id": "0x{{.*}}",
675 // CHECK-NEXT:        "kind": "ObjCAtFinallyStmt",
676 // CHECK-NEXT:        "range": {
677 // CHECK-NEXT:         "begin": {
678 // CHECK-NEXT:          "offset": {{[0-9]+}},
679 // CHECK-NEXT:          "col": 5,
680 // CHECK-NEXT:          "tokLen": 1
681 // CHECK-NEXT:         },
682 // CHECK-NEXT:         "end": {
683 // CHECK-NEXT:          "offset": {{[0-9]+}},
684 // CHECK-NEXT:          "line": 19,
685 // CHECK-NEXT:          "col": 3,
686 // CHECK-NEXT:          "tokLen": 1
687 // CHECK-NEXT:         }
688 // CHECK-NEXT:        },
689 // CHECK-NEXT:        "inner": [
690 // CHECK-NEXT:         {
691 // CHECK-NEXT:          "id": "0x{{.*}}",
692 // CHECK-NEXT:          "kind": "CapturedStmt",
693 // CHECK-NEXT:          "range": {
694 // CHECK-NEXT:           "begin": {
695 // CHECK-NEXT:            "offset": {{[0-9]+}},
696 // CHECK-NEXT:            "line": 18,
697 // CHECK-NEXT:            "col": 14,
698 // CHECK-NEXT:            "tokLen": 1
699 // CHECK-NEXT:           },
700 // CHECK-NEXT:           "end": {
701 // CHECK-NEXT:            "offset": {{[0-9]+}},
702 // CHECK-NEXT:            "line": 19,
703 // CHECK-NEXT:            "col": 3,
704 // CHECK-NEXT:            "tokLen": 1
705 // CHECK-NEXT:           }
706 // CHECK-NEXT:          },
707 // CHECK-NEXT:          "inner": [
708 // CHECK-NEXT:           {
709 // CHECK-NEXT:            "id": "0x{{.*}}",
710 // CHECK-NEXT:            "kind": "CapturedDecl",
711 // CHECK-NEXT:            "loc": {},
712 // CHECK-NEXT:            "range": {
713 // CHECK-NEXT:             "begin": {},
714 // CHECK-NEXT:             "end": {}
715 // CHECK-NEXT:            },
716 // CHECK-NEXT:            "inner": [
717 // CHECK-NEXT:             {
718 // CHECK-NEXT:              "id": "0x{{.*}}",
719 // CHECK-NEXT:              "kind": "CompoundStmt",
720 // CHECK-NEXT:              "range": {
721 // CHECK-NEXT:               "begin": {
722 // CHECK-NEXT:                "offset": {{[0-9]+}},
723 // CHECK-NEXT:                "line": 18,
724 // CHECK-NEXT:                "col": 14,
725 // CHECK-NEXT:                "tokLen": 1
726 // CHECK-NEXT:               },
727 // CHECK-NEXT:               "end": {
728 // CHECK-NEXT:                "offset": {{[0-9]+}},
729 // CHECK-NEXT:                "line": 19,
730 // CHECK-NEXT:                "col": 3,
731 // CHECK-NEXT:                "tokLen": 1
732 // CHECK-NEXT:               }
733 // CHECK-NEXT:              }
734 // CHECK-NEXT:             },
735 // CHECK-NEXT:             {
736 // CHECK-NEXT:              "id": "0x{{.*}}",
737 // CHECK-NEXT:              "kind": "ImplicitParamDecl",
738 // CHECK-NEXT:              "loc": {
739 // CHECK-NEXT:               "offset": {{[0-9]+}},
740 // CHECK-NEXT:               "line": 18,
741 // CHECK-NEXT:               "col": 14,
742 // CHECK-NEXT:               "tokLen": 1
743 // CHECK-NEXT:              },
744 // CHECK-NEXT:              "range": {
745 // CHECK-NEXT:               "begin": {
746 // CHECK-NEXT:                "offset": {{[0-9]+}},
747 // CHECK-NEXT:                "col": 14,
748 // CHECK-NEXT:                "tokLen": 1
749 // CHECK-NEXT:               },
750 // CHECK-NEXT:               "end": {
751 // CHECK-NEXT:                "offset": {{[0-9]+}},
752 // CHECK-NEXT:                "col": 14,
753 // CHECK-NEXT:                "tokLen": 1
754 // CHECK-NEXT:               }
755 // CHECK-NEXT:              },
756 // CHECK-NEXT:              "isImplicit": true,
757 // CHECK-NEXT:              "name": "__context",
758 // CHECK-NEXT:              "type": {
759 // CHECK-NEXT:               "qualType": "struct (unnamed at {{.*}}:18:14) *"
760 // CHECK-NEXT:              }
761 // CHECK-NEXT:             }
762 // CHECK-NEXT:            ]
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 // CHECK-NEXT:  ]
773 // CHECK-NEXT: }