diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-14 02:55:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-14 02:55:32 +0000 |
commit | c3069d618f4661d923cb1b5c4525b082fce73b04 (patch) | |
tree | dc913bb334487a5751df1fb526a232634d7406c4 /lib/Sema/SemaTemplateVariadic.cpp | |
parent | 4e26caa0365347eb63d483df29cdf86ca084510c (diff) |
Start implementing support for substitution into pack expansions that
involve template parameter packs at multiple template levels that
occur within the signatures members of class templates (and partial
specializations thereof). This is a work-in-progress that is deficient
in several ways, notably:
- It only works for template type parameter packs, but we need to
also support non-type template parameter packs and template template
parameter packs.
- It doesn't keep track of the lengths of the substituted argument
packs in the expansion, so it can't properly diagnose length
mismatches.
However, this is a concrete step in the right direction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateVariadic.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateVariadic.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp index 473dcb7d1f..dc5013c25d 100644 --- a/lib/Sema/SemaTemplateVariadic.cpp +++ b/lib/Sema/SemaTemplateVariadic.cpp @@ -456,6 +456,10 @@ bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, std::pair<IdentifierInfo *, SourceLocation> FirstPack; bool HaveFirstPack = false; + // FIXME: Variadic templates. Even if we don't expand, we'd still like to + // return the number of expansions back to the caller, perhaps as an + // llvm::Optional, so that it can be embedded in the pack expansion. This + // is important for the multi-level substitution case. for (unsigned I = 0; I != NumUnexpanded; ++I) { // Compute the depth and index for this parameter pack. unsigned Depth; |