1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump=json %s | FileCheck %s
13 // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
16 // CHECK-NOT: {{^}}Dumping
17 // CHECK: "kind": "TranslationUnitDecl",
18 // CHECK-NEXT: "loc": {},
19 // CHECK-NEXT: "range": {
20 // CHECK-NEXT: "begin": {},
21 // CHECK-NEXT: "end": {}
23 // CHECK-NEXT: "inner": [
25 // CHECK-NEXT: "id": "0x{{.*}}",
26 // CHECK-NEXT: "kind": "TypedefDecl",
27 // CHECK-NEXT: "loc": {},
28 // CHECK-NEXT: "range": {
29 // CHECK-NEXT: "begin": {},
30 // CHECK-NEXT: "end": {}
32 // CHECK-NEXT: "isImplicit": true,
33 // CHECK-NEXT: "name": "__int128_t",
34 // CHECK-NEXT: "type": {
35 // CHECK-NEXT: "qualType": "__int128"
37 // CHECK-NEXT: "inner": [
39 // CHECK-NEXT: "id": "0x{{.*}}",
40 // CHECK-NEXT: "kind": "BuiltinType",
41 // CHECK-NEXT: "type": {
42 // CHECK-NEXT: "qualType": "__int128"
48 // CHECK-NEXT: "id": "0x{{.*}}",
49 // CHECK-NEXT: "kind": "TypedefDecl",
50 // CHECK-NEXT: "loc": {},
51 // CHECK-NEXT: "range": {
52 // CHECK-NEXT: "begin": {},
53 // CHECK-NEXT: "end": {}
55 // CHECK-NEXT: "isImplicit": true,
56 // CHECK-NEXT: "name": "__uint128_t",
57 // CHECK-NEXT: "type": {
58 // CHECK-NEXT: "qualType": "unsigned __int128"
60 // CHECK-NEXT: "inner": [
62 // CHECK-NEXT: "id": "0x{{.*}}",
63 // CHECK-NEXT: "kind": "BuiltinType",
64 // CHECK-NEXT: "type": {
65 // CHECK-NEXT: "qualType": "unsigned __int128"
71 // CHECK-NEXT: "id": "0x{{.*}}",
72 // CHECK-NEXT: "kind": "TypedefDecl",
73 // CHECK-NEXT: "loc": {},
74 // CHECK-NEXT: "range": {
75 // CHECK-NEXT: "begin": {},
76 // CHECK-NEXT: "end": {}
78 // CHECK-NEXT: "isImplicit": true,
79 // CHECK-NEXT: "name": "__NSConstantString",
80 // CHECK-NEXT: "type": {
81 // CHECK-NEXT: "qualType": "struct __NSConstantString_tag"
83 // CHECK-NEXT: "inner": [
85 // CHECK-NEXT: "id": "0x{{.*}}",
86 // CHECK-NEXT: "kind": "RecordType",
87 // CHECK-NEXT: "type": {
88 // CHECK-NEXT: "qualType": "struct __NSConstantString_tag"
90 // CHECK-NEXT: "decl": {
91 // CHECK-NEXT: "id": "0x{{.*}}",
92 // CHECK-NEXT: "kind": "RecordDecl",
93 // CHECK-NEXT: "name": "__NSConstantString_tag"
99 // CHECK-NEXT: "id": "0x{{.*}}",
100 // CHECK-NEXT: "kind": "TypedefDecl",
101 // CHECK-NEXT: "loc": {},
102 // CHECK-NEXT: "range": {
103 // CHECK-NEXT: "begin": {},
104 // CHECK-NEXT: "end": {}
106 // CHECK-NEXT: "isImplicit": true,
107 // CHECK-NEXT: "name": "__builtin_ms_va_list",
108 // CHECK-NEXT: "type": {
109 // CHECK-NEXT: "qualType": "char *"
111 // CHECK-NEXT: "inner": [
113 // CHECK-NEXT: "id": "0x{{.*}}",
114 // CHECK-NEXT: "kind": "PointerType",
115 // CHECK-NEXT: "type": {
116 // CHECK-NEXT: "qualType": "char *"
118 // CHECK-NEXT: "inner": [
120 // CHECK-NEXT: "id": "0x{{.*}}",
121 // CHECK-NEXT: "kind": "BuiltinType",
122 // CHECK-NEXT: "type": {
123 // CHECK-NEXT: "qualType": "char"
131 // CHECK-NEXT: "id": "0x{{.*}}",
132 // CHECK-NEXT: "kind": "TypedefDecl",
133 // CHECK-NEXT: "loc": {},
134 // CHECK-NEXT: "range": {
135 // CHECK-NEXT: "begin": {},
136 // CHECK-NEXT: "end": {}
138 // CHECK-NEXT: "isImplicit": true,
139 // CHECK-NEXT: "name": "__builtin_va_list",
140 // CHECK-NEXT: "type": {
141 // CHECK-NEXT: "qualType": "struct __va_list_tag[1]"
143 // CHECK-NEXT: "inner": [
145 // CHECK-NEXT: "id": "0x{{.*}}",
146 // CHECK-NEXT: "kind": "ConstantArrayType",
147 // CHECK-NEXT: "type": {
148 // CHECK-NEXT: "qualType": "struct __va_list_tag[1]"
150 // CHECK-NEXT: "size": 1,
151 // CHECK-NEXT: "inner": [
153 // CHECK-NEXT: "id": "0x{{.*}}",
154 // CHECK-NEXT: "kind": "RecordType",
155 // CHECK-NEXT: "type": {
156 // CHECK-NEXT: "qualType": "struct __va_list_tag"
158 // CHECK-NEXT: "decl": {
159 // CHECK-NEXT: "id": "0x{{.*}}",
160 // CHECK-NEXT: "kind": "RecordDecl",
161 // CHECK-NEXT: "name": "__va_list_tag"
169 // CHECK-NEXT: "id": "0x{{.*}}",
170 // CHECK-NEXT: "kind": "VarDecl",
171 // CHECK-NEXT: "loc": {
172 // CHECK-NEXT: "offset": {{[0-9]+}},
173 // CHECK-NEXT: "file": "{{.*}}",
174 // CHECK-NEXT: "line": 4,
175 // CHECK-NEXT: "presumedFile": "{{.*}}",
176 // CHECK-NEXT: "col": 5,
177 // CHECK-NEXT: "tokLen": 1
179 // CHECK-NEXT: "range": {
180 // CHECK-NEXT: "begin": {
181 // CHECK-NEXT: "offset": {{[0-9]+}},
182 // CHECK-NEXT: "col": 1,
183 // CHECK-NEXT: "tokLen": 3
185 // CHECK-NEXT: "end": {
186 // CHECK-NEXT: "offset": {{[0-9]+}},
187 // CHECK-NEXT: "col": 5,
188 // CHECK-NEXT: "tokLen": 1
191 // CHECK-NEXT: "name": "a",
192 // CHECK-NEXT: "mangledName": "a",
193 // CHECK-NEXT: "type": {
194 // CHECK-NEXT: "qualType": "int"
198 // CHECK-NEXT: "id": "0x{{.*}}",
199 // CHECK-NEXT: "kind": "VarDecl",
200 // CHECK-NEXT: "loc": {
201 // CHECK-NEXT: "offset": {{[0-9]+}},
202 // CHECK-NEXT: "line": 7,
203 // CHECK-NEXT: "presumedFile": "bar.h",
204 // CHECK-NEXT: "presumedLine": 32,
205 // CHECK-NEXT: "col": 5,
206 // CHECK-NEXT: "tokLen": 1
208 // CHECK-NEXT: "range": {
209 // CHECK-NEXT: "begin": {
210 // CHECK-NEXT: "offset": {{[0-9]+}},
211 // CHECK-NEXT: "col": 1,
212 // CHECK-NEXT: "tokLen": 3
214 // CHECK-NEXT: "end": {
215 // CHECK-NEXT: "offset": {{[0-9]+}},
216 // CHECK-NEXT: "col": 5,
217 // CHECK-NEXT: "tokLen": 1
220 // CHECK-NEXT: "name": "b",
221 // CHECK-NEXT: "mangledName": "b",
222 // CHECK-NEXT: "type": {
223 // CHECK-NEXT: "qualType": "int"
227 // CHECK-NEXT: "id": "0x{{.*}}",
228 // CHECK-NEXT: "kind": "VarDecl",
229 // CHECK-NEXT: "loc": {
230 // CHECK-NEXT: "offset": {{[0-9]+}},
231 // CHECK-NEXT: "line": 8,
232 // CHECK-NEXT: "presumedLine": 33,
233 // CHECK-NEXT: "col": 5,
234 // CHECK-NEXT: "tokLen": 1
236 // CHECK-NEXT: "range": {
237 // CHECK-NEXT: "begin": {
238 // CHECK-NEXT: "offset": {{[0-9]+}},
239 // CHECK-NEXT: "col": 1,
240 // CHECK-NEXT: "tokLen": 3
242 // CHECK-NEXT: "end": {
243 // CHECK-NEXT: "offset": {{[0-9]+}},
244 // CHECK-NEXT: "col": 5,
245 // CHECK-NEXT: "tokLen": 1
248 // CHECK-NEXT: "name": "c",
249 // CHECK-NEXT: "mangledName": "c",
250 // CHECK-NEXT: "type": {
251 // CHECK-NEXT: "qualType": "int"
255 // CHECK-NEXT: "id": "0x{{.*}}",
256 // CHECK-NEXT: "kind": "VarDecl",
257 // CHECK-NEXT: "loc": {
258 // CHECK-NEXT: "offset": {{[0-9]+}},
259 // CHECK-NEXT: "line": 11,
260 // CHECK-NEXT: "presumedFile": "{{.*}}",
261 // CHECK-NEXT: "col": 5,
262 // CHECK-NEXT: "tokLen": 1
264 // CHECK-NEXT: "range": {
265 // CHECK-NEXT: "begin": {
266 // CHECK-NEXT: "offset": {{[0-9]+}},
267 // CHECK-NEXT: "col": 1,
268 // CHECK-NEXT: "tokLen": 3
270 // CHECK-NEXT: "end": {
271 // CHECK-NEXT: "offset": {{[0-9]+}},
272 // CHECK-NEXT: "col": 5,
273 // CHECK-NEXT: "tokLen": 1
276 // CHECK-NEXT: "name": "d",
277 // CHECK-NEXT: "mangledName": "d",
278 // CHECK-NEXT: "type": {
279 // CHECK-NEXT: "qualType": "int"
283 // CHECK-NEXT: "id": "0x{{.*}}",
284 // CHECK-NEXT: "kind": "VarDecl",
285 // CHECK-NEXT: "loc": {
286 // CHECK-NEXT: "offset": {{[0-9]+}},
287 // CHECK-NEXT: "line": 12,
288 // CHECK-NEXT: "col": 5,
289 // CHECK-NEXT: "tokLen": 1
291 // CHECK-NEXT: "range": {
292 // CHECK-NEXT: "begin": {
293 // CHECK-NEXT: "offset": {{[0-9]+}},
294 // CHECK-NEXT: "col": 1,
295 // CHECK-NEXT: "tokLen": 3
297 // CHECK-NEXT: "end": {
298 // CHECK-NEXT: "offset": {{[0-9]+}},
299 // CHECK-NEXT: "col": 5,
300 // CHECK-NEXT: "tokLen": 1
303 // CHECK-NEXT: "name": "e",
304 // CHECK-NEXT: "mangledName": "e",
305 // CHECK-NEXT: "type": {
306 // CHECK-NEXT: "qualType": "int"