1 // RUN: not %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
3 using TestContainsErrors
= int[sizeof(undef())];
5 // CHECK: "kind": "TypeAliasDecl",
6 // CHECK-NEXT: "loc": {
7 // CHECK-NEXT: "offset": {{[0-9]+}},
8 // CHECK-NEXT: "file": "{{.*}}",
9 // CHECK-NEXT: "line": 3,
10 // CHECK-NEXT: "col": 7,
11 // CHECK-NEXT: "tokLen": 18
13 // CHECK-NEXT: "range": {
14 // CHECK-NEXT: "begin": {
15 // CHECK-NEXT: "offset": {{[0-9]+}},
16 // CHECK-NEXT: "col": 1,
17 // CHECK-NEXT: "tokLen": 5
19 // CHECK-NEXT: "end": {
20 // CHECK-NEXT: "offset": {{[0-9]+}},
21 // CHECK-NEXT: "col": 47,
22 // CHECK-NEXT: "tokLen": 1
25 // CHECK-NEXT: "name": "TestContainsErrors",
26 // CHECK-NEXT: "type": {
27 // CHECK-NEXT: "qualType": "int[sizeof (<recovery-expr>(undef))]"
29 // CHECK-NEXT: "inner": [
31 // CHECK-NEXT: "id": "0x{{.*}}",
32 // CHECK-NEXT: "kind": "DependentSizedArrayType",
33 // CHECK-NEXT: "type": {
34 // CHECK-NEXT: "qualType": "int[sizeof (<recovery-expr>(undef))]"
36 // CHECK-NEXT: "containsErrors": true,
37 // CHECK-NEXT: "isDependent": true,
38 // CHECK-NEXT: "isInstantiationDependent": true,
39 // CHECK-NEXT: "inner": [
41 // CHECK-NEXT: "id": "0x{{.*}}",
42 // CHECK-NEXT: "kind": "BuiltinType",
43 // CHECK-NEXT: "type": {
44 // CHECK-NEXT: "qualType": "int"
48 // CHECK-NEXT: "id": "0x{{.*}}",
49 // CHECK-NEXT: "kind": "UnaryExprOrTypeTraitExpr",
50 // CHECK-NEXT: "range": {
51 // CHECK-NEXT: "begin": {
52 // CHECK-NEXT: "offset": {{[0-9]+}},
53 // CHECK-NEXT: "col": 32,
54 // CHECK-NEXT: "tokLen": 6
56 // CHECK-NEXT: "end": {
57 // CHECK-NEXT: "offset": {{[0-9]+}},
58 // CHECK-NEXT: "col": 46,
59 // CHECK-NEXT: "tokLen": 1
62 // CHECK-NEXT: "type": {
63 // CHECK-NEXT: "qualType": "unsigned long"
65 // CHECK-NEXT: "valueCategory": "prvalue",
66 // CHECK-NEXT: "name": "sizeof",
67 // CHECK-NEXT: "inner": [
69 // CHECK-NEXT: "id": "0x{{.*}}",
70 // CHECK-NEXT: "kind": "ParenExpr",
71 // CHECK-NEXT: "range": {
72 // CHECK-NEXT: "begin": {
73 // CHECK-NEXT: "offset": {{[0-9]+}},
74 // CHECK-NEXT: "col": 38,
75 // CHECK-NEXT: "tokLen": 1
77 // CHECK-NEXT: "end": {
78 // CHECK-NEXT: "offset": {{[0-9]+}},
79 // CHECK-NEXT: "col": 46,
80 // CHECK-NEXT: "tokLen": 1
83 // CHECK-NEXT: "type": {
84 // CHECK-NEXT: "qualType": "<dependent type>"
86 // CHECK-NEXT: "valueCategory": "lvalue",
87 // CHECK-NEXT: "inner": [
89 // CHECK-NEXT: "id": "0x{{.*}}",
90 // CHECK-NEXT: "kind": "RecoveryExpr",
91 // CHECK-NEXT: "range": {
92 // CHECK-NEXT: "begin": {
93 // CHECK-NEXT: "offset": {{[0-9]+}},
94 // CHECK-NEXT: "col": 39,
95 // CHECK-NEXT: "tokLen": 5
97 // CHECK-NEXT: "end": {
98 // CHECK-NEXT: "offset": {{[0-9]+}},
99 // CHECK-NEXT: "col": 45,
100 // CHECK-NEXT: "tokLen": 1
103 // CHECK-NEXT: "type": {
104 // CHECK-NEXT: "qualType": "<dependent type>"
106 // CHECK-NEXT: "valueCategory": "lvalue",
107 // CHECK-NEXT: "inner": [
109 // CHECK-NEXT: "id": "0x{{.*}}",
110 // CHECK-NEXT: "kind": "UnresolvedLookupExpr",
111 // CHECK-NEXT: "range": {
112 // CHECK-NEXT: "begin": {
113 // CHECK-NEXT: "offset": {{[0-9]+}},
114 // CHECK-NEXT: "col": 39,
115 // CHECK-NEXT: "tokLen": 5
117 // CHECK-NEXT: "end": {
118 // CHECK-NEXT: "offset": {{[0-9]+}},
119 // CHECK-NEXT: "col": 39,
120 // CHECK-NEXT: "tokLen": 5
123 // CHECK-NEXT: "type": {
124 // CHECK-NEXT: "qualType": "<overloaded function type>"
126 // CHECK-NEXT: "valueCategory": "lvalue",
127 // CHECK-NEXT: "usesADL": true,
128 // CHECK-NEXT: "name": "undef",
129 // CHECK-NEXT: "lookups": []