]> granicus.if.org Git - clang/commit
Augment location information when dumping the AST to JSON.
authorAaron Ballman <aaron@aaronballman.com>
Mon, 24 Jun 2019 20:07:11 +0000 (20:07 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 24 Jun 2019 20:07:11 +0000 (20:07 +0000)
commitbf1bcc9ff6110f129f1e1d07b371046433a09935
tree86e8293f39eb275847765252f678139fbe4db71f
parente19d326a09f98edffcd1e929fe8af187b77139f7
Augment location information when dumping the AST to JSON.

Rather than create JSON objects for source locations and ranges, we instead stream them out directly. This allows us to elide duplicate information (without JSON field reordering causing an issue) like file names and line numbers, similar to the text dump. This also adds token length information when dumping the source location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364226 91177308-0d34-0410-b5e6-96231b3b80d8
23 files changed:
include/clang/AST/JSONNodeDumper.h
lib/AST/JSONNodeDumper.cpp
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/ast-dump-types-json.cpp
test/AST/multistep-explicit-cast-json.c
test/AST/multistep-explicit-cast-json.cpp