diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-20 02:24:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-20 02:24:11 +0000 |
commit | 7536dd5e6c99584481b7dab68b7e7d8df9c54054 (patch) | |
tree | b404f8a27369f14746fb159940fda899f9355cae /lib/Sema/SemaTemplate.cpp | |
parent | d3d3be9bc717b37366324e9711f1ea22dea42caa (diff) |
Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given
template<typename... Types> struct tuple;
template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};
the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.
This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 5819362e76..36bb76fdb3 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -2386,6 +2386,7 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template, // If we have a template parameter pack, check every remaining template // argument against that template parameter pack. + // FIXME: Variadic templates are unimplemented if ((*Param)->isTemplateParameterPack()) { Diag(TemplateLoc, diag::err_variadic_templates_unsupported); return true; @@ -2640,6 +2641,11 @@ bool UnnamedLocalNoLinkageFinder::VisitDependentTemplateSpecializationType( return VisitNestedNameSpecifier(T->getQualifier()); } +bool UnnamedLocalNoLinkageFinder::VisitPackExpansionType( + const PackExpansionType* T) { + return Visit(T->getPattern()); +} + bool UnnamedLocalNoLinkageFinder::VisitObjCObjectType(const ObjCObjectType *) { return false; } |