Page MenuHomePhabricator

Add a printing policy for AST dumping
ClosedPublic

Authored by aaron.ballman on Nov 24 2017, 2:32 PM.

Details

Reviewers
rsmith
hfinkel
Summary

The AST dump functionality does not currently make use of a printing policy, so when dumping C++ code, you will see _Bool, struct Foo and other C-isms in the output. This patch adds a PrintingPolicy object to the AST dumper to get slightly improved output for the various language modes, and corrects the impacted test cases.

Diff Detail

Event Timeline

aaron.ballman created this revision.Nov 24 2017, 2:32 PM

Ping. Added more context to the patch.

P-p-p-power ping! :-)

hfinkel accepted this revision.Dec 20 2017, 1:54 PM
hfinkel added a subscriber: hfinkel.

P-p-p-power ping! :-)

LGTM

lib/AST/ASTDumper.cpp
218

Remove commented-out code.

This revision is now accepted and ready to land.Dec 20 2017, 1:54 PM
aaron.ballman closed this revision.Dec 20 2017, 2:05 PM
aaron.ballman marked an inline comment as done.

Thanks, Hal! Committed in r321223.

lib/AST/ASTDumper.cpp
218

Sorry about that -- I spotted it when my rebase failed and have removed it.