]> granicus.if.org Git - clang/commit
Refactor tree printing in AST dumping.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 30 Oct 2014 21:02:37 +0000 (21:02 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 30 Oct 2014 21:02:37 +0000 (21:02 +0000)
commit1f064ca0a944bf0279b0d6508268a4ea0a354b8e
tree3f42088b1c30c14b935a376451711b781bd9ce49
parent845eee38deb08e4f8935aecc7b280cbaeb7edd10
Refactor tree printing in AST dumping.

Instead of manually maintaining a flag indicating whether we're about to print
out the last child of the parent node (to determine whether we print "`" or
"|"), capture a callable to print that child and defer printing it until we
either see a next child or finish the parent.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220930 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTDumper.cpp
test/Misc/ast-dump-color.cpp
utils/TableGen/ClangAttrEmitter.cpp