]> granicus.if.org Git - clang/commitdiff
Add an automated note to files produced by gen_ast_dump_json_test.py.
authorAaron Ballman <aaron@aaronballman.com>
Fri, 21 Jun 2019 14:37:39 +0000 (14:37 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 21 Jun 2019 14:37:39 +0000 (14:37 +0000)
This also details what filters, if any, were used to generate the test output. Updates all the current JSON testing files to include the automated note.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364055 91177308-0d34-0410-b5e6-96231b3b80d8

21 files changed:
test/AST/ast-dump-comment-json.cpp
test/AST/ast-dump-decl-json.c
test/AST/ast-dump-decl-json.m
test/AST/ast-dump-enum-json.cpp
test/AST/ast-dump-expr-json.c
test/AST/ast-dump-expr-json.cpp
test/AST/ast-dump-expr-json.m
test/AST/ast-dump-funcs-json.cpp
test/AST/ast-dump-if-json.cpp
test/AST/ast-dump-macro-json.c
test/AST/ast-dump-namespace-json.cpp
test/AST/ast-dump-record-definition-data-json.cpp
test/AST/ast-dump-records-json.cpp
test/AST/ast-dump-stmt-json.c
test/AST/ast-dump-stmt-json.cpp
test/AST/ast-dump-stmt-json.m
test/AST/ast-dump-template-decls-json.cpp
test/AST/ast-dump-temporaries-json.cpp
test/AST/gen_ast_dump_json_test.py
test/AST/multistep-explicit-cast-json.c
test/AST/multistep-explicit-cast-json.cpp

index a909649c84aebd71131f653fe80bae520bc6a351..aee70ab87d6d615dd827eadda16532adad91eef4 100644 (file)
@@ -35,6 +35,9 @@ int Test_VerbatimBlockComment;
 template<typename T>
 void Test_TemplatedFunctionVariadic(int arg, ...);
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=FullComment
+
 
 // CHECK:  "kind": "FullComment",
 // CHECK-NEXT:  "loc": {
index 9b1313a0eaba16a633db4a4b057b2620a6c2e8df..c2583fafd24397e54ceb6ee5ee288b5569b36e8e 100644 (file)
@@ -86,6 +86,7 @@ int TestVarDeclInit = 0;
 
 void testParmVarDecl(int TestParmVarDecl);
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
 
 
 // CHECK:  "kind": "VarDecl",
@@ -1668,4 +1669,3 @@ void testParmVarDecl(int TestParmVarDecl);
 // CHECK-NEXT:   "qualType": "int"
 // CHECK-NEXT:  }
 // CHECK-NEXT: }
-
index 88d306c70efe8e9300075163cde2c19e4fa72150..403bc7abbe2fe3320b50ad6cc17443c22afc6bb3 100644 (file)
@@ -83,6 +83,8 @@ void f() {
   __typeof__(B.foo) Test;
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+
 
 // CHECK:  "kind": "ObjCInterfaceDecl", 
 // CHECK-NEXT:  "loc": {
index b8092f14aafdab4b36aeadb4bd0e5466d71bd94e..5e564df7078ef4647fc19566231f2d931f0a67ec 100644 (file)
@@ -5,480 +5,488 @@ enum {
   Two
 };
 
-// CHECK: "kind": "EnumDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 3
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 3
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 6
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 4
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 4
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 4
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "One",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "(anonymous enum at {{.*}}:3:1)"
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 5
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 5
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 5
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Two",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "(anonymous enum at {{.*}}:3:1)"
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
-
 enum E {
   Three,
   Four
 };
 
-// CHECK: "kind": "EnumDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 6,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 80
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 80
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 83
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "E",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 81
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 81
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 81
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Three",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "E"
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 82
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 82
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 82
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Four",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "E"
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
-
 enum F : short {
   Five,
   Six
 };
 
-// CHECK: "kind": "EnumDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 6,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 158
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 158
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 161
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "F",
-// CHECK-NEXT: "fixedUnderlyingType": {
-// CHECK-NEXT: "qualType": "short"
-// CHECK-NEXT: },
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 159
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 159
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 159
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Five",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "F"
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 160
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 160
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 160
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Six",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "F"
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
-
 enum struct G {
   Seven,
   Eight
 };
 
-// CHECK: "kind": "EnumDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 13,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 239
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 239
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 242
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "G",
-// CHECK-NEXT: "fixedUnderlyingType": {
-// CHECK-NEXT: "qualType": "int"
-// CHECK-NEXT: },
-// CHECK-NEXT: "scopedEnumTag": "struct",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 240
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 240
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 240
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Seven",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "G"
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 241
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 241
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 241
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Eight",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "G"
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
-
 enum class H {
   Nine,
   Ten
 };
 
-// CHECK: "kind": "EnumDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 12,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 321
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 321
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 324
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "H",
-// CHECK-NEXT: "fixedUnderlyingType": {
-// CHECK-NEXT: "qualType": "int"
-// CHECK-NEXT: },
-// CHECK-NEXT: "scopedEnumTag": "class",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 322
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 322
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 322
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Nine",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "H"
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 323
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 323
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 323
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Ten",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "H"
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
-
 enum class I : int {
   Eleven,
   Twelve
 };
 
-// CHECK: "kind": "EnumDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 12,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 403
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 403
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 406
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "I",
-// CHECK-NEXT: "fixedUnderlyingType": {
-// CHECK-NEXT: "qualType": "int"
-// CHECK-NEXT: },
-// CHECK-NEXT: "scopedEnumTag": "class",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 404
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 404
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 404
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=EnumDecl
+
+
+// CHECK:  "kind": "EnumDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 1,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 3
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 3
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 6
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 4
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 4
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 4
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "One",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "(anonymous enum at {{.*}}:3:1)"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   },
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 5
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 5
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 5
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Two",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "(anonymous enum at {{.*}}:3:1)"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Eleven",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "I"
+
+
+// CHECK:  "kind": "EnumDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 6,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 8
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 8
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 11
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "E",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 9
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 9
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 9
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Three",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "E"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   },
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 10
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 10
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 10
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Four",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "E"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "EnumConstantDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 405
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 405
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 3,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 405
+
+
+// CHECK:  "kind": "EnumDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 6,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 13
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 13
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 16
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "F",
+// CHECK-NEXT:  "fixedUnderlyingType": {
+// CHECK-NEXT:   "qualType": "short"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 14
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 14
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 14
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Five",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "F"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   },
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 15
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 15
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 15
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Six",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "F"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "Twelve",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "I"
+
+
+// CHECK:  "kind": "EnumDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 13,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 18
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 18
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 21
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "G",
+// CHECK-NEXT:  "fixedUnderlyingType": {
+// CHECK-NEXT:   "qualType": "int"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "scopedEnumTag": "struct",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 19
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 19
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 19
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Seven",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "G"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   },
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 20
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 20
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 20
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Eight",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "G"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
+
+
+// CHECK:  "kind": "EnumDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 12,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 23
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 23
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 26
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "H",
+// CHECK-NEXT:  "fixedUnderlyingType": {
+// CHECK-NEXT:   "qualType": "int"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "scopedEnumTag": "class",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 24
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 24
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 24
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Nine",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "H"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   },
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 25
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 25
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 25
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Ten",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "H"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: ]
+
+
+// CHECK:  "kind": "EnumDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 12,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 28
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 28
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 31
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "I",
+// CHECK-NEXT:  "fixedUnderlyingType": {
+// CHECK-NEXT:   "qualType": "int"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "scopedEnumTag": "class",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 29
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 29
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 29
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Eleven",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "I"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   },
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "EnumConstantDecl",
+// CHECK-NEXT:    "loc": {
+// CHECK-NEXT:     "col": 3,
+// CHECK-NEXT:     "file": "{{.*}}",
+// CHECK-NEXT:     "line": 30
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
+// CHECK-NEXT:     "begin": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 30
+// CHECK-NEXT:     },
+// CHECK-NEXT:     "end": {
+// CHECK-NEXT:      "col": 3,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 30
+// CHECK-NEXT:     }
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "Twelve",
+// CHECK-NEXT:    "type": {
+// CHECK-NEXT:     "qualType": "I"
+// CHECK-NEXT:    }
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: ]
index 5dd86f38f5b7956d5d22c4ee76c033c5e9e891d5..a27d615883db1ae74a71783911135580d130a35b 100644 (file)
@@ -105,6 +105,9 @@ void PrimaryExpressions(int a) {
   (a);
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=FunctionDecl
+
 
 // CHECK:  "kind": "FunctionDecl",
 // CHECK-NEXT:  "loc": {
index 59d1e229a922fdeb3a8316dc82d2e92be62ee99c..8a4bfdf777efc1e4d1c37866bf22b6f2af03a8ad 100644 (file)
@@ -153,6 +153,8 @@ void TestNonADLCall3() {
 }
 } // namespace test_adl_call_three
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+
 
 // CHECK:  "kind": "FunctionDecl",
 // CHECK-NEXT:  "loc": {
index f0ec7d4373363c7db6c5befaa5926ef2b5fc472a..9f6dac78ba4cda041313ff16bbabc23f69a773bb 100644 (file)
@@ -95,6 +95,8 @@ void TestObjCBoolLiteral() {
   __objc_no;
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+
 
 // CHECK:  "kind": "FunctionDecl", 
 // CHECK-NEXT:  "loc": {
index b69a6e20ca324240f4bc9755a69f4f8f061dc860..ef3215d182dd919c937534205b4772183395d24d 100644 (file)
@@ -41,6 +41,8 @@ int main() {
   Test1(); // Causes this to be marked 'used'
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+
 
 // CHECK:  "kind": "CXXMethodDecl",
 // CHECK-NEXT:  "loc": {
@@ -1121,4 +1123,3 @@ int main() {
 // CHECK-NEXT:   }
 // CHECK-NEXT:  ]
 // CHECK-NEXT: }
-
index 1d103292118a037fa3ac1f309198c235cfb68d84..49d711ab887409ecd1190122e95b5e9a3386601a 100644 (file)
@@ -26,6 +26,9 @@ void func(int val) {
     ;
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=IfStmt
+
 
 // CHECK:  "kind": "IfStmt",
 // CHECK-NEXT:  "range": {
index 14b88adcfaae986962d7c67edd851f2e213382a2..43a9df0fd6c864d4113df56be4d5d2354f30d39c 100644 (file)
@@ -16,6 +16,9 @@ void BING(quux)(void);
 void BLAP(foo, __COUNTER__)(void);
 void BLAP(foo, __COUNTER__)(void);
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=FunctionDecl
+
 
 // CHECK:  "kind": "FunctionDecl",
 // CHECK-NEXT:  "loc": {
index 1cf967d735863dde50815d9f86c6da0ae90fd54e..3162fb8cd6003acc938417ffead7e2fc3ff96c9f 100644 (file)
 
 namespace foo {
 }
-// CHECK: "kind": "NamespaceDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 11,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 3
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 3
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 4
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "foo"
-// CHECK-NEXT: },
-
 
 namespace {
 }
-// CHECK: "kind": "NamespaceDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 11,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 27
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 27
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 28
-// CHECK-NEXT: }
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "UsingDirectiveDecl",
-// CHECK-NEXT: "loc": {},
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 11,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 27
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {}
-// CHECK-NEXT: },
-// CHECK-NEXT: "isImplicit": true,
-// CHECK-NEXT: "nominatedNamespace": {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "NamespaceDecl",
-// CHECK-NEXT: "name": ""
-// CHECK-NEXT: }
-// CHECK-NEXT: },
 
 namespace bar {
 inline namespace __1 {
 }
 }
-// CHECK: "kind": "NamespaceDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 11,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 68
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 68
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 71
+
+namespace baz::quux {
+}
+
+namespace quux::inline frobble {
+}
+
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=NamespaceDecl
+
+
+// CHECK:  "kind": "NamespaceDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 11,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 3
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 3
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 4
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "foo"
+// CHECK-NEXT: }
+
+
+// CHECK:  "kind": "NamespaceDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 11,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 6
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 6
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 7
+// CHECK-NEXT:   }
+// CHECK-NEXT:  }
+// CHECK-NEXT: }
+
+
+// CHECK:  "kind": "NamespaceDecl",
+// CHECK-NEXT:  "name": ""
 // CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "bar",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT:   "id": "0x{{.*}}",
-// CHECK-NEXT:   "kind": "NamespaceDecl",
-// CHECK-NEXT:   "loc": {
+
+
+// CHECK:  "kind": "NamespaceDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 11,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 9
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 9
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 12
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "bar",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "NamespaceDecl",
+// CHECK-NEXT:    "loc": {
 // CHECK-NEXT:     "col": 18,
 // CHECK-NEXT:     "file": "{{.*}}",
-// CHECK-NEXT:     "line": 69
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "range": {
+// CHECK-NEXT:     "line": 10
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
 // CHECK-NEXT:     "begin": {
-// CHECK-NEXT:       "col": 1,
-// CHECK-NEXT:       "file": "{{.*}}",
-// CHECK-NEXT:       "line": 69
+// CHECK-NEXT:      "col": 1,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 10
 // CHECK-NEXT:     },
 // CHECK-NEXT:     "end": {
-// CHECK-NEXT:       "col": 1,
-// CHECK-NEXT:       "file": "{{.*}}",
-// CHECK-NEXT:       "line": 70
+// CHECK-NEXT:      "col": 1,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 11
 // CHECK-NEXT:     }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "name": "__1",
-// CHECK-NEXT:   "isInline": true
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "__1",
+// CHECK-NEXT:    "isInline": true
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
 
-namespace baz::quux {
-}
-// CHECK: "kind": "NamespaceDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 11,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 118
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 118
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 119
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "baz",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT:   "id": "0x{{.*}}",
-// CHECK-NEXT:   "kind": "NamespaceDecl",
-// CHECK-NEXT:   "loc": {
+
+// CHECK:  "kind": "NamespaceDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 11,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 14
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 14
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 15
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "baz",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "NamespaceDecl",
+// CHECK-NEXT:    "loc": {
 // CHECK-NEXT:     "col": 16,
 // CHECK-NEXT:     "file": "{{.*}}",
-// CHECK-NEXT:     "line": 118
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "range": {
+// CHECK-NEXT:     "line": 14
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
 // CHECK-NEXT:     "begin": {
-// CHECK-NEXT:       "col": 14,
-// CHECK-NEXT:       "file": "{{.*}}",
-// CHECK-NEXT:       "line": 118
+// CHECK-NEXT:      "col": 14,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 14
 // CHECK-NEXT:     },
 // CHECK-NEXT:     "end": {
-// CHECK-NEXT:       "col": 1,
-// CHECK-NEXT:       "file": "{{.*}}",
-// CHECK-NEXT:       "line": 119
+// CHECK-NEXT:      "col": 1,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 15
 // CHECK-NEXT:     }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "name": "quux"
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "quux"
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: },
 
-namespace quux::inline frobble {
-}
-// CHECK: "kind": "NamespaceDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "col": 11,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 165
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 165
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "file": "{{.*}}",
-// CHECK-NEXT: "line": 166
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "quux",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT:   "id": "0x{{.*}}",
-// CHECK-NEXT:   "kind": "NamespaceDecl",
-// CHECK-NEXT:   "loc": {
+
+// CHECK:  "kind": "NamespaceDecl",
+// CHECK-NEXT:  "loc": {
+// CHECK-NEXT:   "col": 11,
+// CHECK-NEXT:   "file": "{{.*}}",
+// CHECK-NEXT:   "line": 17
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "range": {
+// CHECK-NEXT:   "begin": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 17
+// CHECK-NEXT:   },
+// CHECK-NEXT:   "end": {
+// CHECK-NEXT:    "col": 1,
+// CHECK-NEXT:    "file": "{{.*}}",
+// CHECK-NEXT:    "line": 18
+// CHECK-NEXT:   }
+// CHECK-NEXT:  },
+// CHECK-NEXT:  "name": "quux",
+// CHECK-NEXT:  "inner": [
+// CHECK-NEXT:   {
+// CHECK-NEXT:    "id": "0x{{.*}}",
+// CHECK-NEXT:    "kind": "NamespaceDecl",
+// CHECK-NEXT:    "loc": {
 // CHECK-NEXT:     "col": 24,
 // CHECK-NEXT:     "file": "{{.*}}",
-// CHECK-NEXT:     "line": 165
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "range": {
+// CHECK-NEXT:     "line": 17
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "range": {
 // CHECK-NEXT:     "begin": {
-// CHECK-NEXT:       "col": 17,
-// CHECK-NEXT:       "file": "{{.*}}",
-// CHECK-NEXT:       "line": 165
+// CHECK-NEXT:      "col": 17,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 17
 // CHECK-NEXT:     },
 // CHECK-NEXT:     "end": {
-// CHECK-NEXT:       "col": 1,
-// CHECK-NEXT:       "file": "{{.*}}",
-// CHECK-NEXT:       "line": 166
+// CHECK-NEXT:      "col": 1,
+// CHECK-NEXT:      "file": "{{.*}}",
+// CHECK-NEXT:      "line": 18
 // CHECK-NEXT:     }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "name": "frobble",
-// CHECK-NEXT:   "isInline": true
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
+// CHECK-NEXT:    },
+// CHECK-NEXT:    "name": "frobble",
+// CHECK-NEXT:    "isInline": true
+// CHECK-NEXT:   }
+// CHECK-NEXT:  ]
 // CHECK-NEXT: }
index 11c44f98293f50b201ca781409b90b80e16e6dc4..de2fb86e7070c439ad2c611b1bb3954cc8a4a36d 100644 (file)
@@ -124,6 +124,9 @@ struct DoesNotAllowConstDefaultInit {
   int i;
 };
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=CXXRecordDecl
+
 
 // CHECK:  "kind": "CXXRecordDecl",
 // CHECK-NEXT:  "name": "__NSConstantString_tag"
index 05f1f9218c26b2bbbef6c7ee086186a23c9d4993..3b33d38366ede1cac04579c87667cd8f18083ab2 100644 (file)
@@ -84,6 +84,9 @@ template <typename... Bases>
 struct Derived6 : virtual public Bases... {
 };
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=CXXRecordDecl
+
 
 // CHECK:  "kind": "CXXRecordDecl",
 // CHECK-NEXT:  "name": "__NSConstantString_tag"
index b93363ecb2b5377b7f5d63df6e8101c8a13aa9cf..f86743a84a51d9da772619f016f117f7080c1044 100644 (file)
@@ -133,6 +133,8 @@ void TestMiscStmts(void) {
   ({int a = 10; a;});
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=VarDecl,CompoundStmt
 
 
 // CHECK:  "kind": "VarDecl",
@@ -5096,4 +5098,3 @@ void TestMiscStmts(void) {
 // CHECK-NEXT:   }
 // CHECK-NEXT:  ]
 // CHECK-NEXT: }
-
index 5ca3cecfcd797a704bb9f8078ef2a7fcae94c973..576c333175cf447c292289b0642f325feabfab88 100644 (file)
@@ -122,6 +122,9 @@ void TestDependentGenericSelectionExpr(Ty T) {
   _Generic(T, default : 0);
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=FunctionDecl,FunctionTemplateDecl,UsingDecl,UsingShadowDecl
+
 
 // CHECK:  "kind": "FunctionDecl",
 // CHECK-NEXT:  "loc": {
index 9647f4a78c1cfe2979dce573471bb6bc0277de69..be9a6b60ec07c88acc20c81b261fd04b2a66c29c 100644 (file)
@@ -19,6 +19,8 @@ void TestObjCAtCatchStmt() {
   }
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+
 
 // CHECK:  "kind": "FunctionDecl", 
 // CHECK-NEXT:  "loc": {
index 31f400f15e54941dcacf7269ccaa1f59048c4261..cce9ef721643d8ed599f8665557b802be7d06c06 100644 (file)
@@ -55,6 +55,8 @@ template <typename Ty>
 template <typename Uy>
 void V<Ty>::f() {}
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+
 
 // CHECK:  "kind": "TranslationUnitDecl",
 // CHECK-NEXT:  "loc": {},
index dbd6f29fd06853c8e6bd7668c56a3c183b3cdb42..15fd49112412c0fbb260c39c19379d9969156de6 100644 (file)
@@ -18,6 +18,8 @@ void MaterializeTemp() {
   func(f);
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=ExprWithCleanups
 
 
 // CHECK:  "kind": "ExprWithCleanups",
@@ -443,4 +445,3 @@ void MaterializeTemp() {
 // CHECK-NEXT:   }
 // CHECK-NEXT:  ]
 // CHECK-NEXT: }
-
index a7b98776de99a8d84fc54770c69ef0efb425dcb6..975039ead278924bd923bdffad17501feabbf42b 100644 (file)
@@ -78,6 +78,12 @@ def main():
     options = args.opts.split(' ')
     filters = Set(args.filters.split(',')) if args.filters else Set([])
     
+    note = "// NOTE: CHECK lines have been autogenerated by " \
+           "gen_ast_dump_json_test.py"
+           
+    if (args.filters):
+        note += "\n// using --filters=" + args.filters
+    
     cmd = [clang_binary, "-cc1"]
     cmd.extend(options)
 
@@ -118,6 +124,7 @@ def main():
     print("Writing json appended source file to %s." %(dest_path))
     copyfile(args.source, dest_path)    
     with open(dest_path, "a") as f:
+        f.write("\n" + note + "\n")        
         for out_ast in out_asts:
             append_str = json.dumps(out_ast, indent=1, ensure_ascii=False)
             out_str = '\n\n'
index 3728fd5d2bd5702bb29a6897741dd2548aecbea8..f13f49c9f3cdff611b03de9e6fdb989788f06129 100644 (file)
@@ -34,6 +34,9 @@ signed char cstylecast_3(signed int x) {
   return (signed char)x;
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=ImplicitCastExpr,CStyleCastExpr
+
 
 // CHECK:  "kind": "ImplicitCastExpr",
 // CHECK-NEXT:  "range": {
@@ -629,4 +632,3 @@ signed char cstylecast_3(signed int x) {
 // CHECK-NEXT:   }
 // CHECK-NEXT:  ]
 // CHECK-NEXT: }
-
index 4ca70074fbc1c4414ec301144d37b61832b15eb2..70ba2f2cd9270b857a21b390e81890ec3be1796b 100644 (file)
@@ -75,6 +75,9 @@ SignedChar cxxfunctionalcast_3(SignedInt x) {
   return SignedChar(x);
 }
 
+// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
+// using --filters=ImplicitCastExpr,CStyleCastExpr,CXXStaticCastExpr,CXXFunctionalCastExpr
+
 
 // CHECK:  "kind": "ImplicitCastExpr",
 // CHECK-NEXT:  "range": {
@@ -1578,4 +1581,3 @@ SignedChar cxxfunctionalcast_3(SignedInt x) {
 // CHECK-NEXT:   }
 // CHECK-NEXT:  ]
 // CHECK-NEXT: }
-