[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
serge-sans-paille updated this revision to Diff 549644. serge-sans-paille retitled this revision from "[clang] Add reason and replacement fields to DeprecatedAttr json AST dump" to "[clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump". serge-sans-paille added a comment. + Unavailable attr CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 Files: clang/include/clang/AST/JSONNodeDumper.h clang/lib/AST/JSONNodeDumper.cpp clang/test/AST/ast-dump-attr-json.cpp Index: clang/test/AST/ast-dump-attr-json.cpp === --- clang/test/AST/ast-dump-attr-json.cpp +++ clang/test/AST/ast-dump-attr-json.cpp @@ -8,6 +8,13 @@ __attribute__((cleanup(cleanup_function))) int var; } +__attribute__((deprecated)) int deprecated_var0; +__attribute__((deprecated("reason"))) int deprecated_var1; +__attribute__((deprecated("reason", "replacement"))) int deprecated_var2; + +__attribute__((unavailable)) int unavailable_var0; +__attribute__((unavailable("reason"))) int unavailable_var1; + // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py // using --filters=VarDecl @@ -139,3 +146,147 @@ // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 282, +// CHECK-NEXT: "line": 11, +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 250, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 282, +// CHECK-NEXT:"col": 33, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var0", +// CHECK-NEXT: "mangledName": "deprecated_var0", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK-NEXT:"message": "", +// CHECK-NEXT:"replacement": "" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 341, +// CHECK-NEXT: "line": 12, +// CHECK-NEXT: "col": 43, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 299, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 341, +// CHECK-NEXT:"col": 43, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var1", +// CHECK-NEXT: "mangledName": "deprecated_var1", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 314, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 333, +// CHECK-NEXT: "col": 35, +// CHECK-NEXT: "tokLen": 1 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK-NEXT:"message": "reason", +// CHECK-NEXT:"replacement": "" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 415, +// CHECK-NEXT: "line": 13, +// CHECK-NEXT: "col": 58, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 358, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 415, +// CHECK-NEXT:"col": 58, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var2", +// CHECK-NEXT: "mangledName": "deprecated_var2", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:
[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
serge-sans-paille updated this revision to Diff 549645. serge-sans-paille added a comment. + test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 Files: clang/include/clang/AST/JSONNodeDumper.h clang/lib/AST/JSONNodeDumper.cpp clang/test/AST/ast-dump-attr-json.cpp Index: clang/test/AST/ast-dump-attr-json.cpp === --- clang/test/AST/ast-dump-attr-json.cpp +++ clang/test/AST/ast-dump-attr-json.cpp @@ -8,6 +8,13 @@ __attribute__((cleanup(cleanup_function))) int var; } +__attribute__((deprecated)) int deprecated_var0; +__attribute__((deprecated("reason"))) int deprecated_var1; +__attribute__((deprecated("reason", "replacement"))) int deprecated_var2; + +__attribute__((unavailable)) int unavailable_var0; +__attribute__((unavailable("reason"))) int unavailable_var1; + // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py // using --filters=VarDecl @@ -139,3 +146,241 @@ // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 282, +// CHECK-NEXT: "line": 11, +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 250, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 282, +// CHECK-NEXT:"col": 33, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var0", +// CHECK-NEXT: "mangledName": "deprecated_var0", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK-NEXT:"message": "", +// CHECK-NEXT:"replacement": "" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 341, +// CHECK-NEXT: "line": 12, +// CHECK-NEXT: "col": 43, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 299, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 341, +// CHECK-NEXT:"col": 43, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var1", +// CHECK-NEXT: "mangledName": "deprecated_var1", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 314, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 333, +// CHECK-NEXT: "col": 35, +// CHECK-NEXT: "tokLen": 1 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK-NEXT:"message": "reason", +// CHECK-NEXT:"replacement": "" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 415, +// CHECK-NEXT: "line": 13, +// CHECK-NEXT: "col": 58, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 358, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 415, +// CHECK-NEXT:"col": 58, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var2", +// CHECK-NEXT: "mangledName": "deprecated_var2", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 373, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 407, +// CHECK-NEXT: "col": 50, +// CHECK-N
[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
aaron.ballman added inline comments. Comment at: clang/lib/AST/JSONNodeDumper.cpp:541-548 +void JSONNodeDumper::VisitDeprecatedAttr(const DeprecatedAttr *DA) { + JOS.attribute("message", DA->getMessage()); + JOS.attribute("replacement", DA->getReplacement()); +} + +void JSONNodeDumper::VisitUnavailableAttr(const UnavailableAttr *UA) { + JOS.attribute("message", UA->getMessage()); I think we should probably skip emitting the field if the field is empty. e.g., `[[deprecated("")]]` and `[[deprecated]]` should have the same output that doesn't have a `message` field; this keeps the JSON dumps somewhat more succinct for those cases. WDYT? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
serge-sans-paille updated this revision to Diff 549929. serge-sans-paille added a comment. Only output extra fields if they are not empty CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 Files: clang/include/clang/AST/JSONNodeDumper.h clang/lib/AST/JSONNodeDumper.cpp clang/test/AST/ast-dump-attr-json.cpp Index: clang/test/AST/ast-dump-attr-json.cpp === --- clang/test/AST/ast-dump-attr-json.cpp +++ clang/test/AST/ast-dump-attr-json.cpp @@ -8,6 +8,13 @@ __attribute__((cleanup(cleanup_function))) int var; } +__attribute__((deprecated)) int deprecated_var0; +__attribute__((deprecated("reason"))) int deprecated_var1; +__attribute__((deprecated("reason", "replacement"))) int deprecated_var2; + +__attribute__((unavailable)) int unavailable_var0; +__attribute__((unavailable("reason"))) int unavailable_var1; + // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py // using --filters=VarDecl @@ -139,3 +146,237 @@ // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 282, +// CHECK-NEXT: "line": 11, +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 250, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 282, +// CHECK-NEXT:"col": 33, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var0", +// CHECK-NEXT: "mangledName": "deprecated_var0", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: } +// CHECK-NEXT:} +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 341, +// CHECK-NEXT: "line": 12, +// CHECK-NEXT: "col": 43, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 299, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 341, +// CHECK-NEXT:"col": 43, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var1", +// CHECK-NEXT: "mangledName": "deprecated_var1", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 314, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 333, +// CHECK-NEXT: "col": 35, +// CHECK-NEXT: "tokLen": 1 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK-NEXT:"message": "reason" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 415, +// CHECK-NEXT: "line": 13, +// CHECK-NEXT: "col": 58, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 358, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 415, +// CHECK-NEXT:"col": 58, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var2", +// CHECK-NEXT: "mangledName": "deprecated_var2", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 373, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 407, +// CHECK-NEXT: "col": 50, +// CHECK-NEXT: "tokLen": 1 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK
[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Review taken into account. Thanks for handling this batch of patches o/ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3dadc290b210: [clang] Add missing fields to DeprecatedAttr and Unavailable json AST dump (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 Files: clang/include/clang/AST/JSONNodeDumper.h clang/lib/AST/JSONNodeDumper.cpp clang/test/AST/ast-dump-attr-json.cpp Index: clang/test/AST/ast-dump-attr-json.cpp === --- clang/test/AST/ast-dump-attr-json.cpp +++ clang/test/AST/ast-dump-attr-json.cpp @@ -8,6 +8,13 @@ __attribute__((cleanup(cleanup_function))) int var; } +__attribute__((deprecated)) int deprecated_var0; +__attribute__((deprecated("reason"))) int deprecated_var1; +__attribute__((deprecated("reason", "replacement"))) int deprecated_var2; + +__attribute__((unavailable)) int unavailable_var0; +__attribute__((unavailable("reason"))) int unavailable_var1; + // NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py // using --filters=VarDecl @@ -139,3 +146,237 @@ // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 282, +// CHECK-NEXT: "line": 11, +// CHECK-NEXT: "col": 33, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 250, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 282, +// CHECK-NEXT:"col": 33, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var0", +// CHECK-NEXT: "mangledName": "deprecated_var0", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 265, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: } +// CHECK-NEXT:} +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 341, +// CHECK-NEXT: "line": 12, +// CHECK-NEXT: "col": 43, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 299, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 341, +// CHECK-NEXT:"col": 43, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var1", +// CHECK-NEXT: "mangledName": "deprecated_var1", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 314, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT: "offset": 333, +// CHECK-NEXT: "col": 35, +// CHECK-NEXT: "tokLen": 1 +// CHECK-NEXT: } +// CHECK-NEXT:}, +// CHECK-NEXT:"message": "reason" +// CHECK-NEXT: } +// CHECK-NEXT: ] +// CHECK-NEXT: } + + +// CHECK-NOT: {{^}}Dumping +// CHECK: "kind": "VarDecl", +// CHECK-NEXT: "loc": { +// CHECK-NEXT: "offset": 415, +// CHECK-NEXT: "line": 13, +// CHECK-NEXT: "col": 58, +// CHECK-NEXT: "tokLen": 15 +// CHECK-NEXT: }, +// CHECK-NEXT: "range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT:"offset": 358, +// CHECK-NEXT:"col": 1, +// CHECK-NEXT:"tokLen": 13 +// CHECK-NEXT: }, +// CHECK-NEXT: "end": { +// CHECK-NEXT:"offset": 415, +// CHECK-NEXT:"col": 58, +// CHECK-NEXT:"tokLen": 15 +// CHECK-NEXT: } +// CHECK-NEXT: }, +// CHECK-NEXT: "name": "deprecated_var2", +// CHECK-NEXT: "mangledName": "deprecated_var2", +// CHECK-NEXT: "type": { +// CHECK-NEXT: "qualType": "int" +// CHECK-NEXT: }, +// CHECK-NEXT: "inner": [ +// CHECK-NEXT: { +// CHECK-NEXT:"id": "0x{{.*}}", +// CHECK-NEXT:"kind": "DeprecatedAttr", +// CHECK-NEXT:"range": { +// CHECK-NEXT: "begin": { +// CHECK-NEXT: "offset": 373, +// CHECK-NEXT: "col": 16, +// CHECK-NEXT: "tokLen": 10 +// CHECK-NEXT: }, +// CHECK-NE