[demangler] Improve variadic template support

This commit changes how variadic templates are represented in the
demangler, in order to fix some longstanding bugs. Now instead of
expanding variadic templates during parsing, the expansion is done
during printing by reusing the unexpanded AST. This allows the
demangler to handle cases where multiple packs contribute to a single
production, and correctly handle "Dp" and "sp" productions, which
corrispond to pack expansions in type and expression contexts.

Differential revision: https://reviews.llvm.org/D41885

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@323906 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed