2017-08-19 17:36:14 +08:00
|
|
|
// RUN: clang-diff -ast-dump-json %s -- \
|
2018-08-07 06:37:45 +08:00
|
|
|
// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
|
2017-08-19 08:57:38 +08:00
|
|
|
// RUN: | FileCheck %s
|
|
|
|
|
2018-08-07 06:37:45 +08:00
|
|
|
// CHECK: "begin": 311,
|
2017-08-19 08:57:38 +08:00
|
|
|
// CHECK: "type": "FieldDecl",
|
2018-08-07 06:37:45 +08:00
|
|
|
// CHECK: "end": 319,
|
2017-08-20 18:22:32 +08:00
|
|
|
// CHECK: "type": "CXXRecordDecl",
|
2017-08-19 08:57:38 +08:00
|
|
|
class A {
|
|
|
|
int x;
|
|
|
|
};
|
|
|
|
|
|
|
|
// CHECK: "children": [
|
|
|
|
// CHECK-NEXT: {
|
|
|
|
// CHECK-NEXT: "begin":
|
|
|
|
// CHECK-NEXT: "children": []
|
|
|
|
// CHECK-NEXT: "end":
|
|
|
|
// CHECK-NEXT: "id":
|
|
|
|
// CHECK-NEXT: "type": "CharacterLiteral"
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK: ]
|
|
|
|
// CHECK: "type": "VarDecl",
|
|
|
|
char nl = '\n';
|
|
|
|
|
2017-08-19 09:34:24 +08:00
|
|
|
// CHECK: "value": "abc \n\t\u0000\u001f"
|
|
|
|
char s[] = "abc \n\t\0\x1f";
|
2017-08-19 08:57:38 +08:00
|
|
|
|