Introduce the ability to dump the AST to JSON.
authorAaron Ballman <aaron@aaronballman.com>
Mon, 13 May 2019 21:39:55 +0000 (21:39 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 13 May 2019 21:39:55 +0000 (21:39 +0000)
commit2ce598a44a353f159157d780721c6a08b4d35c60
tree58eca5642aefaa29c6a56ab90818e3b08d30dddd
parentaeeeb37e373700350472d40cf0a0969b070be0a0
Introduce the ability to dump the AST to JSON.

This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests.

llvm-svn: 360622
17 files changed:
clang/include/clang/AST/ASTDumperUtils.h
clang/include/clang/AST/DeclBase.h
clang/include/clang/AST/JSONNodeDumper.h [new file with mode: 0644]
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Frontend/ASTConsumers.h
clang/include/clang/Frontend/FrontendOptions.h
clang/lib/AST/ASTDumper.cpp
clang/lib/AST/CMakeLists.txt
clang/lib/AST/JSONNodeDumper.cpp [new file with mode: 0644]
clang/lib/Frontend/ASTConsumers.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/FrontendActions.cpp
clang/test/AST/ast-dump-enum-json.cpp [new file with mode: 0644]
clang/test/AST/ast-dump-if-json.cpp [new file with mode: 0644]
clang/test/AST/ast-dump-namespace-json.cpp [new file with mode: 0644]
clang/tools/clang-check/ClangCheck.cpp
clang/tools/clang-import-test/clang-import-test.cpp