Use ASTDumper to dump the AST from clang-query
authorStephen Kelly <steveire@gmail.com>
Fri, 6 Dec 2019 23:26:59 +0000 (23:26 +0000)
committerStephen Kelly <steveire@gmail.com>
Fri, 6 Dec 2019 23:38:56 +0000 (23:38 +0000)
commitb22d8ae7f436bfe63b28ceddea743071a6601eb1
treeb2bf15e4e590ee683f7d750b9317953ae6c5ba1c
parente1578fd2b79fe5af5f80c0c166a8abd0f816c022
Use ASTDumper to dump the AST from clang-query

Summary:
This way, the output is not limited by the various API differences
between the dump() member functions.  For example, all dumps are now in
color, while that used to be the case only for Decls and Stmts, but not
Types.

Additionally, while DynTypedNode::dump (which was used up to now) was
limited to dumping only Decls, Stmts and Types, this makes clang-query
support everything ASTNodeTraverser supports.

Reviewers: aaron.ballman

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62056
clang-tools-extra/clang-query/Query.cpp