This is an archive of the discontinued LLVM Phabricator instance.

Re-order content of template parameter dumps
ClosedPublic

Authored by steveire on Dec 6 2018, 3:31 PM.

Diff Detail

Event Timeline

steveire created this revision.Dec 6 2018, 3:31 PM
aaron.ballman requested changes to this revision.Dec 7 2018, 4:48 AM
aaron.ballman added inline comments.
test/AST/ast-dump-decl.cpp
331–332

This looks wrong to me. You did not inherit the TemplateTypeParmDecl from above, you inherited the TemplateArgument. The order is important here and should be preserved to avoid confusion.

This revision now requires changes to proceed.Dec 7 2018, 4:48 AM
steveire marked an inline comment as done.Dec 7 2018, 5:02 AM
steveire added inline comments.
test/AST/ast-dump-decl.cpp
331–332

Should this be dumped as a child of the TemplateArgument then? I can add it as a child in ASTDumper::dumpTemplateArgument.

aaron.ballman added inline comments.Dec 7 2018, 5:37 AM
test/AST/ast-dump-decl.cpp
331–332

I kind of think it should. We follow the same pattern in each place -- print the template argument, then print this information, so combining it seems reasonable to me.

steveire updated this revision to Diff 177412.Dec 9 2018, 5:18 AM

New approach

aaron.ballman accepted this revision.Dec 9 2018, 9:20 AM

LGTM aside from some minor nits

lib/AST/ASTDumper.cpp
106

s/label/Label per naming conventions (same below).

733

Elide braces.

This revision is now accepted and ready to land.Dec 9 2018, 9:20 AM
This revision was automatically updated to reflect the committed changes.