diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-20 16:52:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-20 16:52:59 +0000 |
commit | 87dd697dcc8ecb64df73ae64d61b8c80ff0c157c (patch) | |
tree | 0222a2df7114ce46f1829744c97ebd08a5b736ad /lib/AST/ASTContext.cpp | |
parent | a9150cdac3d666671fce74cac621d68cc0ade17d (diff) |
Clean up the handling of template argument packs, especially in the
area of printing template arguments. The functionality changes here
are limited to cases of variadic templates that aren't yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 94038418df..8e2ef1a95e 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2741,6 +2741,9 @@ ASTContext::getCanonicalTemplateArgument(const TemplateArgument &Arg) { return TemplateArgument(getCanonicalType(Arg.getAsType())); case TemplateArgument::Pack: { + if (Arg.pack_size() == 0) + return Arg; + TemplateArgument *CanonArgs = new (*this) TemplateArgument[Arg.pack_size()]; unsigned Idx = 0; |