summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-24 00:15:10 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-24 00:15:10 +0000
commiteb5a39deb2f4fe7091c6a716a4ce3a88b9898ec4 (patch)
tree54324d0e14236ce2d935e18c0a8a55afe0303980 /clang/lib/AST/DeclPrinter.cpp
parentfa3c6f148ce980550be8981fe40325506c39a45f (diff)
downloadbcm5719-llvm-eb5a39deb2f4fe7091c6a716a4ce3a88b9898ec4.tar.gz
bcm5719-llvm-eb5a39deb2f4fe7091c6a716a4ce3a88b9898ec4.zip
When instantiating a non-type template parameter pack, be sure to
extract the appropriate argument from the argument pack (based on the current substitution index, of course). Simple instantiation of pack expansions involving non-type template parameter packs now works. llvm-svn: 122532
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 95421a494ba..8941200969e 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -681,6 +681,9 @@ void DeclPrinter::VisitTemplateDecl(TemplateDecl *D) {
dyn_cast<NonTypeTemplateParmDecl>(Param)) {
Out << NTTP->getType().getAsString(Policy);
+ if (NTTP->isParameterPack() && !isa<PackExpansionType>(NTTP->getType()))
+ Out << "...";
+
if (IdentifierInfo *Name = NTTP->getIdentifier()) {
Out << ' ';
Out << Name->getName();
OpenPOWER on IntegriCloud