forked from OSchip/llvm-project
1891 lines
53 KiB
C
1891 lines
53 KiB
C
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-strict-prototypes -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
|
|
|
|
#include "Inputs/json-dump-include.h"
|
|
|
|
int TestLocation;
|
|
TestTypedefFromInclude TestLocationFromInclude;
|
|
|
|
struct TestIndent {
|
|
int x;
|
|
};
|
|
|
|
struct TestChildren {
|
|
int x;
|
|
struct y {
|
|
int z;
|
|
};
|
|
};
|
|
|
|
void testLabelDecl(void) {
|
|
__label__ TestLabelDecl;
|
|
TestLabelDecl: goto TestLabelDecl;
|
|
}
|
|
|
|
typedef int TestTypedefDecl;
|
|
|
|
enum TestEnumDecl {
|
|
testEnumDecl
|
|
};
|
|
|
|
struct TestEnumDeclAnon {
|
|
enum {
|
|
testEnumDeclAnon
|
|
} e;
|
|
};
|
|
|
|
enum TestEnumDeclForward;
|
|
|
|
struct TestRecordDecl {
|
|
int i;
|
|
};
|
|
|
|
struct TestRecordDeclEmpty {
|
|
};
|
|
|
|
struct TestRecordDeclAnon1 {
|
|
struct {
|
|
} testRecordDeclAnon1;
|
|
};
|
|
|
|
struct TestRecordDeclAnon2 {
|
|
struct {
|
|
};
|
|
};
|
|
|
|
struct TestRecordDeclForward;
|
|
|
|
enum testEnumConstantDecl {
|
|
TestEnumConstantDecl,
|
|
TestEnumConstantDeclInit = 1
|
|
};
|
|
|
|
struct TestIndirectFieldDecl {
|
|
struct {
|
|
int Field;
|
|
};
|
|
};
|
|
|
|
// FIXME: It would be nice to dump the enum and its enumerators.
|
|
int TestFunctionDecl(int x, enum { e } y) {
|
|
return x;
|
|
}
|
|
|
|
// FIXME: It would be nice to dump 'Enum' and 'e'.
|
|
int TestFunctionDecl2(enum Enum { e } x) { return x; }
|
|
int TestFunctionDeclProto(int x);
|
|
void TestFunctionDeclNoProto();
|
|
extern int TestFunctionDeclSC(void);
|
|
inline int TestFunctionDeclInline(void);
|
|
|
|
struct testFieldDecl {
|
|
int TestFieldDecl;
|
|
int TestFieldDeclWidth : 1;
|
|
};
|
|
|
|
int TestVarDecl;
|
|
extern int TestVarDeclSC;
|
|
__thread int TestVarDeclThread;
|
|
int TestVarDeclInit = 0;
|
|
|
|
void testParmVarDecl(int TestParmVarDecl);
|
|
|
|
// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "TypedefDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 1,
|
|
// CHECK-NEXT: "col": 13,
|
|
// CHECK-NEXT: "tokLen": 22,
|
|
// CHECK-NEXT: "includedFrom": {
|
|
// CHECK-NEXT: "file": "{{.*}}"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 7,
|
|
// CHECK-NEXT: "includedFrom": {
|
|
// CHECK-NEXT: "file": "{{.*}}"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 13,
|
|
// CHECK-NEXT: "tokLen": 22,
|
|
// CHECK-NEXT: "includedFrom": {
|
|
// CHECK-NEXT: "file": "{{.*}}"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isReferenced": true,
|
|
// CHECK-NEXT: "name": "TestTypedefFromInclude",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "BuiltinType",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "VarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 5,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestLocation",
|
|
// CHECK-NEXT: "mangledName": "TestLocation",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "VarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 6,
|
|
// CHECK-NEXT: "col": 24,
|
|
// CHECK-NEXT: "tokLen": 23
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 22
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 24,
|
|
// CHECK-NEXT: "tokLen": 23
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestLocationFromInclude",
|
|
// CHECK-NEXT: "mangledName": "TestLocationFromInclude",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "int",
|
|
// CHECK-NEXT: "qualType": "TestTypedefFromInclude",
|
|
// CHECK-NEXT: "typeAliasDeclId": "0x{{.*}}"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 8,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 10
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 10,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestIndent",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 9,
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 12,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 17,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestChildren",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 13,
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 14,
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 16,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "parentDeclContextId": "0x{{.*}}",
|
|
// CHECK-NEXT: "name": "y",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 15,
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "z",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "LabelDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 20,
|
|
// CHECK-NEXT: "col": 13,
|
|
// CHECK-NEXT: "tokLen": 13
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 9
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 13,
|
|
// CHECK-NEXT: "tokLen": 13
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isUsed": true,
|
|
// CHECK-NEXT: "name": "TestLabelDecl"
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "TypedefDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 24,
|
|
// CHECK-NEXT: "col": 13,
|
|
// CHECK-NEXT: "tokLen": 15
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 7
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 13,
|
|
// CHECK-NEXT: "tokLen": 15
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestTypedefDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "BuiltinType",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "EnumDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 26,
|
|
// CHECK-NEXT: "col": 6,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 28,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestEnumDecl",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "EnumConstantDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 27,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 12
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "testEnumDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 30,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 16
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 34,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestEnumDeclAnon",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "EnumDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 31,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 33,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "EnumConstantDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 32,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 16
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 16
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 16
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "testEnumDeclAnon",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 33,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 31,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 33,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "e",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "enum TestEnumDeclAnon::(unnamed at {{.*}}:31:3)",
|
|
// CHECK-NEXT: "qualType": "enum (unnamed enum at {{.*}}:31:3)"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "EnumDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 36,
|
|
// CHECK-NEXT: "col": 6,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 6,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestEnumDeclForward"
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 38,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 14
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 40,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestRecordDecl",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 39,
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "i",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 42,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 43,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestRecordDeclEmpty",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 45,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 48,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestRecordDeclAnon1",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 46,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 47,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 46,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 47,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "testRecordDeclAnon1",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "struct TestRecordDeclAnon1::(unnamed at {{.*}}:46:3)",
|
|
// CHECK-NEXT: "qualType": "struct (unnamed struct at {{.*}}:46:3)"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 50,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 19
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 53,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestRecordDeclAnon2",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 51,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 52,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 51,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isImplicit": true,
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "struct TestRecordDeclAnon2::(anonymous at {{.*}}:51:3)"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 55,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 21
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 21
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestRecordDeclForward",
|
|
// CHECK-NEXT: "tagUsed": "struct"
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "EnumConstantDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 58,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 20
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 20
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 20
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestEnumConstantDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "EnumConstantDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 59,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 24
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 24
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 30,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestEnumConstantDeclInit",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ConstantExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 30,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 30,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "value": "1",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "IntegerLiteral",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 30,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 30,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "value": "1"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 62,
|
|
// CHECK-NEXT: "col": 8,
|
|
// CHECK-NEXT: "tokLen": 21
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 66,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestIndirectFieldDecl",
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "RecordDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 63,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 65,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "tagUsed": "struct",
|
|
// CHECK-NEXT: "completeDefinition": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 64,
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 5
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 5
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "Field",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 63,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isImplicit": true,
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "struct TestIndirectFieldDecl::(anonymous at {{.*}}:63:3)"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "IndirectFieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 64,
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 5
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 5
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 9,
|
|
// CHECK-NEXT: "tokLen": 5
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isImplicit": true,
|
|
// CHECK-NEXT: "name": "Field"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FunctionDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 69,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 16
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 71,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFunctionDecl",
|
|
// CHECK-NEXT: "mangledName": "TestFunctionDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int (int, enum (unnamed enum at {{.*}}:69:29))"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 69,
|
|
// CHECK-NEXT: "col": 26,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 22,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 26,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isUsed": true,
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 40,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 29,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 40,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "y",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "enum (unnamed at {{.*}}:69:29)",
|
|
// CHECK-NEXT: "qualType": "enum (unnamed enum at {{.*}}:69:29)"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "CompoundStmt",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 43,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 71,
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ReturnStmt",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "line": 70,
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ImplicitCastExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "castKind": "LValueToRValue",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "DeclRefExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 10,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "lvalue",
|
|
// CHECK-NEXT: "referencedDecl": {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FunctionDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 74,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 17
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 54,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFunctionDecl2",
|
|
// CHECK-NEXT: "mangledName": "TestFunctionDecl2",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int (enum Enum)"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 39,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 23,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 39,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isUsed": true,
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "enum Enum",
|
|
// CHECK-NEXT: "qualType": "enum Enum"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "CompoundStmt",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 42,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 54,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ReturnStmt",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 44,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ImplicitCastExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "castKind": "IntegralCast",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ImplicitCastExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "enum Enum",
|
|
// CHECK-NEXT: "qualType": "enum Enum"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "castKind": "LValueToRValue",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "DeclRefExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 51,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "enum Enum",
|
|
// CHECK-NEXT: "qualType": "enum Enum"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "lvalue",
|
|
// CHECK-NEXT: "referencedDecl": {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "desugaredQualType": "enum Enum",
|
|
// CHECK-NEXT: "qualType": "enum Enum"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FunctionDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 75,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 21
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 32,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFunctionDeclProto",
|
|
// CHECK-NEXT: "mangledName": "TestFunctionDeclProto",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int (int)"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 31,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 27,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 31,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "x",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FunctionDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 76,
|
|
// CHECK-NEXT: "col": 6,
|
|
// CHECK-NEXT: "tokLen": 23
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 4
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 30,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFunctionDeclNoProto",
|
|
// CHECK-NEXT: "mangledName": "TestFunctionDeclNoProto",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "void ()"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FunctionDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 77,
|
|
// CHECK-NEXT: "col": 12,
|
|
// CHECK-NEXT: "tokLen": 18
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 35,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFunctionDeclSC",
|
|
// CHECK-NEXT: "mangledName": "TestFunctionDeclSC",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int (void)"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "storageClass": "extern"
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FunctionDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 78,
|
|
// CHECK-NEXT: "col": 12,
|
|
// CHECK-NEXT: "tokLen": 22
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 39,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFunctionDeclInline",
|
|
// CHECK-NEXT: "mangledName": "TestFunctionDeclInline",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int (void)"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "inline": true
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 81,
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 13
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 13
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFieldDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "FieldDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 82,
|
|
// CHECK-NEXT: "col": 7,
|
|
// CHECK-NEXT: "tokLen": 18
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 3,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 28,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestFieldDeclWidth",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "isBitfield": true,
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "ConstantExpr",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 28,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 28,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "value": "1",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "IntegerLiteral",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 28,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 28,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "value": "1"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "VarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 85,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 11
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 11
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestVarDecl",
|
|
// CHECK-NEXT: "mangledName": "TestVarDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "VarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 86,
|
|
// CHECK-NEXT: "col": 12,
|
|
// CHECK-NEXT: "tokLen": 13
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 6
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 12,
|
|
// CHECK-NEXT: "tokLen": 13
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestVarDeclSC",
|
|
// CHECK-NEXT: "mangledName": "TestVarDeclSC",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "storageClass": "extern"
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "VarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 87,
|
|
// CHECK-NEXT: "col": 14,
|
|
// CHECK-NEXT: "tokLen": 17
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 8
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 14,
|
|
// CHECK-NEXT: "tokLen": 17
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestVarDeclThread",
|
|
// CHECK-NEXT: "mangledName": "TestVarDeclThread",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "tls": "static"
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "VarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 88,
|
|
// CHECK-NEXT: "col": 5,
|
|
// CHECK-NEXT: "tokLen": 15
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 1,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 23,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestVarDeclInit",
|
|
// CHECK-NEXT: "mangledName": "TestVarDeclInit",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "init": "c",
|
|
// CHECK-NEXT: "inner": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "id": "0x{{.*}}",
|
|
// CHECK-NEXT: "kind": "IntegerLiteral",
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 23,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 23,
|
|
// CHECK-NEXT: "tokLen": 1
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "valueCategory": "prvalue",
|
|
// CHECK-NEXT: "value": "0"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
// CHECK-NOT: {{^}}Dumping
|
|
// CHECK: "kind": "ParmVarDecl",
|
|
// CHECK-NEXT: "loc": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "file": "{{.*}}",
|
|
// CHECK-NEXT: "line": 90,
|
|
// CHECK-NEXT: "col": 26,
|
|
// CHECK-NEXT: "tokLen": 15
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "range": {
|
|
// CHECK-NEXT: "begin": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 22,
|
|
// CHECK-NEXT: "tokLen": 3
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "end": {
|
|
// CHECK-NEXT: "offset": {{[0-9]+}},
|
|
// CHECK-NEXT: "col": 26,
|
|
// CHECK-NEXT: "tokLen": 15
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: },
|
|
// CHECK-NEXT: "name": "TestParmVarDecl",
|
|
// CHECK-NEXT: "type": {
|
|
// CHECK-NEXT: "qualType": "int"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|