This is an archive of the discontinued LLVM Phabricator instance.

Use ASTDumper to dump the AST from clang-query
ClosedPublic

Authored by steveire on May 17 2019, 1:38 AM.

Details

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.

Event Timeline

steveire created this revision.May 17 2019, 1:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2019, 1:38 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.May 20 2019, 1:39 PM

If you wanted to expand test coverage for the changes covered in this, that would be a good thing. However, I'm not certain how testable the newly colorized output is, which is why this LG as-is.

steveire closed this revision.Dec 6 2019, 3:44 PM

Committed in b22d8ae7f436bfe63. I don't know why this review didn't automatically update.